diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-04-26 10:23:45 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-04-28 15:20:47 +0200 |
commit | 06c5f54ccc1b94e0e7025478d3f36ee2eb334bde (patch) | |
tree | 0a46491413f973e62ec9c7914edcdef35a06036d /gcc/rust/resolve/rust-ast-resolve-path.h | |
parent | 821c7947bfd6787fdaaba8dca2f9468661666dcc (diff) | |
download | gcc-06c5f54ccc1b94e0e7025478d3f36ee2eb334bde.zip gcc-06c5f54ccc1b94e0e7025478d3f36ee2eb334bde.tar.gz gcc-06c5f54ccc1b94e0e7025478d3f36ee2eb334bde.tar.bz2 |
ast: resolve: Add SimplePath path resolver
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-path.h')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve-path.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-path.h b/gcc/rust/resolve/rust-ast-resolve-path.h index 60793d3..cbfe967 100644 --- a/gcc/rust/resolve/rust-ast-resolve-path.h +++ b/gcc/rust/resolve/rust-ast-resolve-path.h @@ -31,6 +31,7 @@ class ResolvePath : public ResolverBase public: static void go (AST::PathInExpression *expr, NodeId parent); static void go (AST::QualifiedPathInExpression *expr, NodeId parent); + static void go (AST::SimplePath *expr, NodeId parent); private: ResolvePath (NodeId parent) : ResolverBase (parent) {} @@ -42,12 +43,17 @@ private: void resolve_segments (CanonicalPath prefix, size_t offs, std::vector<AST::PathExprSegment> &segs, NodeId expr_node_id, Location expr_locus); + + void + resolve_simple_path_segments (CanonicalPath prefix, size_t offs, + const std::vector<AST::SimplePathSegment> &segs, + NodeId expr_node_id, Location expr_locus); }; class ResolveSimplePathSegmentToCanonicalPath { public: - static CanonicalPath resolve (AST::SimplePathSegment &seg) + static CanonicalPath resolve (const AST::SimplePathSegment &seg) { // FIXME: Since this is so simple, maybe it can simply be a tiny function? return CanonicalPath::new_seg (seg.get_node_id (), seg.get_segment_name ()); |