Migrate to use esprima so we can immediately parse all JS files.
trezm opened this issue · 0 comments
trezm commented
This is going to be a pretty big task so it's best that we tackle it now rather than later.
Essentially the new program flow will be:
- Open file, run it through esprima
- Run through comments on each "Body" and find type declarations. Assign them to the correct AST node based on loc.
- Find all exports (ignore require for now) and recursively include them, updating the parent AST while doing so
- Run validations
- Return all imports and any type errors. Should basically return in the form
{
ast: Object,
errors: [TypeDocError]
}