diff options
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-path.h')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve-path.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-path.h b/gcc/rust/resolve/rust-ast-resolve-path.h index 7a4413b..60793d3 100644 --- a/gcc/rust/resolve/rust-ast-resolve-path.h +++ b/gcc/rust/resolve/rust-ast-resolve-path.h @@ -37,12 +37,23 @@ private: void resolve_path (AST::PathInExpression *expr); void resolve_path (AST::QualifiedPathInExpression *expr); + void resolve_path (AST::SimplePath *expr); void resolve_segments (CanonicalPath prefix, size_t offs, std::vector<AST::PathExprSegment> &segs, NodeId expr_node_id, Location expr_locus); }; +class ResolveSimplePathSegmentToCanonicalPath +{ +public: + static CanonicalPath resolve (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 ()); + } +}; + } // namespace Resolver } // namespace Rust |