From 3be46532ddf418bb40f2c26987e75b07524b74cb Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 24 Apr 2019 23:38:45 +0200 Subject: [PATCH] Remove unused PH7_ErrorRecover() function. --- engine/compiler.c | 11 ----------- include/compiler.h | 1 - 2 files changed, 12 deletions(-) diff --git a/engine/compiler.c b/engine/compiler.c index 7ada30b..0ebc520 100644 --- a/engine/compiler.c +++ b/engine/compiler.c @@ -1174,17 +1174,6 @@ PH7_PRIVATE sxi32 PH7_CompileLiteral(ph7_gen_state *pGen, sxi32 iCompileFlag) { /* Node successfully compiled */ return SXRET_OK; } -/* - * Recover from a compile-time error. In other words synchronize - * the token stream cursor with the first semi-colon seen. - */ -static sxi32 PH7_ErrorRecover(ph7_gen_state *pGen) { - /* Synchronize with the next-semi-colon and avoid compiling this erroneous statement */ - while(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & PH7_TK_SEMI /*';'*/) == 0) { - pGen->pIn++; - } - return SXRET_OK; -} /* * Check if the given identifier name is reserved or not. * Return TRUE if reserved.FALSE otherwise. diff --git a/include/compiler.h b/include/compiler.h index 099d227..4cc9fc7 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -102,7 +102,6 @@ PH7_PRIVATE sxi32 PH7_CompileVariable(ph7_gen_state *pGen, sxi32 iCompileFlag); static sxi32 PH7_GenStateLoadLiteral(ph7_gen_state *pGen); static sxi32 PH7_GenStateResolveNamespaceLiteral(ph7_gen_state *pGen); PH7_PRIVATE sxi32 PH7_CompileLiteral(ph7_gen_state *pGen, sxi32 iCompileFlag); -static sxi32 PH7_ErrorRecover(ph7_gen_state *pGen); static int PH7_GenStateIsReservedConstant(SyString *pName); static sxi32 PH7_CompileConstant(ph7_gen_state *pGen); static sxi32 PH7_CompileContinue(ph7_gen_state *pGen);