From 028f85abf70e231f9517a9f693fb6f3111d3a213 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 22 Mar 2023 13:20:31 +0100 Subject: ast: Refactor and add some Path node visitors Implement some functions for Path nodes and refactor existing ones by merging some common code. gcc/rust/ChangeLog: * ast/rust-ast-tokenstream.cc (TokenStream::visit): Implement visitors. * ast/rust-ast-tokenstream.h: Add function prototypes. * ast/rust-ast.h: Add missing getters. * ast/rust-expr.h: Likewise. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/rust/ast/rust-ast.h') diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 90a5773..a4da389 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -393,6 +393,11 @@ public: std::string as_string () const; + bool get_has_opening_scope_resolution () const + { + return has_opening_scope_resolution; + } + Location get_locus () const { return locus; } NodeId get_node_id () const { return node_id; } -- cgit v1.1