diff --git a/src/Parser.cc b/src/Parser.cc index 958a41338..b0049923c 100644 --- a/src/Parser.cc +++ b/src/Parser.cc @@ -241,10 +241,12 @@ after_constraints: { Tokens.get(); auto T1 = Tokens.peek(); - Expression* Value = nullptr; + Expression* Value; BlockStart* BlockStart; if (llvm::isa(T1)) { + Value = nullptr; BlockStart = static_cast(T1); + Tokens.get(); } else { Value = parseExpression(); BlockStart = expectToken(); @@ -269,7 +271,7 @@ after_constraints: Tokens.get(); return new ConstantExpression(T0); default: - throw UnexpectedTokenDiagnostic(File, T0, std::vector { NodeKind::Identifier, NodeKind::IntegerLiteral, NodeKind::StringLiteral }); + throw UnexpectedTokenDiagnostic(File, T0, { NodeKind::MatchKeyword, NodeKind::Identifier, NodeKind::IdentifierAlt, NodeKind::IntegerLiteral, NodeKind::StringLiteral }); } }