]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Properly match delimiters
authorOwen Avery <powerboat9.gamer@gmail.com>
Tue, 30 May 2023 20:24:08 +0000 (16:24 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:37:23 +0000 (18:37 +0100)
commit007248a2c48ef3c349204899b325bab574019734
tree647a3462ab5b2bfd1b21a37055f0104c75496b7f
parentd3d751cbac030902014856bbbd310a90b02912af
gccrs: Properly match delimiters

gcc/rust/ChangeLog:

* expand/rust-macro-expand.cc
(MacroExpander::try_match_rule): Don't match delimiters for root matcher.
(MacroExpander::match_matcher): Add option to match delimiters.
* expand/rust-macro-expand.h
(MacroExpander::match_matcher): Likewise.
* parse/rust-parse-impl.h
(Parser::skip_token): Add zero argument method.
* parse/rust-parse.h:
(Parser::skip_token): Likewise.

gcc/testsuite/ChangeLog:

* rust/compile/macro-delim.rs: New test.

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