fix(lexer): add false, true and null keywords

This commit is contained in:
2026-02-05 14:33:20 +01:00
parent 51eb540b3c
commit 045ac574bb
2 changed files with 5 additions and 1 deletions

View File

@@ -10,5 +10,8 @@ KEYWORDS: dict[str, TokenType] = {
"while": TokenType.WHILE,
"from": TokenType.FROM,
"to": TokenType.TO,
"by": TokenType.BY
"by": TokenType.BY,
"false": TokenType.FALSE,
"true": TokenType.TRUE,
"null": TokenType.NULL,
}

View File

@@ -40,6 +40,7 @@ class TokenType(Enum):
NUMBER = auto()
TRUE = auto()
FALSE = auto()
NULL = auto()
# Keywords
LET = auto()