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

Method constructor

parser.go:82–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80}
81
82func (p *parser) constructor() exprDesc {
83 pc, t := p.function.OpenConstructor()
84 line, a, h, pending := p.lineNumber, 0, 0, 0
85 var e exprDesc
86 if p.checkNext('{'); p.t != '}' {
87 for a, h, pending, e = p.field(t.info, a, h, pending, e); (p.testNext(',') || p.testNext(';')) && p.t != '}'; {
88 if e.kind != kindVoid {
89 pending = p.function.FlushToConstructor(t.info, pending, a, e)
90 e.kind = kindVoid
91 }
92 a, h, pending, e = p.field(t.info, a, h, pending, e)
93 }
94 }
95 p.checkMatch('}', '{', line)
96 p.function.CloseConstructor(pc, t.info, pending, a, h, e)
97 return t
98}
99
100func (p *parser) functionArguments(f exprDesc, line int) exprDesc {
101 var args exprDesc

Callers 2

functionArgumentsMethod · 0.95
simpleExpressionMethod · 0.95

Calls 7

checkNextMethod · 0.95
fieldMethod · 0.95
OpenConstructorMethod · 0.80
testNextMethod · 0.80
FlushToConstructorMethod · 0.80
checkMatchMethod · 0.80
CloseConstructorMethod · 0.80

Tested by

no test coverage detected