28.07.2016, 15:25
With ~100 second compile times and the astounding ability to miss semicolons and other basic syntax after almost a decade of writing this language I am considering writing a static analysis tool for Pawn (most likely as a Sublime Text plugin).
This idea is actually mostly just for the experience of writing code to parse code (which I have done in the past, but I didn't use tokenisation or an AST) that's scope-aware.
The first bit would be to write a Pawn AST parser that's #include aware, function aware, recursion aware and a few other things. Next, I'd work on variable detection, "type" (tag) checking and small stuff.
I'd love to have some feedback from the community about this (if you all still exist of course!) would you use an analysis tool? (I'd probably write it regardless, it sounds fun... somehow) Have any of you experienced working with parsing source code or writing compilers (admittedly not totally related but still somewhat) before?
This idea is actually mostly just for the experience of writing code to parse code (which I have done in the past, but I didn't use tokenisation or an AST) that's scope-aware.
The first bit would be to write a Pawn AST parser that's #include aware, function aware, recursion aware and a few other things. Next, I'd work on variable detection, "type" (tag) checking and small stuff.
I'd love to have some feedback from the community about this (if you all still exist of course!) would you use an analysis tool? (I'd probably write it regardless, it sounds fun... somehow) Have any of you experienced working with parsing source code or writing compilers (admittedly not totally related but still somewhat) before?