Skip to content

fix(parser): improve diagnostics for double export#17992

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-14-fix_parser_improve_diagnostics_for_double_export_
Jan 14, 2026
Merged

fix(parser): improve diagnostics for double export#17992
graphite-app[bot] merged 1 commit intomainfrom
01-14-fix_parser_improve_diagnostics_for_double_export_

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Jan 14, 2026

fixes #15870

Copilot AI review requested due to automatic review settings January 14, 2026 11:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves error diagnostics when encountering double export keywords in JavaScript/TypeScript module declarations. The parser now explicitly detects and reports when an export keyword appears twice consecutively, providing better error messages to developers.

Changes:

  • Added detection logic for consecutive export keywords in the export statement parser
  • Implemented error reporting using the existing modifier_already_seen diagnostic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added A-parser Area - Parser C-bug Category - Bug labels Jan 14, 2026
Copy link
Member Author

Boshen commented Jan 14, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 14, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing 01-14-fix_parser_improve_diagnostics_for_double_export_ (a412103) with main (6ac67bc)

Summary

✅ 42 untouched benchmarks
⏩ 3 skipped benchmarks1

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 14, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the 01-14-fix_parser_improve_diagnostics_for_double_export_ branch from bea9019 to a412103 Compare January 14, 2026 11:23
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Jan 14, 2026
@graphite-app graphite-app bot merged commit a412103 into main Jan 14, 2026
29 checks passed
@graphite-app graphite-app bot deleted the 01-14-fix_parser_improve_diagnostics_for_double_export_ branch January 14, 2026 11:29
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect parser diagnostic message for duplicate export modifier

2 participants