diff options
Diffstat (limited to 'src/wast-parser.cc')
-rw-r--r-- | src/wast-parser.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc index ca21584f..8e85d830 100644 --- a/src/wast-parser.cc +++ b/src/wast-parser.cc @@ -145,6 +145,7 @@ bool IsPlainInstr(TokenType token_type) { case TokenType::TableSize: case TokenType::Throw: case TokenType::Rethrow: + case TokenType::RefFunc: case TokenType::RefNull: case TokenType::RefIsNull: case TokenType::AtomicLoad: @@ -1689,6 +1690,11 @@ Result WastParser::ParsePlainInstr(std::unique_ptr<Expr>* out_expr) { CHECK_RESULT(ParsePlainInstrVar<TableSizeExpr>(loc, out_expr)); break; + case TokenType::RefFunc: + ErrorUnlessOpcodeEnabled(Consume()); + CHECK_RESULT(ParsePlainInstrVar<RefFuncExpr>(loc, out_expr)); + break; + case TokenType::RefNull: ErrorUnlessOpcodeEnabled(Consume()); out_expr->reset(new RefNullExpr(loc)); |