From 43d79a456ee6f01f0d988e1f8b043fb58284af41 Mon Sep 17 00:00:00 2001 From: cpunch Date: Thu, 28 Dec 2023 23:27:08 -0600 Subject: [PATCH] cparse.c: removed expressionStatement() --- src/cparse.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/cparse.c b/src/cparse.c index 3e1ada4..c7553a8 100644 --- a/src/cparse.c +++ b/src/cparse.c @@ -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