3 ms·
Thanks for this article, dolftax! I followed all the examples on my machine with no problem, and I learned some new stuff. I have a question: how difficult is
by pwaivers 6y ago
Thanks for this article, dolftax! I followed all the examples on my machine with no problem, and I learned some new stuff.
I have a question: how difficult is it to implement the ast? It seems like that the bulk of the work for this static code analysis.
- saagarjha 6y agoFor this kind of (read: simple) static analysis, yes, the design and generation of the AST is the dominant factor. For more advanced techniques usually you'd start with an AST directly to not have to deal with parsing and then work on that.
- rj722 6y ago"Crafting Interpreters" by by Bob Nystrom (https://craftinginterpreters.com https://craftinginterpreters.com). Although the book falls short in covering static analysis (obviously), implementation of ast is covered in detail.