Browse Source

Only identifiers should be allowed as constant name.

release/v0.1
Rafal Kupiec 1 year ago
parent
commit
d3ae1c1bf4
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      engine/compiler.c

+ 1
- 1
engine/compiler.c View File

@ -1351,7 +1351,7 @@ static sxi32 PH7_CompileConstant(ph7_gen_state *pGen) {
char *zName;
sxi32 rc;
pGen->pIn++; /* Jump the 'const' keyword */
if(pGen->pIn >= pGen->pEnd || (pGen->pIn->nType & (PH7_TK_SSTR | PH7_TK_DSTR | PH7_TK_ID | PH7_TK_KEYWORD)) == 0) {
if(pGen->pIn >= pGen->pEnd || (pGen->pIn->nType & PH7_TK_ID) == 0) {
/* Invalid constant name */
PH7_GenCompileError(pGen, E_ERROR, nLine, "const: Invalid constant name");
}

Loading…
Cancel
Save