diff options
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r-- | src/wasm-s-parser.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index db70a69b7..3a51e7887 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -145,10 +145,17 @@ private: } Element* parseString() { + if (input[0] == '$') input++; // names begin with $, but we don't need that internally + bool quoted = false; + if (input[0] == '"') { + quoted = true; + input++; + } char *start = input; while (input[0] && !isspace(input[0]) && input[0] != ')') input++; char temp = input[0]; input[0] = 0; + if (quoted) input[-1] = 0; auto ret = allocator.alloc<Element>()->setString(IString(start, false)); // TODO: reuse the string here, carefully input[0] = temp; return ret; |