facebookarchive / pfff

Tools for code analysis, visualizations, or style-preserving source transformation.
http://github.com/facebook/pfff/wiki/Main
Other
2.44k stars 204 forks source link

How is new language support added? #125

Open krishnavaidy opened 9 years ago

krishnavaidy commented 9 years ago

Can you tell us how you went about adding support for multiple languages?

I see in the source code that some code for parsing is generated by ocamltarzan. Does that mean that you were able to generate some code, and didn’t have to code by hand the asts.

Do you have any advice for someone who would like to add support for Java 8, and other languages?

Thanks!

jwatzman commented 9 years ago

I think at least some parts were originally generated by tarzan, but have been modified by hand since then. Others might be totally hand-rolled? Not sure. @aryx would have to comment to be sure.

krishnavaidy commented 9 years ago

Thank you, that's what I thought too. I wanted to see how we could generate even some parts by tarzan. That could really speed things up, while adding support for a language.