summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-31 08:44:51 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-31 08:44:51 -0800
commit48832b5d4dbd06f6f7f6afca5822055f219a7392 (patch)
tree2984a348b88913fbff96d4b27507ae777f1d487d
parentae918ff5f5746398d0393cf871f6208e582b82d2 (diff)
downloadbinaryen-48832b5d4dbd06f6f7f6afca5822055f219a7392.tar.gz
binaryen-48832b5d4dbd06f6f7f6afca5822055f219a7392.tar.bz2
binaryen-48832b5d4dbd06f6f7f6afca5822055f219a7392.zip
handle initial comments in wast splitting
-rwxr-xr-xcheck.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/check.py b/check.py
index 89a64113f..22acc0228 100755
--- a/check.py
+++ b/check.py
@@ -174,6 +174,11 @@ def split_wast(wast):
i = 0
while i >= 0:
start = wast.find('(', i)
+ skip = wast.find(';', i)
+ if skip >= 0 and skip < start and skip + 1 < len(wast):
+ if wast[skip+1] == ';':
+ i = wast.find('\n', i) + 1
+ continue
if start < 0: break
i = to_end(start + 1)
chunk = wast[start:i]