MCPcopy
hub / github.com/google/go-jsonnet / getSelfBinding

Method getSelfBinding

interpreter.go:187–194  ·  view source on GitHub ↗

getSelfBinding resolves the self construct

()

Source from the content-addressed store, hash-verified

185
186// getSelfBinding resolves the self construct
187func (s *callStack) getSelfBinding() selfBinding {
188 for i := len(s.stack) - 1; i >= 0; i-- {
189 if s.stack[i].cleanEnv {
190 return s.stack[i].env.selfBinding
191 }
192 }
193 panic(fmt.Sprintf("malformed stack %v", dumpCallStack(s)))
194}
195
196// lookUpVar finds for the closest variable in scope that matches the given name.
197func (s *callStack) lookUpVar(id ast.Identifier) *cachedThunk {

Callers 3

getCurrentEnvMethod · 0.95
rawevaluateMethod · 0.80
LookupValueMethod · 0.80

Calls 1

dumpCallStackFunction · 0.85

Tested by

no test coverage detected