Skip to content

Recognize incomplete Prism hash literals - #93

Open
OskarEichler wants to merge 1 commit into
banister:masterfrom
OskarEichler:codex/prism-hash-literal
Open

Recognize incomplete Prism hash literals#93
OskarEichler wants to merge 1 commit into
banister:masterfrom
OskarEichler:codex/prism-hash-literal

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Treat Prism's missing-closing-brace diagnostic as an incomplete expression so source extraction continues reading the following lines.

Reproduction and fix

On Ruby 4, an input such as {audit: raises expected a } to close the hash literal; the current diagnostic list treats that as hard-invalid. Add the precise Prism message to the incomplete-expression patterns.

Regression coverage

  • added a multiline hash-literal extraction case
  • 24-case incomplete/hard-invalid parser matrix passes on Ruby 4.0.6 and 3.2.11
  • final composition: 41 examples / 0 failures on both Rubies
  • syntax, diff check, exact packaging and Rails integration pass

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant