I'm currently reading this beautiful book, and was a bit curious about this task:
Add support to Lox’s scanner for C-style / ... / block comments. Make sure to handle newlines in them. Consider allowing them to nest. Is adding support for nesting more work than you expected? Why?
I managed to do it without additional variable tracking nesting.
In Java:
I'm currently reading this beautiful book, and was a bit curious about this task:
I managed to do it without additional variable tracking nesting. In Java:
Is recursion considered additional state? Or my implementation is just wrong?