Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Dec 22, 2025

closes #17265

Copilot AI review requested due to automatic review settings December 22, 2025 12:05
@github-actions github-actions bot added A-parser Area - Parser C-enhancement Category - New feature or request labels Dec 22, 2025
Copy link
Member Author

Boshen commented Dec 22, 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.

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 adds proper syntax error detection for object methods without function bodies in the pattern ({ foo(bar) }), addressing issue #17265.

  • Updated parser logic to require function bodies for object methods even in TypeScript mode
  • Improved error reporting for missing function bodies in object literal methods and accessors

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
crates/oxc_parser/src/js/function.rs Modified condition to enforce function body requirement for object methods regardless of TypeScript mode
tasks/coverage/snapshots/parser_typescript.snap Updated test snapshots to reflect new error messages and passing test for objectLiteralMemberWithoutBlock1.ts

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

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 22, 2025

CodSpeed Performance Report

Merging #17267 will not alter performance

Comparing 12-22-feat_parser_produce_syntax_error_for_foo_bar_ (4ac23e1) with main (a5ef127)

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
Copy link
Contributor

graphite-app bot commented Dec 22, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 12-22-feat_parser_produce_syntax_error_for_foo_bar_ branch from 79f3a09 to 4ac23e1 Compare December 22, 2025 12:12
@graphite-app graphite-app bot merged commit 4ac23e1 into main Dec 22, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 12-22-feat_parser_produce_syntax_error_for_foo_bar_ branch December 22, 2025 12:18
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.

parser: no parse error for ({ foo(bar) })

2 participants