Skip to content

Conversation

@camchenry
Copy link
Member

@camchenry camchenry commented Nov 26, 2025

Currently we just emit "unexpected token", but we actually have a good amount of context here to provide better help + error message.

@github-actions github-actions bot added A-parser Area - Parser C-enhancement Category - New feature or request labels Nov 26, 2025
Copy link
Member Author

camchenry commented Nov 26, 2025


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 Nov 26, 2025

CodSpeed Performance Report

Merging #16132 will not alter performance

Comparing 11-25-feat_parser_add_diagnostic_for_expected_ident_after_optional_chain (4142b24) with 11-25-feat_parser_improve_diagnostic_for_unexpected_optional_declarations (dfa63e3)

Summary

✅ 42 untouched
⏩ 3 skipped1

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 graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 26, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 26, 2025

Merge activity

…16132)

Currently we just emit "unexpected token", but we actually have a good amount of context here to provide better help + error message.
@graphite-app graphite-app bot force-pushed the 11-25-feat_parser_improve_diagnostic_for_unexpected_optional_declarations branch from dfa63e3 to db839ae Compare November 26, 2025 04:33
@graphite-app graphite-app bot force-pushed the 11-25-feat_parser_add_diagnostic_for_expected_ident_after_optional_chain branch from 4142b24 to 0549ae5 Compare November 26, 2025 04:33
Base automatically changed from 11-25-feat_parser_improve_diagnostic_for_unexpected_optional_declarations to main November 26, 2025 04:38
@graphite-app graphite-app bot merged commit 0549ae5 into main Nov 26, 2025
22 checks passed
@graphite-app graphite-app bot deleted the 11-25-feat_parser_add_diagnostic_for_expected_ident_after_optional_chain branch November 26, 2025 04:38
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 26, 2025
pub fn identifier_expected_after_question_dot(span: Span) -> OxcDiagnostic {
OxcDiagnostic::error("Identifier expected after '?.'")
.with_label(span)
.with_help("Add an identifier after '?.'")
Copy link
Contributor

Choose a reason for hiding this comment

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

should this also consider the optional call expression case?

foo?.()

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

Labels

A-parser Area - Parser C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants