diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-07-29 15:02:29 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 09:54:50 -0700 |
commit | c846fb7dad4f18485979cf8c80c77bbb5d65c35f (patch) | |
tree | 3713f7e97f4c048734e01df12e67bf77038cfec5 | |
parent | 981c7efa1ae4b27d1efd212284e61b77e89977a5 (diff) | |
download | binaryen-c846fb7dad4f18485979cf8c80c77bbb5d65c35f.tar.gz binaryen-c846fb7dad4f18485979cf8c80c77bbb5d65c35f.tar.bz2 binaryen-c846fb7dad4f18485979cf8c80c77bbb5d65c35f.zip |
fix parsing in split_wast
-rwxr-xr-x | scripts/support.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/support.py b/scripts/support.py index 2d4318980..7b61d5a03 100755 --- a/scripts/support.py +++ b/scripts/support.py @@ -100,7 +100,12 @@ def split_wast(wast): depth = 1 while depth > 0 and j < len(wast): if wast[j] == '"': - j = wast.find('"', j + 1) + while 1: + j = wast.find('"', j + 1) + if wast[j - 1] == '\\': + continue + break + assert j > 0 elif wast[j] == '(': depth += 1 elif wast[j] == ')': |