]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Remove Parser::parse_path_in_expression_pratt
authorOwen Avery <powerboat9.gamer@gmail.com>
Thu, 21 Aug 2025 04:05:06 +0000 (00:05 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 30 Oct 2025 19:58:43 +0000 (20:58 +0100)
commitd81a412a6dc5fdb297fd77efda3385723cc4d675
treec1b44039f9a5320350d5da1edbf7980a9d34933c
parent65db613b6ef6ea81eb662820d815dfaa36d86187
gccrs: Remove Parser::parse_path_in_expression_pratt

This improves our handling of PathInExpression and fixes
https://github.com/Rust-GCC/gccrs/issues/4056.

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h (Parser::parse_expr): Avoid skipping
or splitting tokens.
(Parser::null_denotation): Assume initial token was not skipped
and adjust function signature to match. Use
parse_path_in_expression instead of
parse_path_in_expression_pratt and handle SCOPE_RESOLUTION.
(Parser::parse_path_in_expression_pratt): Remove function.
* parse/rust-parse.h (null_denotation): Remove initial token
parameter.
(parse_path_in_expression_pratt): Remove function.

gcc/testsuite/ChangeLog:

* rust/compile/global-path-array.rs: New test.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/parse/rust-parse-impl.h
gcc/rust/parse/rust-parse.h
gcc/testsuite/rust/compile/global-path-array.rs [new file with mode: 0644]