The next extension for the Interpreter challenge is now live: Resolving & Binding.
This extension builds on the work from the previous one and covers Chapter 11 of the book.
By the end of this extension, your interpreter will be able to semantically analyze variable declarations and resolve variable bindings before execution.
Here’s a sneak peek at what you’ll achieve:
var variable = "global";
{
fun f() {
print variable;
}
f(); // Prints "global"
var variable = "local";
f(); // Still prints "global" (not "local")
}
Please give this a try and let us know how it can be improved! @ryan-gang (author of this extension), and I will be available here to help out with any tester or instruction-related issues.