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.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index c8296461..eb67dceb 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -657,7 +657,8 @@ bool WastParser::PeekMatchExpr() {
}
bool WastParser::PeekMatchRefType() {
- return options_->features.function_references_enabled() &&
+ return (options_->features.function_references_enabled() ||
+ options_->features.exceptions_enabled()) &&
PeekMatchLpar(TokenType::Ref);
}
@@ -934,6 +935,9 @@ Result WastParser::ParseValueType(Var* out_type) {
case Type::ExternRef:
is_enabled = options_->features.reference_types_enabled();
break;
+ case Type::ExnRef:
+ is_enabled = options_->features.exceptions_enabled();
+ break;
default:
is_enabled = true;
break;