Skip to content

✨ feat(mq-lang): add spread operator for array and dict literals#1960

Merged
harehare merged 2 commits into
mainfrom
feat/spread-operator
Jul 6, 2026
Merged

✨ feat(mq-lang): add spread operator for array and dict literals#1960
harehare merged 2 commits into
mainfrom
feat/spread-operator

Conversation

@harehare

@harehare harehare commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Close #1945

@codspeed-hq

codspeed-hq Bot commented Jul 1, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing feat/spread-operator (dac796f) with main (9367593)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (562725c) during the generation of this report, so 9367593 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@harehare harehare force-pushed the feat/spread-operator branch 3 times, most recently from 90be3e2 to ee8744e Compare July 5, 2026 00:46
harehare added 2 commits July 5, 2026 21:33
Support `...expr` inside `[...]` and `{...}` literals, splicing an
array's elements or a dict's entries into the enclosing literal at
eval time. Adds lexer/parser/CST support, HIR lowering, type
inference in mq-check, formatter support, and LSP semantic tokens.
- Skip the spread-marker check for non-array/dict builtin calls, since
  `...expr` can only ever be parsed inside an array/dict literal.
- Merge expand_spread's array/dict match arms to drop duplicated
  None/error handling.
- Extract parse_dict's repeated comma/closing-brace tail logic (spread
  vs. key:value entries) into a shared parse_dict_separator helper.
@harehare harehare force-pushed the feat/spread-operator branch from ee8744e to dac796f Compare July 5, 2026 12:34
@harehare harehare merged commit 93ed796 into main Jul 6, 2026
11 checks passed
@harehare harehare deleted the feat/spread-operator branch July 6, 2026 09:55
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.

Spread operator (...) for arrays and dicts

1 participant