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

Function primaryexp

depends/lua/src/lparser.c:872–891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870
871
872static void primaryexp (LexState *ls, expdesc *v) {
873 /* primaryexp -> NAME | '(' expr ')' */
874 switch (ls->t.token) {
875 case '(': {
876 int line = ls->linenumber;
877 luaX_next(ls);
878 expr(ls, v);
879 check_match(ls, ')', '(', line);
880 luaK_dischargevars(ls->fs, v);
881 return;
882 }
883 case TK_NAME: {
884 singlevar(ls, v);
885 return;
886 }
887 default: {
888 luaX_syntaxerror(ls, "unexpected symbol");
889 }
890 }
891}
892
893
894static void suffixedexp (LexState *ls, expdesc *v) {

Callers 1

suffixedexpFunction · 0.85

Calls 6

luaX_nextFunction · 0.85
exprFunction · 0.85
check_matchFunction · 0.85
luaK_dischargevarsFunction · 0.85
singlevarFunction · 0.85
luaX_syntaxerrorFunction · 0.85

Tested by

no test coverage detected