MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / primaryexp

Function primaryexp

3rd/lua-5.4.3/src/lparser.c:1068–1087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1066
1067
1068static void primaryexp (LexState *ls, expdesc *v) {
1069 /* primaryexp -> NAME | '(' expr ')' */
1070 switch (ls->t.token) {
1071 case '(': {
1072 int line = ls->linenumber;
1073 luaX_next(ls);
1074 expr(ls, v);
1075 check_match(ls, ')', '(', line);
1076 luaK_dischargevars(ls->fs, v);
1077 return;
1078 }
1079 case TK_NAME: {
1080 singlevar(ls, v);
1081 return;
1082 }
1083 default: {
1084 luaX_syntaxerror(ls, "unexpected symbol");
1085 }
1086 }
1087}
1088
1089
1090static 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