MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / body

Function body

deps/lua/src/lparser.c:576–593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574
575
576static 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
596static 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
check_matchFunction · 0.85
close_funcFunction · 0.85
pushclosureFunction · 0.85

Tested by

no test coverage detected