]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Break OR tokens in closure parameter list context
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 10 Oct 2023 12:06:30 +0000 (14:06 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:09:18 +0000 (19:09 +0100)
commit906e55530a30fed93868d16332c9168848089ded
tree70db6d340050c692d21f81ea8045f194dc08e003
parent2dfff621d9f5e2f7635a505d3d8c89ce1181f90e
gccrs: Break OR tokens in closure parameter list context

The parser was unable to process as closure inside a closure because the
lexer could not differentiate an OR from two PIPE tokens.

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h (Parser::parse_closure_expr_pratt): Fix
closure parsing function to handle consecutive parameter lists.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/parse/rust-parse-impl.h