MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / primaryexp

Function primaryexp

xrepo/packages/l/lua/port/lua/src/lparser.c:1079–1098  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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