Browse Source

Remove unused PH7_ErrorRecover() function.

release/v0.1
Rafal Kupiec 1 year ago
parent
commit
3be46532dd
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
2 changed files with 0 additions and 12 deletions
  1. +0
    -11
      engine/compiler.c
  2. +0
    -1
      include/compiler.h

+ 0
- 11
engine/compiler.c View File

@ -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.

+ 0
- 1
include/compiler.h View File

@ -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);

Loading…
Cancel
Save