MCPcopy Index your code
hub / github.com/yuin/gopher-lua / getIdentRefType

Function getIdentRefType

compile.go:1745–1755  ·  view source on GitHub ↗

}}}

(context *funcContext, current *funcContext, expr *ast.IdentExpr)

Source from the content-addressed store, hash-verified

1743} // }}}
1744
1745func getIdentRefType(context *funcContext, current *funcContext, expr *ast.IdentExpr) expContextType { // {{{
1746 if current == nil {
1747 return ecGlobal
1748 } else if current.FindLocalVar(expr.Value) > -1 {
1749 if current == context {
1750 return ecLocal
1751 }
1752 return ecUpvalue
1753 }
1754 return getIdentRefType(context, current.Parent, expr)
1755} // }}}
1756
1757func getExprName(context *funcContext, expr ast.Expr) string { // {{{
1758 switch ex := expr.(type) {

Callers 3

compileAssignStmtLeftFunction · 0.85
compileExprFunction · 0.85
compileLogicalOpExprAuxFunction · 0.85

Calls 1

FindLocalVarMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…