On 11/15/2016 07:05 PM, Stefan Koch wrote: >> When doing so, try to forget that static analysis is the intended >> goal. It has to be naturally usable for any other purpose too, >> focusing on one specific application case is likely only harm design >> decisions. > > It's a compiler frontend.
Very good observation :P > I cannot see any other purposes then code-analysis and code-transformation. > Regarding Transformations I wanted to write a good D transformation tool > for years now. With that approach you can also say that code analysis is subset of code of code transformation (it transforms code to list of warnings!) and thus that is the only purpose. I doubt it is very useful definition :) Language frontend as a library must allow any sort of reasoning about source code that compiler can normally do. What library user will do with that reasoning is not of ones concern - it can be analysis or transpilation to another language or even dumb AST pretty-printing. No matter, in the core one has to be able to do `import dlang.frontend` and write own visiting code.
signature.asc
Description: OpenPGP digital signature
