diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-12-11 23:10:33 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-12-11 23:10:33 -0500 |
commit | 8bd7af92305240767d231cb482f767d00e79842e (patch) | |
tree | 3a7af261fb639d83ba9e2a56595d99236ce89f66 /src | |
parent | e2a00ea9d0450f250ef8eaf27adf3b23111f6575 (diff) | |
download | binaryen-8bd7af92305240767d231cb482f767d00e79842e.tar.gz binaryen-8bd7af92305240767d231cb482f767d00e79842e.tar.bz2 binaryen-8bd7af92305240767d231cb482f767d00e79842e.zip |
s parsing improvements
Diffstat (limited to 'src')
-rw-r--r-- | src/s2wasm.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index cd06d5ec1..9897f7384 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -121,7 +121,7 @@ private: Name getCommaSeparated() { skipWhitespace(); std::string str; - while (*s && *s != ',') { + while (*s && *s != ',' && *s != '\n') { str += *s; s++; } @@ -421,10 +421,10 @@ private: curr->value = getInput(); } bstack.back()->list.push_back(curr); - } else if (match("func_end0:")) { - mustMatch(".size"); - mustMatch("main,"); - mustMatch("func_end0-main"); + } else if (match("func_end")) { + s = strchr(s, '\n'); + s++; + s = strchr(s, '\n'); break; // the function is done } else { abort_on("function element"); |