cparse.c: removed expressionStatement()

This commit is contained in:
cpunch 2023-12-28 23:27:08 -06:00
parent 105a3d70c3
commit 43d79a456e
1 changed files with 2 additions and 7 deletions

View File

@ -1589,7 +1589,7 @@ static void forLoop(CParseState *pstate)
// parse initializer
if (!match(pstate, TOKEN_EOS)) {
expressionStatement(pstate);
statement(pstate);
consume(pstate, TOKEN_EOS, "Expected ';' after initializer");
}
@ -1705,7 +1705,7 @@ static int expression(CParseState *pstate, int needed, bool forceNeeded)
forceNeeded); // anything above assignments are an expression
}
static void expressionStatement(CParseState *pstate)
static void statement(CParseState *pstate)
{
int savedPushed = pstate->compiler->pushedValues;
@ -1760,11 +1760,6 @@ static void expressionStatement(CParseState *pstate)
alignStack(pstate, savedPushed);
}
static void statement(CParseState *pstate)
{
expressionStatement(pstate);
}
static CObjFunction *endCompiler(CParseState *pstate)
{
popLocals(pstate, pstate->compiler->scopeDepth + 1); // remove the locals from other scopes