trezm/type-doc

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:

  1. Open file, run it through esprima
  2. Run through comments on each "Body" and find type declarations. Assign them to the correct AST node based on loc.
  3. Find all exports (ignore require for now) and recursively include them, updating the parent AST while doing so
  4. Run validations
  5. Return all imports and any type errors. Should basically return in the form
{
  ast: Object,
  errors: [TypeDocError]
}