aboutsummaryrefslogtreecommitdiff
path: root/users/fcuny/exp/monkey/pkg/lexer/lexer.go (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-10-27ref(users/fcuny): and just like that ...Franck Cuny1-152/+0
2021-05-10lint: fix a few issuesFranck Cuny1-0/+1
2020-01-11lexer: support tokens for equal and not equal.franck cuny1-2/+26
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-11lexer: support more operator tokens.franck cuny1-0/+13
Support the operator tokens that were added to our tokenizer. This also add a few more tests to ensure we handle them correctly.
2020-01-11lexer: initial lexerfranck cuny1-0/+114
The initial lexer for the monkey language. We only support a small subset at this stage. We have some simple tests to ensure that we can parse some small snippet, and that the minimum number of tokens we need are also all supported correctly.