diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-06-10 12:30:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 12:30:09 -0700 |
commit | 093bf06e1115e84c4300eca91197dc31336ee3e5 (patch) | |
tree | 9016245be8af54c8e47bdb3c0aaa0ed6f263b3c0 /src/wasm-io.h | |
parent | 9fbfe0f200f716a6c9a045c6a3f2606b99af8dea (diff) | |
download | binaryen-093bf06e1115e84c4300eca91197dc31336ee3e5.tar.gz binaryen-093bf06e1115e84c4300eca91197dc31336ee3e5.tar.bz2 binaryen-093bf06e1115e84c4300eca91197dc31336ee3e5.zip |
[Parser] Begin parsing modules (#4716)
Implement the basic infrastructure for the full WAT parser with just enough
detail to parse basic modules that contain only imported globals. Parsing
functions correspond to elements of the grammar in the text specification and
are templatized over context types that correspond to each phase of parsing.
Errors are explicitly propagated via `Result<T>` and `MaybeResult<T>` types.
Follow-on PRs will implement additional phases of parsing and parsing for new
elements in the grammar.
Diffstat (limited to 'src/wasm-io.h')
-rw-r--r-- | src/wasm-io.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm-io.h b/src/wasm-io.h index 1e28b5f92..ae66c3932 100644 --- a/src/wasm-io.h +++ b/src/wasm-io.h @@ -27,6 +27,10 @@ namespace wasm { +// TODO: Remove this after switching to the new WAT parser by default and +// removing the old one. +extern bool useNewWATParser; + class ModuleIOBase { protected: bool debugInfo; |