From abb2703e8fa3785e384672e2ce3d54bf3fb0a6cf Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 11 Oct 2023 14:31:25 +0200 Subject: Add comma for expr delimiter to fix match arms Add a comma as an expr delimiter, this will allow correct parsing of match arm expressions. gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_expr): Add comma delimiter. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/parse/rust-parse-impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index cebf5b3..392d9ac 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -12086,7 +12086,7 @@ Parser::parse_expr (int right_binding_power, { TokenId id = current_token->get_id (); if (id == SEMICOLON || id == RIGHT_PAREN || id == RIGHT_CURLY - || id == RIGHT_SQUARE) + || id == RIGHT_SQUARE || id == COMMA) return nullptr; } -- cgit v1.1