Implements inequality token
This commit is contained in:
@@ -62,6 +62,13 @@ IToken* Lexer::LexNext(char c){
|
||||
return new SimpleToken(TokenKind::EqualityToken, this -> Position - 2, 2);
|
||||
}
|
||||
return new SimpleToken(TokenKind::AssignmentToken, this -> Position - 1, 1);
|
||||
case '~':
|
||||
if (Lexer::Peek() == '='){
|
||||
Lexer::Next();
|
||||
return new SimpleToken(TokenKind::InequalityToken, this -> Position - 2, 2);
|
||||
}
|
||||
this -> ScriptData -> Diagnostics -> LogError(DiagnosticCode::UnexpectedCharacter, this -> Position - 1, 1);
|
||||
return new SimpleToken(TokenKind::BadToken, this -> Position - 1, 1);
|
||||
case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
|
||||
return LexNumber(c);
|
||||
case '"':
|
||||
|
||||
Reference in New Issue
Block a user