feat(lexer): Scan empty string

This commit is contained in:
Tibo De Peuter 2025-03-27 11:04:31 +01:00
parent 4054ed5fce
commit f72501fde2
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
5 changed files with 45 additions and 0 deletions

11
src/lexer/Lexer.kt Normal file
View file

@ -0,0 +1,11 @@
package lexer
class Lexer {
fun scan(source: String): List<Token> {
if (source.isEmpty()) {
return listOf(Token(TokenType.EOF, LexerPosition(1, 1, 0)))
}
return emptyList()
}
}