bd82 / java-parser

A javascript based java parser based on chevrotain
0 stars 0 forks source link

Evaluate if the CST -> AST Visitor should be part of this project #6

Open bd82 opened 5 years ago

bd82 commented 5 years ago

This Parser is (at least initially) meant to be used to implement a prettier java plugin. So the question is: Do we really require an AST (created by the CST visitor) to re-write the syntax tree?

Maybe we can implement the prettier formatter as a CST Visitor without the intermediate step of creating an AST?

bd82 commented 5 years ago

Removing the CST to AST visitor will reduce 50% of the code base of this project... The rewriting of the grammar may be slightly more complex though as we won't have a preprocessed, easier to use structure.