hoschi / yode

Yode - Focused Code Editing
https://hoschi.github.io/yode/
MIT License
30 stars 1 forks source link

switch parser and tree walker dependencies for better future/feature support #11

Open hoschi opened 7 years ago

hoschi commented 7 years ago

Babylon has neat things in my opinion:

I'm not sure with TypeScript support in Babylon means it works in Recast, see Recast ticket here.

Also I could not say with the documentation I found if nodes have more methods like babel provides. Things I saw like this example https://github.com/hoschi/babel-plugin-react-intl/blob/master/src/index.js#L269 Where you can gather the "binding" of a function call to find the module which this function was imported from.

hoschi commented 6 years ago

Use Babylon as parser so we get TypeScript support when https://github.com/benjamn/recast/issues/424 has landed. Use ast-types instead of @babel/types so we are flexibel in the the parser department. ast-types has a broader support than @babel/types as explained here: https://github.com/benjamn/recast/issues/424#issuecomment-363112376

hoschi commented 6 years ago

TS support is in latest recast.

hoschi commented 6 years ago

Parser configurations: https://github.com/benjamn/recast/tree/master/parsers