From 4f2f07943d639f1635cf3dfd092ad27ca050ba65 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Mon, 17 Apr 2023 18:26:03 +0200 Subject: ast: Fix tokenstream QualifiedPathInExpression The associated type was not kept in the tokenstream. gcc/rust/ChangeLog: * ast/rust-ast-tokenstream.cc (TokenStream::visit): Keep associated type. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast-tokenstream.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc') diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc index 67b122a..92654dc 100644 --- a/gcc/rust/ast/rust-ast-tokenstream.cc +++ b/gcc/rust/ast/rust-ast-tokenstream.cc @@ -745,8 +745,10 @@ TokenStream::visit (PathIdentSegment &segment) void TokenStream::visit (QualifiedPathInExpression &path) { + visit (path.get_qualified_path_type ()); for (auto &segment : path.get_segments ()) { + tokens.push_back (Rust::Token::make (SCOPE_RESOLUTION, Location ())); visit (segment); } } -- cgit v1.1