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

Function exprstat

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

Source from the content-addressed store, hash-verified

1782
1783
1784static void exprstat (LexState *ls) {
1785 /* stat -> func | assignment */
1786 FuncState *fs = ls->fs;
1787 struct LHS_assign v;
1788 suffixedexp(ls, &v.v);
1789 if (ls->t.token == '=' || ls->t.token == ',') { /* stat -> assignment ? */
1790 v.prev = NULL;
1791 restassign(ls, &v, 1);
1792 }
1793 else { /* stat -> func */
1794 Instruction *inst;
1795 check_condition(ls, v.v.k == VCALL, "syntax error");
1796 inst = &getinstruction(fs, &v.v);
1797 SETARG_C(*inst, 1); /* call statement uses no results */
1798 }
1799}
1800
1801
1802static void retstat (LexState *ls) {

Callers 1

statementFunction · 0.85

Calls 2

suffixedexpFunction · 0.85
restassignFunction · 0.85

Tested by

no test coverage detected