MCPcopy
hub / github.com/expr-lang/expr / lookupVariable

Method lookupVariable

compiler/compiler.go:1267–1274  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

1265}
1266
1267func (c *compiler) lookupVariable(name string) (int, bool) {
1268 for i := len(c.scopes) - 1; i >= 0; i-- {
1269 if c.scopes[i].variableName == name {
1270 return c.scopes[i].index, true
1271 }
1272 }
1273 return 0, false
1274}
1275
1276func (c *compiler) ConditionalNode(node *ast.ConditionalNode) {
1277 c.compile(node.Cond)

Callers 1

IdentifierNodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected