From a032c1bedf0df186f5f6166ba41af82a42e7db2f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 21 Dec 2015 13:44:17 -0800 Subject: more escaping --- src/wasm-s-parser.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 0271370dd..4f0bd199b 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -195,9 +195,19 @@ private: str += '"'; input += 2; continue; + } else if (input[1] == '\'') { + str += '\''; + input += 2; + continue; } else if (input[1] == '\\') { str += '\\'; input += 2; + } else if (input[1] == 'n') { + str += '\n'; + input += 2; + } else if (input[1] == 't') { + str += '\t'; + input += 2; } else { str += (char)(unhex(input[1])*16 + unhex(input[2])); input += 3; -- cgit v1.2.3