From 51c52bb5e1547c4abece7e9ee0ca0c5fa1e8f4e2 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 25 Feb 2016 10:15:15 -0800 Subject: support block comments in check.py --- check.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'check.py') diff --git a/check.py b/check.py index 16a235ec6..45fd08b15 100755 --- a/check.py +++ b/check.py @@ -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): -- cgit v1.2.3