(r io.ByteReader, name string)
| 653 | } |
| 654 | |
| 655 | func (l *State) parse(r io.ByteReader, name string) *luaClosure { |
| 656 | p := &parser{scanner: scanner{r: r, lineNumber: 1, lastLine: 1, lookAheadToken: token{t: tkEOS}, l: l, source: name}} |
| 657 | f := &function{f: &prototype{source: name, maxStackSize: 2, isVarArg: true}, constantLookup: make(map[value]int), p: p, jumpPC: noJump} |
| 658 | p.function = f |
| 659 | p.mainFunction() |
| 660 | // TODO assertions about parser state |
| 661 | c := l.newLuaClosure(f.f) |
| 662 | l.push(c) |
| 663 | return c |
| 664 | } |
| 665 | |
| 666 | func (l *State) checkMode(mode, x string) { |
| 667 | if mode != "" && !strings.Contains(mode, x[:1]) { |
no test coverage detected