diff options
author | Thomas Lively <tlively@google.com> | 2023-09-21 15:33:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-21 15:33:51 -0700 |
commit | 38197b57aa5bd94a879c0203b75a35cb826db929 (patch) | |
tree | bd03181fa5e9ac804a58db2e1d65ca26d19763d7 /src/parser/input.h | |
parent | 2c09a60ecbb0ba0276982204d8788b4343356417 (diff) | |
download | binaryen-38197b57aa5bd94a879c0203b75a35cb826db929.tar.gz binaryen-38197b57aa5bd94a879c0203b75a35cb826db929.tar.bz2 binaryen-38197b57aa5bd94a879c0203b75a35cb826db929.zip |
[Parser] Allow any number of foldedinsts in `foldedinsts` (#5965)
Somewhat counterintuitively, the text syntax for a folded `if` allows any number
of folded instructions in the condition position, not just one. Update the
corresponding `foldedinsts` parsing function to parse arbitrary sequences of
folded instructions and add a test.
Diffstat (limited to 'src/parser/input.h')
-rw-r--r-- | src/parser/input.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parser/input.h b/src/parser/input.h index 5c7c57d20..5cb2bd471 100644 --- a/src/parser/input.h +++ b/src/parser/input.h @@ -62,6 +62,7 @@ struct ParseInput { std::optional<std::string_view> takeString(); std::optional<Name> takeName(); bool takeSExprStart(std::string_view expected); + bool peekSExprStart(std::string_view expected); Index getPos(); [[nodiscard]] Err err(Index pos, std::string reason); |