Skip to content

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Nov 7, 2025

Improves error message for imbalanced tokens for parentheses.

Before

  × Expected `)` but found `}`
   ╭─[typescript/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement3.ts:4:3]
 3 │     if (a.b
 4 │   }
   ·   ┬
   ·   ╰── `)` expected
 5 │   f2() {
   ╰────

After

  × Expected `)` but found `}`
   ╭─[typescript/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement3.ts:4:3]
 2 │   f1() {
 3 │     if (a.b
   ·        ┬
   ·        ╰── Opened here
 4 │   }
   ·   ┬
   ·   ╰── `)` expected
 5 │   f2() {
   ╰────

Copy link
Member Author

sapphi-red commented Nov 7, 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 7, 2025

CodSpeed Performance Report

Merging #15446 will not alter performance

Comparing 11-05-feat_parser_improve_error_messages_for_missing_closing_parentheses (9526fbe) with main (89adad0)1

Summary

✅ 37 untouched

Footnotes

  1. No successful run was found on 11-05-feat_parser_improve_error_message_for_missing_block_closing_tokens (148b776) during the generation of this report, so main (89adad0) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@sapphi-red sapphi-red force-pushed the 11-05-feat_parser_improve_error_messages_for_missing_closing_parentheses branch from 5d2a124 to 9526fbe Compare November 7, 2025 18:33
@sapphi-red sapphi-red force-pushed the 11-05-feat_parser_improve_error_message_for_missing_block_closing_tokens branch from 12205d8 to 148b776 Compare November 7, 2025 18:33
@sapphi-red sapphi-red requested a review from Boshen November 7, 2025 18:40
@sapphi-red sapphi-red marked this pull request as ready for review November 7, 2025 18:45
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Nov 8, 2025
Copy link
Member

Boshen commented Nov 8, 2025

Merge activity

…15446)

Improves error message for imbalanced tokens for parentheses.

**Before**
```
  × Expected `)` but found `}`
   ╭─[typescript/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement3.ts:4:3]
 3 │     if (a.b
 4 │   }
   ·   ┬
   ·   ╰── `)` expected
 5 │   f2() {
   ╰────
```
**After**
```
  × Expected `)` but found `}`
   ╭─[typescript/tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IfStatements/parserErrorRecoveryIfStatement3.ts:4:3]
 2 │   f1() {
 3 │     if (a.b
   ·        ┬
   ·        ╰── Opened here
 4 │   }
   ·   ┬
   ·   ╰── `)` expected
 5 │   f2() {
   ╰────
```
@graphite-app graphite-app bot force-pushed the 11-05-feat_parser_improve_error_message_for_missing_block_closing_tokens branch from 148b776 to 4decc1d Compare November 8, 2025 04:35
@graphite-app graphite-app bot force-pushed the 11-05-feat_parser_improve_error_messages_for_missing_closing_parentheses branch from 9526fbe to 0fa484d Compare November 8, 2025 04:35
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 8, 2025
Base automatically changed from 11-05-feat_parser_improve_error_message_for_missing_block_closing_tokens to main November 8, 2025 04:40
@graphite-app graphite-app bot merged commit 0fa484d into main Nov 8, 2025
22 checks passed
@graphite-app graphite-app bot deleted the 11-05-feat_parser_improve_error_messages_for_missing_closing_parentheses branch November 8, 2025 04:42
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