Skip to content

Commit

Permalink
Add RangePtr to body content
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Nov 21, 2022
1 parent ac45ab4 commit f3a97bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions decoder/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ type blockContent struct {
type bodyContent struct {
Attributes hcl.Attributes
Blocks []*blockContent
RangePtr *hcl.Range
}

// decodeBody produces content of either HCL or JSON body
Expand Down Expand Up @@ -131,6 +132,8 @@ func decodeBody(body hcl.Body, bodySchema *schema.BodySchema) bodyContent {
})
}

content.RangePtr = hclBody.Range().Ptr()

return content
}

Expand Down

0 comments on commit f3a97bb

Please sign in to comment.