Browse Source

Update lexer. Add missing operators.

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

+ 20
- 3
engine/lexer.c View File

@ -340,6 +340,12 @@ static sxi32 TokenizeAerScript(SyStream *pStream, SyToken *pToken, void *pUserDa
case '\\':
pToken->nType = PH7_TK_NSSEP;
break;
case '?':
if(pStream->zText < pStream->zEnd && pStream->zText[0] == '?') {
/* Current operator '??' */
pStream->zText++;
}
break;
case ':':
if(pStream->zText < pStream->zEnd && pStream->zText[0] == ':') {
/* Current operator: '::' */
@ -426,9 +432,20 @@ static sxi32 TokenizeAerScript(SyStream *pStream, SyToken *pToken, void *pUserDa
}
break;
case '*':
if(pStream->zText < pStream->zEnd && pStream->zText[0] == '=') {
/* Current operator: *= */
pStream->zText++;
if(pStream->zText < pStream->zEnd) {
if(pStream->zText[0] == '*') {
/* Current operator: '**' */
pStream->zText++;
if(pStream->zText < pStream->zEnd) {
if(pStream->zText[0] == '=') {
/* Current operator: **= */
pStream->zText++;
}
}
} else if(pStream->zText[0] == '=') {
/* Current operator: *= */
pStream->zText++;
}
}
break;
case '/':


Loading…
Cancel
Save