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

Method body

parser.go:533–546  ·  view source on GitHub ↗
(isMethod bool, line int)

Source from the content-addressed store, hash-verified

531}
532
533func (p *parser) body(isMethod bool, line int) exprDesc {
534 p.function.OpenFunction(line)
535 p.checkNext('(')
536 if isMethod {
537 p.function.MakeLocalVariable("self")
538 p.function.AdjustLocalVariables(1)
539 }
540 p.parameterList()
541 p.checkNext(')')
542 p.statementList()
543 p.function.f.lastLineDefined = p.lineNumber
544 p.checkMatch(tkEnd, tkFunction, line)
545 return p.function.CloseFunction()
546}
547
548func (p *parser) functionName() (e exprDesc, isMethod bool) {
549 for e = p.singleVariable(); p.t == '.'; e = p.fieldSelector(e) {

Callers 3

simpleExpressionMethod · 0.95
functionStatementMethod · 0.95
localFunctionMethod · 0.95

Calls 8

checkNextMethod · 0.95
parameterListMethod · 0.95
statementListMethod · 0.95
OpenFunctionMethod · 0.80
MakeLocalVariableMethod · 0.80
AdjustLocalVariablesMethod · 0.80
checkMatchMethod · 0.80
CloseFunctionMethod · 0.80

Tested by

no test coverage detected