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

Method identifierNode

checker/checker.go:249–260  ·  view source on GitHub ↗
(node *ast.IdentifierNode)

Source from the content-addressed store, hash-verified

247}
248
249func (v *Checker) identifierNode(node *ast.IdentifierNode) Nature {
250 for i := len(v.varScopes) - 1; i >= 0; i-- {
251 if v.varScopes[i].name == node.Value {
252 return v.varScopes[i].nature
253 }
254 }
255 if node.Value == "$env" {
256 return Nature{}
257 }
258
259 return v.ident(node, node.Value, v.config.Strict, true)
260}
261
262// ident method returns type of environment variable, builtin or function.
263func (v *Checker) ident(node ast.Node, name string, strict, builtins bool) Nature {

Callers 1

visitMethod · 0.95

Implementers 3

Configconf/config.go
Checkerchecker/checker.go
OperatorOverloadingpatcher/operator_override.go

Calls 1

identMethod · 0.95

Tested by

no test coverage detected