From: Pierre-Emmanuel Patry Date: Wed, 11 Oct 2023 12:31:25 +0000 (+0200) Subject: gccrs: Add comma for expr delimiter to fix match arms X-Git-Tag: basepoints/gcc-15~2098 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=863431f5a0a7e208937ee471a6f0933df214cdd8;p=thirdparty%2Fgcc.git 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 --- 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; }