diff options
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{}; |