summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-04 14:54:35 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-04 14:54:35 -0800
commit1f6860afeb96795bd3a2478dda2c55b2ecce34c8 (patch)
treede9aac146b3ba069d9fa920515b0583da4f9f947 /src
parent0ee26b62aa9a0a957f61c338ff4d9f8f0a1efdf2 (diff)
downloadbinaryen-1f6860afeb96795bd3a2478dda2c55b2ecce34c8.tar.gz
binaryen-1f6860afeb96795bd3a2478dda2c55b2ecce34c8.tar.bz2
binaryen-1f6860afeb96795bd3a2478dda2c55b2ecce34c8.zip
handle ;; comments
Diffstat (limited to 'src')
-rw-r--r--src/wasm-s-parser.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index fe84b0098..fb72d5232 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -144,7 +144,14 @@ private:
}
void skipWhitespace() {
- while (isspace(input[0])) input++;
+ while (1) {
+ while (isspace(input[0])) input++;
+ if (input[0] == ';' && input[1] == ';') {
+ while (input[0] != '\n') input++;
+ } else {
+ return;
+ }
+ }
}
Element* parseString() {