Added number literals to Lexer

Also fixed bugs. I really should refactor the mess that is this Lexer.
This commit is contained in:
Pasha Bibko
2025-04-17 13:46:10 +01:00
parent 2f34a23ba2
commit e1fce699da
4 changed files with 97 additions and 47 deletions

View File

@@ -3,9 +3,9 @@
Started lexing file
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Token::IDENTIFIER: int
Token::FUNCTION
Token::IDENTIFIER: main
Token::IDENTIFIER: return
Token::IDENTIFIER: a
Token::NUMBER_LITERAL: 34
Token::ADD
Token::IDENTIFIER: b
Token::NUMBER_LITERAL: 4

View File

@@ -1,2 +1,3 @@
int main
return a## + b
func main
return 34 + 4