]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Add a new visitor that gathers context information
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 26 Oct 2023 11:26:13 +0000 (13:26 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:13:11 +0000 (19:13 +0100)
commitddcd4c96757d1f9a962b24eca61cac3f8068a155
tree752fa8f06a83e11ed791df0024d3bfe407842f09
parent5a9c2732d5d9bff9710466e039105cf29e35405d
gccrs: Add a new visitor that gathers context information

This visitor is intended to be used by other visitors that require
context at some point for a given item.

gcc/rust/ChangeLog:

* ast/rust-ast-visitor.cc (ContextualASTVisitor::visit): Add multiple
context saving calls.
* ast/rust-ast-visitor.h (class DefaultASTVisitor): Make visit
functions virtual.
(class ContextualASTVisitor): Add a stack like container for the
current context chain.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-visitor.cc
gcc/rust/ast/rust-ast-visitor.h