| Commit message (Collapse) | Author | Files | Lines |
|
|
|
The REPL reads the input, send it to the lexer, and prints the token to
STDOUT. For now nothing else is done since we still don't parse the
tokens.
|
|
The tokens for equal (`==`) and not equal (`!=`) are composed of two
characters. We introduce a new helper (`peekChar`) that we use when we
encounter the token `=` or `!` to see if this is a token composed of two
characters.
Add some tests to ensure they are parsed correctly.
|
|
|
|
Ensure that the new keywords added (`if`, `else`, `true`, `false`,
`return`) are parsed correctly.
|
|
Add support for a few more keywords (`true`, `false`, `if`, `else`,
`return`).
All keywords are grouped together in the constant declaration.
|
|
|
|
The test `TestNextTokenBa |