Skip to content

Monkey interpreter written in Rust (follows "Writing An Interpreter In Go")

Notifications You must be signed in to change notification settings

ethanniser/rust-monkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monkey interpreter in rust following the book https://interpreterbook.com/

made some additions and modifications from the book:

  • added ||, &&, // and % operators
  • reassigment of variables
  • exit and env repl commands
  • semicolons are significant: semicolon = statement, statements = none. No semicolon = expression, expressions = a value
  • blocks ({}) are expressions, they evaluate to the last expression in the block (or a return statement if there is one), however they do not introduce a new scope
  • added standard library of code that is loaded at the start of the repl (map, filter, reduce, sum)
  • type builtin function to get the type of a value
  • probably more stuff I forgot

About

Monkey interpreter written in Rust (follows "Writing An Interpreter In Go")

Resources

Stars

Watchers

Forks

Languages