cpplox
cpplox copied to clipboard
Following Nystrom's book Crafting Interpreters, implemented in C++.
When you call a method, it starts at the top of the class hierarchy and works down. A superclass method wins over a subclass method. In order to get to...
Only methods on the class can access the raw fields.
Members on a class that look like field reads and writes but that actually execute user-defined code.
Hint: Make LoxClass extend LoxInstance and go from there.
It should be a syntax error to have a break statement appear outside of any enclosing loop.
If they enter a statement, execute it. If they enter an expression, evaluate it and display the result value.
Give them the same precedence and associativity as in C.
Make sure to handle newlines in them. Consider allowing them to nest.