]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Add a default AST visitor
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 25 Oct 2023 14:56:09 +0000 (16:56 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:13:11 +0000 (19:13 +0100)
commit5a9c2732d5d9bff9710466e039105cf29e35405d
treec7e639b658a3e8eaf40e4a036c7d5aaf50a512ce
parent7065e2dbfee8bd4088c8361158420b6667dfb8ff
gccrs: Add a default AST visitor

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 <pierre-emmanuel.patry@embecosm.com>
gcc/rust/Make-lang.in
gcc/rust/ast/rust-ast-visitor.cc [new file with mode: 0644]
gcc/rust/ast/rust-ast-visitor.h
gcc/rust/ast/rust-ast.h