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

Method CheckRepeatedLabel

code.go:203–209  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

201}
202
203func (f *function) CheckRepeatedLabel(name string) {
204 for _, l := range f.p.activeLabels[f.block.firstLabel:] {
205 if l.name == name {
206 f.semanticError(fmt.Sprintf("label '%s' already defined on line %d", name, l.line))
207 }
208 }
209}
210
211func (f *function) FindGotos(label int) {
212 for i, l := f.block.firstGoto, f.p.activeLabels[label]; i < len(f.p.pendingGotos); {

Callers 1

labelStatementMethod · 0.80

Calls 1

semanticErrorMethod · 0.95

Tested by

no test coverage detected