diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-02-25 10:15:15 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-02-25 10:15:15 -0800 |
commit | 51c52bb5e1547c4abece7e9ee0ca0c5fa1e8f4e2 (patch) | |
tree | be8a0957800b17f96f54700dfd31ec42f2de404d | |
parent | 0bc91f2983cfcf44cb94a94454e8b689b58dec43 (diff) | |
download | binaryen-51c52bb5e1547c4abece7e9ee0ca0c5fa1e8f4e2.tar.gz binaryen-51c52bb5e1547c4abece7e9ee0ca0c5fa1e8f4e2.tar.bz2 binaryen-51c52bb5e1547c4abece7e9ee0ca0c5fa1e8f4e2.zip |
support block comments in check.py
-rwxr-xr-x | check.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -174,6 +174,12 @@ def split_wast(wast): i = 0 while i >= 0: start = wast.find('(', i) + if start >= 0 and wast[start+1] == ';': + # block comment + i = wast.find(';)', start+2) + assert i > 0, wast[start:] + i += 2 + continue skip = wast.find(';', i) if skip >= 0 and skip < start and skip + 1 < len(wast): if wast[skip+1] == ';': @@ -188,7 +194,6 @@ def split_wast(wast): continue elif chunk.startswith(('(assert', '(invoke')): ret[-1][1].append(chunk) - assert len(ret) > 0 return ret def binary_format_check(wast, verify_final_result=True): |