New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow saving and loading in ast format #106
Conversation
Nice, I like it, personally. It should be fairly easy to integrate with atom with this. |
@jimfleming yeah, I think I can get my emacs plugin working pretty easily with it. |
@@ -90,6 +92,10 @@ function handleJavascript(fullPath, original) { | |||
var js = original; | |||
var relativePath = path.relative(process.cwd(), fullPath); | |||
|
|||
if (argv['--ast']) { | |||
js = jsfmt.parseAST(JSON.parse(js)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want a try/catch here or just let it error?
One comment above but it looks good to me. The action-word is more clear too ( |
@jimfleming think this is good, I added try/catch around ast json parsing. |
👍 Thanks! |
allow saving and loading in ast format
@jimfleming, this was my attempt at trying to support loading/saving as AST, I dont expect it to be perfect, but a random attempt.
tries to take care of #102