| 574 | |
| 575 | |
| 576 | static void body (LexState *ls, expdesc *e, int needself, int line) { |
| 577 | /* body -> `(' parlist `)' chunk END */ |
| 578 | FuncState new_fs; |
| 579 | open_func(ls, &new_fs); |
| 580 | new_fs.f->linedefined = line; |
| 581 | checknext(ls, '('); |
| 582 | if (needself) { |
| 583 | new_localvarliteral(ls, "self", 0); |
| 584 | adjustlocalvars(ls, 1); |
| 585 | } |
| 586 | parlist(ls); |
| 587 | checknext(ls, ')'); |
| 588 | chunk(ls); |
| 589 | new_fs.f->lastlinedefined = ls->linenumber; |
| 590 | check_match(ls, TK_END, TK_FUNCTION, line); |
| 591 | close_func(ls); |
| 592 | pushclosure(ls, &new_fs, e); |
| 593 | } |
| 594 | |
| 595 | |
| 596 | static int explist1 (LexState *ls, expdesc *v) { |
no test coverage detected