~tristan957/monkey

An interpreter for the Monkey programming language
Get rid of unnecessary cast
Expand Span comment
Add ability to create lexer from io.Reader

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~tristan957/monkey
read/write
git@git.sr.ht:~tristan957/monkey

You can also use your local clone with git send-email.

builds.sr.ht status

#Monkey

An interpreter for the Monkey programming language.

#Customizations

  • The lexer operates on buffered I/O instead of reading the entire input as a string. This saves on memory usage.
  • Tokens have spans associated with them, so in the case of unknown input, the interpreter can report line and column numbers. Spans mark the beginning and end of a token.
  • Added binary, octal, and hexadecimal integer literal support.
    • 0b0101
    • 0o1234
    • 0xffa4
  • _ support in number literals. Helps when visually parsing numbers.
    • 0b101_101
    • 20_000
Do not follow this link