MCPcopy Create free account
hub / github.com/F-Stack/f-stack / body

Function body

freebsd/contrib/openzfs/module/lua/lparser.c:792–811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

simpleexpFunction · 0.70
localfuncFunction · 0.70
funcstatFunction · 0.70

Calls 9

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

Tested by

no test coverage detected