Added true and false to bgLex

bgLex no recognized true (LSYM_TRUE) and false (LSYM_FALSE)
This commit is contained in:
Walter Julius Hennecke 2013-04-28 19:29:44 +02:00
parent 60ed122ce0
commit 2d32fcecba
3 changed files with 18 additions and 0 deletions

View file

@ -15,6 +15,8 @@ typedef enum {
LSYM_CBRACE, /* ) */
LSYM_CBRACEC, /* } */
LSYM_CBRACESQ, /* ] */
LSYM_TRUE,
LSYM_FALSE,
LSYM_SERVER_CHANGE_CONFIG,
LSYM_SERVER,
LSYM_HOLODECK_DATA,

View file

@ -978,6 +978,14 @@ bgLexSymbol bgLex_textToSymbol(char* text) {
return LSYM_ADMIRAL_RANK;
}
if(strcmp("true", text) == 0) {
return LSYM_TRUE;
}
if(strcmp("false", text) == 0) {
return LSYM_FALSE;
}
return LSYM_UNKNOWN;
}

View file

@ -3382,6 +3382,14 @@ bgLexSymbol bgLex_textToSymbol(char* text) {
return LSYM_ADMIRAL_RANK;
}
if(strcmp("true", text) == 0) {
return LSYM_TRUE;
}
if(strcmp("false", text) == 0) {
return LSYM_FALSE;
}
return LSYM_UNKNOWN;
}