diff options
author | Thomas Lively <tlively@google.com> | 2023-12-14 10:27:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 10:27:53 -0800 |
commit | bdd96e8c21d23a57a99dcca9d4d802ff471243c3 (patch) | |
tree | bca67e3db39d12835263086ac200f44a658ee3a4 /src/parser/wat-parser.cpp | |
parent | 7adc82b5da6ad2b36d2f335af6619601ccc8e36b (diff) | |
download | binaryen-bdd96e8c21d23a57a99dcca9d4d802ff471243c3.tar.gz binaryen-bdd96e8c21d23a57a99dcca9d4d802ff471243c3.tar.bz2 binaryen-bdd96e8c21d23a57a99dcca9d4d802ff471243c3.zip |
[Parser] Parse explicit exports (#6179)
Diffstat (limited to 'src/parser/wat-parser.cpp')
-rw-r--r-- | src/parser/wat-parser.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/parser/wat-parser.cpp b/src/parser/wat-parser.cpp index cc0f582fc..95dfa1405 100644 --- a/src/parser/wat-parser.cpp +++ b/src/parser/wat-parser.cpp @@ -178,6 +178,16 @@ Result<> parseModule(Module& wasm, std::string_view input) { CHECK_ERR(parsed); assert(parsed); } + + // Parse exports. + // TODO: It would be more technically correct to interleave these properly + // with the implicit inline exports in other module field definitions. + for (auto pos : decls.exportDefs) { + WithPosition with(ctx, pos); + auto parsed = export_(ctx); + CHECK_ERR(parsed); + assert(parsed); + } } return Ok{}; |