mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-10-31 22:40:05 +00:00
cparse.c: removed expressionStatement()
This commit is contained in:
parent
105a3d70c3
commit
43d79a456e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user