json: include NameRange and ExprRange in returned attributes
This commit is contained in:
parent
d2c9089812
commit
8883fb76ce
@ -68,6 +68,8 @@ func (b *body) PartialContent(schema *zcl.BodySchema) (*zcl.BodyContent, zcl.Bod
|
|||||||
Name: attrS.Name,
|
Name: attrS.Name,
|
||||||
Expr: &expression{src: jsonAttr.Value},
|
Expr: &expression{src: jsonAttr.Value},
|
||||||
Range: zcl.RangeBetween(jsonAttr.NameRange, jsonAttr.Value.Range()),
|
Range: zcl.RangeBetween(jsonAttr.NameRange, jsonAttr.Value.Range()),
|
||||||
|
NameRange: jsonAttr.NameRange,
|
||||||
|
ExprRange: jsonAttr.Value.Range(),
|
||||||
}
|
}
|
||||||
usedNames[attrS.Name] = struct{}{}
|
usedNames[attrS.Name] = struct{}{}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user