From 5651331236d39ce685e1de3396463fd88c3a83d2 Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Thu, 24 Mar 2022 15:03:20 +0100 Subject: macros: Allow parsing :tt fragments :tt fragments stand for token trees, and are composed of either a token, or a delimited token tree, which is a token tree surrounded by delimiters (parentheses, curly brackets or square brackets). This should allow us to handle a lot more macros, including extremely powerful macro patterns such as TT munchers --- gcc/rust/parse/rust-parse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/rust/parse') diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h index cb77033..88bd311 100644 --- a/gcc/rust/parse/rust-parse.h +++ b/gcc/rust/parse/rust-parse.h @@ -142,6 +142,7 @@ public: std::vector > parse_lifetime_params (); AST::Visibility parse_visibility (); std::unique_ptr parse_identifier_pattern (); + std::unique_ptr parse_token_tree (); private: void skip_after_semicolon (); @@ -188,7 +189,6 @@ private: // Token tree or macro related AST::DelimTokenTree parse_delim_token_tree (); - std::unique_ptr parse_token_tree (); std::unique_ptr parse_macro_rules_def (AST::AttrVec outer_attrs); std::unique_ptr -- cgit v1.1