MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / body

Function body

xrepo/packages/l/lua/port/lua/src/lparser.c:989–1008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987
988
989static void body (LexState *ls, expdesc *e, int ismethod, int line) {
990 /* body -> '(' parlist ')' block END */
991 FuncState new_fs;
992 BlockCnt bl;
993 new_fs.f = addprototype(ls);
994 new_fs.f->linedefined = line;
995 open_func(ls, &new_fs, &bl);
996 checknext(ls, '(');
997 if (ismethod) {
998 new_localvarliteral(ls, "self"); /* create 'self' parameter */
999 adjustlocalvars(ls, 1);
1000 }
1001 parlist(ls);
1002 checknext(ls, ')');
1003 statlist(ls);
1004 new_fs.f->lastlinedefined = ls->linenumber;
1005 check_match(ls, TK_END, TK_FUNCTION, line);
1006 codeclosure(ls, e);
1007 close_func(ls);
1008}
1009
1010
1011static int explist (LexState *ls, expdesc *v) {

Callers 3

simpleexpFunction · 0.70
localfuncFunction · 0.70
funcstatFunction · 0.70

Calls 9

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

Tested by

no test coverage detected