MCPcopy
hub / github.com/hashicorp/hcl / ContainsPos

Method ContainsPos

pos.go:109–111  ·  view source on GitHub ↗

ContainsPos returns true if and only if the given position is contained within the receiving range. In the unlikely case that the line/column information disagree with the byte offset information in the given position or receiving range, the byte offsets are given priority.

(pos Pos)

Source from the content-addressed store, hash-verified

107// offset information in the given position or receiving range, the byte
108// offsets are given priority.
109func (r Range) ContainsPos(pos Pos) bool {
110 return r.ContainsOffset(pos.Byte)
111}
112
113// ContainsOffset returns true if and only if the given byte offset is within
114// the receiving Range.

Callers 4

blocksAtPosMethod · 0.80
outermostBlockAtPosMethod · 0.80
attributeAtPosMethod · 0.80
OutermostExprAtPosMethod · 0.80

Calls 1

ContainsOffsetMethod · 0.95

Tested by

no test coverage detected