diff options
author | SimplyTheOther <simplytheother@gmail.com> | 2020-12-18 21:07:04 +0800 |
---|---|---|
committer | SimplyTheOther <simplytheother@gmail.com> | 2020-12-18 21:07:04 +0800 |
commit | f764eeb8abf1ec50794ddb1f31bc57d025e29a3c (patch) | |
tree | edee12ce380362c51141a9d472f4abfa5509a4ce /gcc/rust/ast/rust-ast-full-test.cc | |
parent | 0496b05eafd154500ec473e5ea26353dffd5cf79 (diff) | |
download | gcc-f764eeb8abf1ec50794ddb1f31bc57d025e29a3c.zip gcc-f764eeb8abf1ec50794ddb1f31bc57d025e29a3c.tar.gz gcc-f764eeb8abf1ec50794ddb1f31bc57d025e29a3c.tar.bz2 |
Unified representation of macro invocation internal data - will be better for processing
Diffstat (limited to 'gcc/rust/ast/rust-ast-full-test.cc')
-rw-r--r-- | gcc/rust/ast/rust-ast-full-test.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/rust/ast/rust-ast-full-test.cc b/gcc/rust/ast/rust-ast-full-test.cc index 030b0b3..f0a3990 100644 --- a/gcc/rust/ast/rust-ast-full-test.cc +++ b/gcc/rust/ast/rust-ast-full-test.cc @@ -1358,13 +1358,9 @@ TypeAlias::as_string () const str += "\n Where clause: "; if (!has_where_clause ()) - { str += "none"; - } else - { str += where_clause.as_string (); - } str += "\n Type: " + existing_type->as_string (); @@ -1383,6 +1379,9 @@ MacroInvocationSemi::as_string () const str += attr.as_string () + "\n"; } + str += invoc_data.as_string (); + +#if 0 str += "\n" + path.as_string () + "!"; std::string tok_trees; @@ -1414,6 +1413,7 @@ MacroInvocationSemi::as_string () const tok_trees += get_string_in_delims (s, delim_type); } +#endif return str; } @@ -1520,8 +1520,15 @@ MacroRulesDefinition::as_string () const std::string MacroInvocation::as_string () const { - return "MacroInvocation: " + path.as_string () + "!" - + token_tree.as_string (); + /*return "MacroInvocation: " + path.as_string () + "!" + + token_tree.as_string ();*/ + return "MacroInvocation: " + invoc_data.as_string (); +} + +std::string +MacroInvocData::as_string () const +{ + return path.as_string () + "!" + token_tree.as_string (); } std::string |