From 863431f5a0a7e208937ee471a6f0933df214cdd8 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 11 Oct 2023 14:31:25 +0200 Subject: [PATCH] gccrs: 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(-) diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 345ef0eeb6ee..8c04a1af1758 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; } -- 2.47.2