File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -4125,7 +4125,7 @@ AttributeParser::parse_meta_item_inner ()
4125
4125
skip_token ();
4126
4126
// FIXME: We probably need a Location here as well
4127
4127
return std::unique_ptr<MetaWord> (
4128
- new MetaWord (identifier->as_string ()));
4128
+ new MetaWord (identifier->as_string (), identifier-> get_locus () ));
4129
4129
}
4130
4130
4131
4131
if (peek_token (1 )->get_id () == EQUAL)
@@ -4731,8 +4731,7 @@ MetaItemSeq::to_attribute () const
4731
4731
Attribute
4732
4732
MetaWord::to_attribute () const
4733
4733
{
4734
- // FIXME: How do we get a location here?
4735
- return Attribute (SimplePath::from_str (ident, Location ()), nullptr );
4734
+ return Attribute (SimplePath::from_str (ident, ident_locus), nullptr );
4736
4735
}
4737
4736
4738
4737
Attribute
Original file line number Diff line number Diff line change @@ -759,9 +759,12 @@ class MetaItemSeq : public MetaItem
759
759
class MetaWord : public MetaItem
760
760
{
761
761
Identifier ident;
762
+ Location ident_locus;
762
763
763
764
public:
764
- MetaWord (Identifier ident) : ident (std::move (ident)) {}
765
+ MetaWord (Identifier ident, Location ident_locus)
766
+ : ident (std::move (ident)), ident_locus (ident_locus)
767
+ {}
765
768
766
769
std::string as_string () const override { return ident; }
767
770
You can’t perform that action at this time.
0 commit comments