aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast-tokenstream.h
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-03-22 16:17:42 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2023-03-30 16:48:26 +0200
commitbea0c13139d48294d26f0a72401d6e3fb6a48d77 (patch)
treef80064e37b2136b0c27321acc510f697f0409386 /gcc/rust/ast/rust-ast-tokenstream.h
parentf9fcd37d055c8e46aaecfa4a5af91e0108670c17 (diff)
downloadgcc-bea0c13139d48294d26f0a72401d6e3fb6a48d77.zip
gcc-bea0c13139d48294d26f0a72401d6e3fb6a48d77.tar.gz
gcc-bea0c13139d48294d26f0a72401d6e3fb6a48d77.tar.bz2
ast: Add Tokenstream visitors for loop expressions
Add the implementation of tokenstream dump for multiple loop expressions. gcc/rust/ChangeLog: * ast/rust-ast-tokenstream.cc (TokenStream::visit): Add visitors. (TokenStream::visit_loop_common): Merge common loop code. * ast/rust-ast-tokenstream.h: Add function prototypes. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/ast/rust-ast-tokenstream.h')
-rw-r--r--gcc/rust/ast/rust-ast-tokenstream.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-tokenstream.h b/gcc/rust/ast/rust-ast-tokenstream.h
index 58b90fb..c8a6982 100644
--- a/gcc/rust/ast/rust-ast-tokenstream.h
+++ b/gcc/rust/ast/rust-ast-tokenstream.h
@@ -94,6 +94,9 @@ private:
void visit_function_common (std::unique_ptr<Type> &return_type,
std::unique_ptr<BlockExpr> &block);
+ void visit_loop_common (BaseLoopExpr &expr);
+ void visit (LoopLabel &label);
+
void visit (Literal &lit, Location locus = {});
void visit (FunctionParam &param);