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
Alternative parser #43
Comments
Is the AST produced by the parser identical to acorn? |
Both produce output conforming to estree spec so i assume yes. Here is a link to the parser i was mentioning: https://www.npmjs.com/package/flow-parser |
The Inspector's constructor could perhaps be updated to accepted an optional parse fn, to be used instead of |
I think the option should accept a plain parsing function to simplify the interface/implementation. E.g. var parser = require('flow-parser');
var parse = function(str) {
return parser.parse(str, {
esproposal_decorators: true,
types: false,
// etc
});
};
new Inspector({parse, otherOptions}); |
Flow support was added in f04c142 :) Thanks! |
I plan in creating a Vscode extension that provides in editor feedback for copy pasted code. The only problem i have is that i need to process code with Flowtype type annotations in it. I have been using flowparser package with great success previously since it produces output compatible with most of the other parsers and also works fine with tools such as Recast, Jscodeshift etc.
Wondering if there is an easy way to make the parser configurable via options ? thanks.
The text was updated successfully, but these errors were encountered: