Files
Boshen 14b0fb7031 refactor(semantic): extract oxc_jsdoc crate from oxc_semantic (#19706)
## Summary

- Extract JSDoc parsing code from `oxc_semantic` into a new `oxc_jsdoc` crate
- Move parser (`JSDoc`, `JSDocTag`), builder (`JSDocBuilder`), and all supporting types to the new crate
- Keep `JSDocFinder` in `oxc_semantic` since it depends on semantic types (`AstNode`, `AstNodes`)
- All existing imports via `oxc_semantic` continue to work through re-exports — no changes needed in `oxc_linter`

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-02-25 13:35:20 +00:00

747 B

Oxc JSDoc

JSDoc comment parsing for the oxc toolchain.

Overview

This crate provides JSDoc comment parsing functionality, extracting structured data from JSDoc comments (/** ... */). It handles parsing of tags, types, parameter names, and descriptions.

Key Features

  • Lazy parsing: JSDoc comments are parsed on first access via OnceCell
  • Tag extraction: Supports @param, @returns, @type, @typedef, and arbitrary custom tags
  • Type parsing: Extracts {type} expressions from tags
  • Name parsing: Handles parameter names including optional [name=default] syntax
  • Comment parsing: Strips JSDoc formatting (* prefixes, indentation)
  • Span tracking: All parsed parts include source position spans