about summary refs log tree commit diff
path: root/users/fcuny/exp/monkey (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-05-10git: ignore binary for the REPLFranck Cuny1-0/+1
2020-01-11repl: support a simple REPL for some early testingfranck cuny2-0/+41
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.
2020-01-11lexer: support tokens for equal and not equal.franck cuny2-2/+39
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.
2020-01-11token: add tokens for equal and not equal.franck cuny1-0/+3
2020-01-11lexer: test the new keywords are parsed correctly.franck cuny1-3/+25
Ensure that the new keywords added (`if`, `else`, `true`, `false`, `return`) are parsed correctly.
2020-01-11token: support more keywordsfranck cuny1-2/+13
Add support for a few more keywords (`true`, `false`, `if`, `else`, `return`). All keywords are grouped together in the constant declaration.
2020-01-11token: rewrite documentation for `LookupIdent`.franck cuny1-3/+4
2020-01-11lexer: delete redundant test.franck cuny1-32/+1
The test `TestNextTokenBa