Skip to content

Commit

Permalink
Add a default AST visitor
Browse files Browse the repository at this point in the history
This will allow us to derive other visitors from it and overload only a
few selected visit methods.

gcc/rust/ChangeLog:

	* Make-lang.in: Add the new visitor object file.
	* ast/rust-ast-visitor.h (class DefaultASTVisitor): Create the default
	visitor class.
	* ast/rust-ast.h: Add a new reference getter for visitor pattern.
	* ast/rust-ast-visitor.cc: New file.

Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
  • Loading branch information
P-E-P authored and CohenArthur committed Nov 6, 2023
1 parent ebe2f98 commit 4068593
Show file tree
Hide file tree
Showing 4 changed files with 1,662 additions and 0 deletions.
1 change: 1 addition & 0 deletions gcc/rust/Make-lang.in
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ GRS_OBJS = \
rust/rust-ast-fragment.o \
rust/rust-ast-dump.o \
rust/rust-ast-collector.o \
rust/rust-ast-visitor.o \
rust/rust-hir-dump.o \
rust/rust-session-manager.o \
rust/rust-compile.o \
Expand Down
Loading

0 comments on commit 4068593

Please sign in to comment.