diff options
author | SimplyTheOther <simplytheother@gmail.com> | 2021-02-02 13:19:26 +0800 |
---|---|---|
committer | SimplyTheOther <simplytheother@gmail.com> | 2021-02-02 15:55:58 +0800 |
commit | 3a0c8ca2156038b726e2689e9b46be4d8c40c55f (patch) | |
tree | 3c5e0391cd9ba3a2336a0692f0bc7980469dc165 /gcc/rust/ast/rust-macro.h | |
parent | b3a39d99c1d6f45890dbac33a9d17c8dd464654e (diff) | |
download | gcc-3a0c8ca2156038b726e2689e9b46be4d8c40c55f.zip gcc-3a0c8ca2156038b726e2689e9b46be4d8c40c55f.tar.gz gcc-3a0c8ca2156038b726e2689e9b46be4d8c40c55f.tar.bz2 |
Cleanup of AST - moved outer_attrs to child classes
Fixed compile errors
Fixed more compile errors
Diffstat (limited to 'gcc/rust/ast/rust-macro.h')
-rw-r--r-- | gcc/rust/ast/rust-macro.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h index b5fb858..79d513f 100644 --- a/gcc/rust/ast/rust-macro.h +++ b/gcc/rust/ast/rust-macro.h @@ -360,6 +360,7 @@ class MacroInvocation : public TypeNoBounds, public Pattern, public ExprWithoutBlock { + std::vector<Attribute> outer_attrs; /*SimplePath path; DelimTokenTree token_tree;*/ MacroInvocData invoc_data; @@ -375,7 +376,7 @@ public: {}*/ MacroInvocation (MacroInvocData invoc_data, std::vector<Attribute> outer_attrs, Location locus) - : ExprWithoutBlock (std::move (outer_attrs)), + : outer_attrs (std::move (outer_attrs)), invoc_data (std::move (invoc_data)), locus (locus) {} @@ -391,6 +392,11 @@ public: return invoc_data.is_marked_for_strip (); } + const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; } + std::vector<Attribute> &get_outer_attrs () { return outer_attrs; } + + void set_outer_attrs (std::vector<Attribute> new_attrs) override { outer_attrs = std::move (new_attrs); } + protected: /* Use covariance to implement clone function as returning this object rather * than base */ |