Skip to content

Commit 344e7d2

Browse files
authored
wast-parser.cc: Accept non abbreviated forms of result for select (#2104)
eg. "select (result i32) (result)" cf. WebAssembly/spec#1567
1 parent 7e0b5c9 commit 344e7d2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/wast-parser.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,9 +2119,8 @@ Result WastParser::ParsePlainInstr(std::unique_ptr<Expr>* out_expr) {
21192119
Consume();
21202120
TypeVector result;
21212121
if (options_->features.reference_types_enabled() &&
2122-
MatchLpar(TokenType::Result)) {
2123-
CHECK_RESULT(ParseValueTypeList(&result, nullptr));
2124-
EXPECT(Rpar);
2122+
PeekMatchLpar(TokenType::Result)) {
2123+
CHECK_RESULT(ParseResultList(&result, nullptr));
21252124
}
21262125
out_expr->reset(new SelectExpr(result, loc));
21272126
break;

0 commit comments

Comments
 (0)