MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / body

Function body

Source/Misc/lua/src/lua.c:8152–8169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8150
8151
8152static void body (LexState *ls, expdesc *e, int needself, int line) {
8153/* body -> `(' parlist `)' chunk END */
8154FuncState new_fs;
8155open_func(ls, &new_fs);
8156new_fs.f->linedefined = line;
8157checknext(ls, '(');
8158if (needself) {
8159new_localvarliteral(ls, "self", 0);
8160adjustlocalvars(ls, 1);
8161}
8162parlist(ls);
8163checknext(ls, ')');
8164chunk(ls);
8165new_fs.f->lastlinedefined = ls->linenumber;
8166check_match(ls, TK_END, TK_FUNCTION, line);
8167close_func(ls);
8168pushclosure(ls, &new_fs, e);
8169}
8170
8171
8172static int explist1 (LexState *ls, expdesc *v) {

Callers 3

simpleexpFunction · 0.85
localfuncFunction · 0.85
funcstatFunction · 0.85

Calls 8

open_funcFunction · 0.85
checknextFunction · 0.85
adjustlocalvarsFunction · 0.85
parlistFunction · 0.85
chunkFunction · 0.85
close_funcFunction · 0.85
pushclosureFunction · 0.85
check_matchFunction · 0.70

Tested by

no test coverage detected