aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-03-24 15:03:20 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2022-03-24 15:03:20 +0100
commit5651331236d39ce685e1de3396463fd88c3a83d2 (patch)
tree3729e3e925c99ac127e593918544c43fc4a2d855 /gcc/rust/parse
parent8283724bc24efc0c11960947f2d4e99bc20b3765 (diff)
downloadgcc-5651331236d39ce685e1de3396463fd88c3a83d2.zip
gcc-5651331236d39ce685e1de3396463fd88c3a83d2.tar.gz
gcc-5651331236d39ce685e1de3396463fd88c3a83d2.tar.bz2
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
Diffstat (limited to 'gcc/rust/parse')
-rw-r--r--gcc/rust/parse/rust-parse.h2
1 files changed, 1 insertions, 1 deletions
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<std::unique_ptr<AST::LifetimeParam> > parse_lifetime_params ();
AST::Visibility parse_visibility ();
std::unique_ptr<AST::IdentifierPattern> parse_identifier_pattern ();
+ std::unique_ptr<AST::TokenTree> 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<AST::TokenTree> parse_token_tree ();
std::unique_ptr<AST::MacroRulesDefinition>
parse_macro_rules_def (AST::AttrVec outer_attrs);
std::unique_ptr<AST::MacroInvocation>