Skip to content

Commit

Permalink
Add comma for expr delimiter to fix match arms
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
P-E-P committed Oct 11, 2023
1 parent 007166c commit c562576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/rust/parse/rust-parse-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12082,7 +12082,7 @@ Parser<ManagedTokenSource>::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;
}

Expand Down

0 comments on commit c562576

Please sign in to comment.