Skip to content

feat(ast,parser): parse jsdoc #168

Description

@Boshen

I see there are some demand for reading jsdoc information, let's do this in two steps:

  1. parse jsdoc into structured data, this should be lazy.
  2. save them into trivias and have them accessible. I haven't figured out the best way to do this, but see AST Trivia handling #6 for disucssion.

Note: This is for parsing jsdoc comments to structured data. This is not about wiring up all the jsdoc comments into a document tree (which is the main purpose for jsdoc).

To parse jsdoc comments, we need to:

  1. add a new routine to parse jsdoc in oxc_parser, this should be a separate routine so we can parse jsdoc lazily
  2. add the jsdoc AST to oxc_ast
  3. setup jsdoc tests (I'm unsure on how to do this properly yet).

References:

Metadata

Metadata

Assignees

Labels

A-linterArea - LinterA-parserArea - ParserE-Help WantedExperience level - For the experienced collaboratorsP-highPriority - High

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions