summaryrefslogtreecommitdiff
path: root/src/wast-parser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wast-parser.cc')
-rw-r--r--src/wast-parser.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index 64071faf..66e83a8c 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -111,6 +111,7 @@ bool IsPlainInstr(TokenType token_type) {
case TokenType::Select:
case TokenType::Br:
case TokenType::BrIf:
+ case TokenType::BrOnExn:
case TokenType::BrTable:
case TokenType::Return:
case TokenType::ReturnCall:
@@ -1368,6 +1369,15 @@ Result WastParser::ParsePlainInstr(std::unique_ptr<Expr>* out_expr) {
CHECK_RESULT(ParsePlainInstrVar<BrIfExpr>(loc, out_expr));
break;
+ case TokenType::BrOnExn: {
+ Consume();
+ auto expr = MakeUnique<BrOnExnExpr>(loc);
+ CHECK_RESULT(ParseVar(&expr->label_var));
+ CHECK_RESULT(ParseVar(&expr->event_var));
+ *out_expr = std::move(expr);
+ break;
+ }
+
case TokenType::BrTable: {
Consume();
auto expr = MakeUnique<BrTableExpr>(loc);