MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / localfunc

Function localfunc

3rd/lua-5.4.3/src/lparser.c:1677–1686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1675
1676
1677static void localfunc (LexState *ls) {
1678 expdesc b;
1679 FuncState *fs = ls->fs;
1680 int fvar = fs->nactvar; /* function's variable index */
1681 new_localvar(ls, str_checkname(ls)); /* new local variable */
1682 adjustlocalvars(ls, 1); /* enter its scope */
1683 body(ls, &b, 0, ls->linenumber); /* function created in next register */
1684 /* debug information will only see the variable after this point! */
1685 localdebuginfo(fs, fvar)->startpc = fs->pc;
1686}
1687
1688
1689static int getlocalattribute (LexState *ls) {

Callers 1

statementFunction · 0.85

Calls 5

new_localvarFunction · 0.85
str_checknameFunction · 0.85
adjustlocalvarsFunction · 0.85
bodyFunction · 0.85
localdebuginfoFunction · 0.85

Tested by

no test coverage detected