> Of course in addition to executing an AST you can also generate CODE for it...
Yes! In the third part of the book [1], we'll do exactly that. The C interpreter's parser generates bytecode as it parses. I haven't written the text yet (that's the hard part...) but you can see the code for it here [2].
Yes! In the third part of the book [1], we'll do exactly that. The C interpreter's parser generates bytecode as it parses. I haven't written the text yet (that's the hard part...) but you can see the code for it here [2].
[1]: http://www.craftinginterpreters.com/a-bytecode-virtual-machi...
[2]: https://github.com/munificent/craftinginterpreters/blob/mast...