Skip to content

docs(compiler): Add JSDoc for syntax and source contracts [skip chg] - #12244

Merged
Timothee Guerin (timotheeguerin) merged 11 commits into
microsoft:mainfrom
timotheeguerin:docs/jsdoc-compiler-syntax-kinds
Oct 16, 2026
Merged

Timothee Guerin (timotheeguerin) merged 11 commits into
microsoft:mainfrom
timotheeguerin:docs/jsdoc-compiler-syntax-kinds

Conversation

@timotheeguerin

@timotheeguerin Timothee Guerin (timotheeguerin) commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

AST consumers need a coherent reference for syntax kinds, source locations, symbols, declarations, and expressions rather than isolated undocumented node fields.

Document the public syntax and source contracts together, including parser limitations, node relationships, optional locations, and documentation-comment structure. No parser behavior or API signatures change.

Consolidates 12251, 12247, 12259, 12270, 12276, 12279.

Tracked in #12228.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the compiler:core Issues for @typespec/compiler label Oct 15, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/compiler@12244

commit: a9c8337

@azure-sdk-automation

azure-sdk-automation Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation-only changes clarify existing AST contracts without changing behavior, and no unresolved issues remain.

0 open findings

What changed in this PR

Adds JSDoc to compiler syntax kinds so AST consumers can understand their syntax and roles without reading the parser.

Changes:

  • Documents each SyntaxKind member.
  • Clarifies related constructs, including types versus values and declarations versus expressions.
  • Preserves enum values, API signatures, and compiler behavior.
File Description
packages/​compiler/​src/​core/​types.ts Adds explanatory JSDoc to SyntaxKind and its members.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 14:11
@timotheeguerin Timothee Guerin (timotheeguerin) changed the title docs(compiler): Add JSDoc for syntax kinds [skip chg] docs(compiler): Add JSDoc for syntax and source contracts [skip chg] Oct 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation-only changes preserve existing behavior and API signatures, with no unresolved findings.

0 open findings

🧠 Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants