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

Method PrevRange

hclsyntax/peeker.go:65–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63}
64
65func (p *peeker) PrevRange() hcl.Range {
66 if p.NextIndex == 0 {
67 return p.NextRange()
68 }
69
70 return p.Tokens[p.NextIndex-1].Range
71}
72
73func (p *peeker) nextToken() (Token, int) {
74 for i := p.NextIndex; i < len(p.Tokens); i++ {

Callers 4

ParseBodyMethod · 0.80
parseExpressionTermMethod · 0.80

Calls 1

NextRangeMethod · 0.95

Tested by

no test coverage detected