diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-10-11 14:31:25 +0200 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-10-16 15:30:23 +0000 |
commit | abb2703e8fa3785e384672e2ce3d54bf3fb0a6cf (patch) | |
tree | d5330cad547726dcccf2d32a38756205913a0ad9 | |
parent | 9d0a0735834685deaa8f3e471437bf71707b4d73 (diff) | |
download | gcc-upstream-abb2703e8fa3785e384672e2ce3d54bf3fb0a6cf.tar.gz |
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 <pierre-emmanuel.patry@embecosm.com>
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index cebf5b3b14c..392d9ac7751 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -12086,7 +12086,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; } |