Support unicode as variables
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -105,7 +105,7 @@ IToken* Lexer::LexNext(char16_t c){
|
||||
case '_':
|
||||
return LexIdentifierOrKeyword();
|
||||
default:
|
||||
if (isalpha(c)){
|
||||
if (isalpha(c) || c > 255){
|
||||
return LexIdentifierOrKeyword();
|
||||
}
|
||||
this -> ScriptData -> Diagnostics -> LogError(DiagnosticCode::UnexpectedCharacter, this -> _position - 1, 1);
|
||||
@@ -185,7 +185,7 @@ IToken * Lexer::LexIdentifierOrKeyword() {
|
||||
while (true){
|
||||
char16_t next = this -> Peek();
|
||||
if (next == '\0') break;
|
||||
if (isalpha(next) || next == '_'){
|
||||
if (isalpha(next) || next == '_' || next > 255){
|
||||
this -> Next();
|
||||
end++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user