summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-s-parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r--src/wasm/wasm-s-parser.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp
index 95cb453fb..b7113d2b2 100644
--- a/src/wasm/wasm-s-parser.cpp
+++ b/src/wasm/wasm-s-parser.cpp
@@ -2990,6 +2990,20 @@ Expression* SExpressionWasmBuilder::makeCallRef(Element& s, bool isReturn) {
target, operands, sigType.getSignature().results, isReturn);
}
+Expression* SExpressionWasmBuilder::makeContNew(Element& s) {
+ auto ret = allocator.alloc<ContNew>();
+
+ ret->contType = parseHeapType(*s[1]);
+ if (!ret->contType.isContinuation()) {
+ throw ParseException("expected continuation type", s[1]->line, s[1]->col);
+ }
+
+ ret->func = parseExpression(s[2]);
+
+ ret->finalize();
+ return ret;
+}
+
Expression* SExpressionWasmBuilder::makeResume(Element& s) {
auto ret = allocator.alloc<Resume>();