mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-21 19:03:11 -04:00
accept '-' in TK_Identifier (#1282)
This commit is contained in:
parent
95e71f93c3
commit
2b8ae8f4e4
@ -250,7 +250,7 @@ boolean U_GetNextToken(u_scanner_t* scanner, boolean expandState)
|
||||
cur = scanner->data[scanner->scanPos++];
|
||||
|
||||
// Determine by first character
|
||||
if(cur == '_' || (cur >= 'A' && cur <= 'Z') || (cur >= 'a' && cur <= 'z'))
|
||||
if(cur == '_' || cur == '-' || (cur >= 'A' && cur <= 'Z') || (cur >= 'a' && cur <= 'z'))
|
||||
nextState->token = TK_Identifier;
|
||||
else if(cur >= '0' && cur <= '9')
|
||||
{
|
||||
@ -325,7 +325,7 @@ boolean U_GetNextToken(u_scanner_t* scanner, boolean expandState)
|
||||
default:
|
||||
break;
|
||||
case TK_Identifier:
|
||||
if(cur != '_' && (cur < 'A' || cur > 'Z') && (cur < 'a' || cur > 'z') && (cur < '0' || cur > '9'))
|
||||
if(cur != '_' && cur != '-' && (cur < 'A' || cur > 'Z') && (cur < 'a' || cur > 'z') && (cur < '0' || cur > '9'))
|
||||
end = scanner->scanPos;
|
||||
break;
|
||||
case TK_IntConst:
|
||||
|
Loading…
x
Reference in New Issue
Block a user