Skip to content

zhjngli/rustlox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rustlox

following: https://craftinginterpreters.com/

proof of concepts

Implemented a hashmap!

changes to (tree-walk interpreted) Lox

  1. add support for lists (usage)
  2. add static methods to classes using metaclasses (usage)
  3. add getter methods to classes (usage)
  4. add hash native function (usage)
  5. support modulus % operator
  6. allow for nested block comments: /* ... /* ... */ ... */
  7. variables must be initialized before accessed (they don't default to nil)
  8. disallow division by 0
  9. when the left operand of + is a string, cast right operands into strings
  10. add break statements (usage). didn't add continue, it's a little more troublesome since it requires desugaring the for loop and performing the increment when the loop hits a continue.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages