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

Method PopIncludeNewlines

hclsyntax/peeker.go:141–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

139}
140
141func (p *peeker) PopIncludeNewlines() bool {
142 stack := p.IncludeNewlinesStack
143 remain, ret := stack[:len(stack)-1], stack[len(stack)-1]
144 p.IncludeNewlinesStack = remain
145
146 if tracePeekerNewlinesStack {
147 // Record who called us so that we can more easily track down any
148 // mismanagement of the stack in the parser.
149 callers := []uintptr{0}
150 runtime.Callers(2, callers)
151 frames := runtime.CallersFrames(callers)
152 frame, _ := frames.Next()
153 p.newlineStackChanges = append(p.newlineStackChanges, peekerNewlineStackChange{
154 false, frame, ret,
155 })
156 }
157
158 return ret
159}
160
161// AssertEmptyNewlinesStack checks if the IncludeNewlinesStack is empty, doing
162// panicking if it is not. This can be used to catch stack mismanagement that

Callers 11

parseTemplatePartsMethod · 0.80
parseExpressionTermMethod · 0.80
parseTupleConsMethod · 0.80
parseObjectConsMethod · 0.80
finishParsingForExprMethod · 0.80
ParseExpressionFunction · 0.80
ParseTraversalAbsFunction · 0.80
ParseTraversalPartialFunction · 0.80
TestPeekerFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestPeekerFunction · 0.64