about summary refs log tree commit diff
path: root/users/fcuny/exp/monkey/cmd
diff options
context:
space:
mode:
authorfranck cuny <franck@fcuny.net>2020-01-11 14:40:32 +0100
committerfranck cuny <franck@fcuny.net>2020-01-11 14:40:32 +0100
commit4fb91ad4622e099f798e01873bac914b64ed48f4 (patch)
tree1953ed23ac4c7edb49801db4e70906e0e2545da2 /users/fcuny/exp/monkey/cmd
parenttoken: add tokens for equal and not equal. (diff)
downloadworld-4fb91ad4622e099f798e01873bac914b64ed48f4.tar.gz
lexer: support tokens for equal and not equal.
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.
Diffstat (limited to 'users/fcuny/exp/monkey/cmd')
0 files changed, 0 insertions, 0 deletions