MCPcopy Index your code
hub / github.com/Shopify/go-lua / MakeLocalVariable

Method MakeLocalVariable

code.go:162–167  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

160}
161
162func (f *function) MakeLocalVariable(name string) {
163 r := len(f.f.localVariables)
164 f.f.localVariables = append(f.f.localVariables, localVariable{name: name})
165 f.p.checkLimit(len(f.p.activeVariables)+1-f.firstLocal, maxLocalVariables, "local variables")
166 f.p.activeVariables = append(f.p.activeVariables, r)
167}
168
169func (f *function) MakeGoto(name string, line, pc int) {
170 f.p.pendingGotos = append(f.p.pendingGotos, label{name: name, line: line, pc: pc, activeVariableCount: f.activeVariableCount})

Callers 6

forNumericMethod · 0.80
forListMethod · 0.80
parameterListMethod · 0.80
bodyMethod · 0.80
localFunctionMethod · 0.80
localStatementMethod · 0.80

Calls 1

checkLimitMethod · 0.80

Tested by

no test coverage detected