MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / primaryexp

Function primaryexp

lib/lua/src/lparser.c:1081–1100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1079
1080
1081static void primaryexp (LexState *ls, expdesc *v) {
1082 /* primaryexp -> NAME | '(' expr ')' */
1083 switch (ls->t.token) {
1084 case '(': {
1085 int line = ls->linenumber;
1086 luaX_next(ls);
1087 expr(ls, v);
1088 check_match(ls, ')', '(', line);
1089 luaK_dischargevars(ls->fs, v);
1090 return;
1091 }
1092 case TK_NAME: {
1093 singlevar(ls, v);
1094 return;
1095 }
1096 default: {
1097 luaX_syntaxerror(ls, "unexpected symbol");
1098 }
1099 }
1100}
1101
1102
1103static 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