Skip to content

fix: add support to aggregate initialization without = - #369

Open
xhu6 wants to merge 1 commit into
tree-sitter:masterfrom
xhu6:bug-331
Open

fix: add support to aggregate initialization without =#369
xhu6 wants to merge 1 commit into
tree-sitter:masterfrom
xhu6:bug-331

Conversation

@xhu6

@xhu6 xhu6 commented Aug 2, 2026

Copy link
Copy Markdown

Fixes #331

Using https://en.cppreference.com/cpp/language/aggregate_initialization, {.a 10} is not allowed but {.a {10}} is, so have to be careful with making = optional.

Added tests in test/corpus/expressions.txt.

I am unsure why the the conflict between initalizer_pair and comma_expression is no longer necessary, so I removed it.

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.

bug: Error parsing designated aggregate initialization without =

1 participant