| 808 | |
| 809 | |
| 810 | static void body(LexState *ls, expdesc *e, int ismethod, int line) { |
| 811 | /* body -> '(' parlist ')' block END */ |
| 812 | FuncState new_fs; |
| 813 | BlockCnt bl; |
| 814 | new_fs.f = addprototype(ls); |
| 815 | new_fs.f->linedefined = line; |
| 816 | open_func(ls, &new_fs, &bl); |
| 817 | checknext(ls, '('); |
| 818 | if (ismethod) { |
| 819 | new_localvarliteral(ls, "self"); /* create 'self' parameter */ |
| 820 | adjustlocalvars(ls, 1); |
| 821 | } |
| 822 | parlist(ls); |
| 823 | checknext(ls, ')'); |
| 824 | statlist(ls); |
| 825 | if (ls->L->force_stopping) |
| 826 | return; |
| 827 | new_fs.f->lastlinedefined = ls->linenumber; |
| 828 | check_match(ls, TK_END, TK_FUNCTION, line); |
| 829 | codeclosure(ls, e); |
| 830 | close_func(ls); |
| 831 | } |
| 832 | |
| 833 | |
| 834 | static int explist(LexState *ls, expdesc *v) { |
no test coverage detected