MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / body

Function body

third-party/lua-5.2.4/src/lparser.c:788–807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

786
787
788static void body (LexState *ls, expdesc *e, int ismethod, int line) {
789 /* body -> `(' parlist `)' block END */
790 FuncState new_fs;
791 BlockCnt bl;
792 new_fs.f = addprototype(ls);
793 new_fs.f->linedefined = line;
794 open_func(ls, &new_fs, &bl);
795 checknext(ls, '(');
796 if (ismethod) {
797 new_localvarliteral(ls, "self"); /* create 'self' parameter */
798 adjustlocalvars(ls, 1);
799 }
800 parlist(ls);
801 checknext(ls, ')');
802 statlist(ls);
803 new_fs.f->lastlinedefined = ls->linenumber;
804 check_match(ls, TK_END, TK_FUNCTION, line);
805 codeclosure(ls, e);
806 close_func(ls);
807}
808
809
810static int explist (LexState *ls, expdesc *v) {

Callers 3

simpleexpFunction · 0.70
localfuncFunction · 0.70
funcstatFunction · 0.70

Calls 9

addprototypeFunction · 0.70
open_funcFunction · 0.70
checknextFunction · 0.70
adjustlocalvarsFunction · 0.70
parlistFunction · 0.70
statlistFunction · 0.70
check_matchFunction · 0.70
codeclosureFunction · 0.70
close_funcFunction · 0.70

Tested by

no test coverage detected