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

Function exprstat

lib/lua/src/lparser.c:1795–1810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1793
1794
1795static void exprstat (LexState *ls) {
1796 /* stat -> func | assignment */
1797 FuncState *fs = ls->fs;
1798 struct LHS_assign v;
1799 suffixedexp(ls, &v.v);
1800 if (ls->t.token == '=' || ls->t.token == ',') { /* stat -> assignment ? */
1801 v.prev = NULL;
1802 restassign(ls, &v, 1);
1803 }
1804 else { /* stat -> func */
1805 Instruction *inst;
1806 check_condition(ls, v.v.k == VCALL, "syntax error");
1807 inst = &getinstruction(fs, &v.v);
1808 SETARG_C(*inst, 1); /* call statement uses no results */
1809 }
1810}
1811
1812
1813static void retstat (LexState *ls) {

Callers 1

statementFunction · 0.85

Calls 2

suffixedexpFunction · 0.85
restassignFunction · 0.85

Tested by

no test coverage detected