Skip to content

feat(parser): allow dictionary entries without parentheses - #161

Merged
Seddryck merged 1 commit into
mainfrom
codex/issue-160-dictionary-shorthand
Sep 15, 2026
Merged

Seddryck merged 1 commit into
mainfrom
codex/issue-160-dictionary-shorthand

Conversation

@Seddryck

Copy link
Copy Markdown
Owner

Dictionary literals now accept unparenthesized entries such as !{"BE" => 100, "FR" => 80} alongside existing parenthesized pairs. Both forms bind as ordered PairLiteralSyntax entries, with each entry's authored text and span preserved. Standalone pairs still require parentheses.

The Tree-sitter grammar and generated parser were updated, with corpus and .NET syntax-binding coverage for shorthand, mixed styles, function arguments, source preservation, and malformed entries.

Validation: npm run generate; dictionary corpus 5/5; applicable Tree-sitter corpus 377/377 (six existing Windows newline snapshot mismatches excluded); dotnet test Expressif.Syntax.sln --no-restore --nologo 496/496 on net8.0, net9.0, and net10.0.

Closes #160

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c98fd661-bceb-4b59-bb83-1967410f07da


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Allow dictionary entries without parentheses

1 participant