MCPcopy Create free account
hub / github.com/DFHack/dfhack / localstat

Function localstat

depends/lua/src/lparser.c:1443–1460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1441
1442
1443static void localstat (LexState *ls) {
1444 /* stat -> LOCAL NAME {',' NAME} ['=' explist] */
1445 int nvars = 0;
1446 int nexps;
1447 expdesc e;
1448 do {
1449 new_localvar(ls, str_checkname(ls));
1450 nvars++;
1451 } while (testnext(ls, ','));
1452 if (testnext(ls, '='))
1453 nexps = explist(ls, &e);
1454 else {
1455 e.k = VVOID;
1456 nexps = 0;
1457 }
1458 adjust_assign(ls, nvars, nexps, &e);
1459 adjustlocalvars(ls, nvars);
1460}
1461
1462
1463static int funcname (LexState *ls, expdesc *v) {

Callers 1

statementFunction · 0.85

Calls 6

new_localvarFunction · 0.85
str_checknameFunction · 0.85
testnextFunction · 0.85
explistFunction · 0.85
adjust_assignFunction · 0.85
adjustlocalvarsFunction · 0.85

Tested by

no test coverage detected