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

Function field

depends/lua/src/lparser.c:703–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701
702
703static void field (LexState *ls, struct ConsControl *cc) {
704 /* field -> listfield | recfield */
705 switch(ls->t.token) {
706 case TK_NAME: { /* may be 'listfield' or 'recfield' */
707 if (luaX_lookahead(ls) != '=') /* expression? */
708 listfield(ls, cc);
709 else
710 recfield(ls, cc);
711 break;
712 }
713 case '[': {
714 recfield(ls, cc);
715 break;
716 }
717 default: {
718 listfield(ls, cc);
719 break;
720 }
721 }
722}
723
724
725static void constructor (LexState *ls, expdesc *t) {

Callers 3

CopyToMethod · 0.85
DebugStringMethod · 0.85
constructorFunction · 0.85

Calls 3

luaX_lookaheadFunction · 0.85
listfieldFunction · 0.85
recfieldFunction · 0.85

Tested by

no test coverage detected