diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-02-28 17:34:31 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:19:00 +0100 |
commit | 4516631ae20f9dfc8cb7b795dedda85ab11a0db8 (patch) | |
tree | 7141b58edcd10b85e6b1a26dfe5af0ed4fdc5fed /gcc/rust/ast/rust-ast.cc | |
parent | 4c77c7ac0f2ad11e48a32d7a98b3ca1005df8678 (diff) | |
download | gcc-4516631ae20f9dfc8cb7b795dedda85ab11a0db8.zip gcc-4516631ae20f9dfc8cb7b795dedda85ab11a0db8.tar.gz gcc-4516631ae20f9dfc8cb7b795dedda85ab11a0db8.tar.bz2 |
gccrs: ast: Add RestPattern AST node
Add the RestPattern AST node representing ".." code in some rust
context. This commit also provides the different visitors for this node.
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add visitor.
* ast/rust-ast-dump.h: Add visitor prototype.
* ast/rust-ast-full-decls.h (class RestPattern): Add forward
declaration for class RestPattern.
* ast/rust-ast-visitor.h: Add visitor prototype.
* ast/rust-ast.cc (RestPattern::accept_vis): Add function to
accept a foreign visitor.
* ast/rust-pattern.h (class RestPattern): Add class RestPattern.
* checks/errors/rust-feature-gate.h: Add visitor prototype.
* expand/rust-attribute-visitor.cc (AttrVisitor::visit): Add
visitor implementation.
* expand/rust-attribute-visitor.h: Add visitor prototype.
* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Add
visitor implementation.
* hir/rust-ast-lower-base.h: Add visitor prototype.
* resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Add
visitor implementation.
* resolve/rust-ast-resolve-base.h: Add visitor prototype.
* resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
Add visitor implementation.
* resolve/rust-early-name-resolver.h: Add visitor prototype.
* util/rust-attributes.cc (AttributeChecker::visit): Add visitor
implementation.
* util/rust-attributes.h: Add visitor prototype.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/ast/rust-ast.cc')
-rw-r--r-- | gcc/rust/ast/rust-ast.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc index 13d31cf..6572a3e 100644 --- a/gcc/rust/ast/rust-ast.cc +++ b/gcc/rust/ast/rust-ast.cc @@ -5575,6 +5575,12 @@ WildcardPattern::accept_vis (ASTVisitor &vis) } void +RestPattern::accept_vis (ASTVisitor &vis) +{ + vis.visit (*this); +} + +void RangePatternBoundLiteral::accept_vis (ASTVisitor &vis) { vis.visit (*this); |