diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-02-18 08:14:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 08:14:30 +0000 |
commit | fbe22e87687c68357430e60361a8a124c81148cc (patch) | |
tree | 72b1cf54a3a6c8ed1584defaa2964e47b10428c9 /gcc/rust/ast/rust-pattern.h | |
parent | 9fb06d66cef70584e7aa2fa3a6ad22ef7def6b84 (diff) | |
parent | 0e15b89839170cb6c9115cfc57310af2170423a0 (diff) | |
download | gcc-fbe22e87687c68357430e60361a8a124c81148cc.zip gcc-fbe22e87687c68357430e60361a8a124c81148cc.tar.gz gcc-fbe22e87687c68357430e60361a8a124c81148cc.tar.bz2 |
Merge #940
940: Add more location info to AST structures r=CohenArthur a=CohenArthur
Two classes still remain locus-less: `TupleStructItems` and `TuplePatternItems` as I do not believe they are constructed at the moment.
Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
Diffstat (limited to 'gcc/rust/ast/rust-pattern.h')
-rw-r--r-- | gcc/rust/ast/rust-pattern.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/ast/rust-pattern.h b/gcc/rust/ast/rust-pattern.h index 3b8dbd7..5d937d7 100644 --- a/gcc/rust/ast/rust-pattern.h +++ b/gcc/rust/ast/rust-pattern.h @@ -848,18 +848,18 @@ class StructPattern : public Pattern // bool has_struct_pattern_elements; StructPatternElements elems; - // TODO: should this store location data? Accessor uses path location data. NodeId node_id; + Location locus; public: std::string as_string () const override; // Constructs a struct pattern from specified StructPatternElements - StructPattern (PathInExpression struct_path, + StructPattern (PathInExpression struct_path, Location locus, StructPatternElements elems = StructPatternElements::create_empty ()) : path (std::move (struct_path)), elems (std::move (elems)), - node_id (Analysis::Mappings::get ()->get_next_node_id ()) + node_id (Analysis::Mappings::get ()->get_next_node_id ()), locus (locus) {} /* TODO: constructor to construct via elements included in |