Skip to content

Unified: Extract Swift dictionary literals - #22716

Merged
paldepind merged 3 commits into
mainfrom
unified/swift-map-literal
Oct 1, 2026
Merged

paldepind merged 3 commits into
mainfrom
unified/swift-map-literal

Conversation

@paldepind

@paldepind paldepind commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Maps Swift dictionary literals to the existing map_literal and key_value_pair in the common AST.

@paldepind
paldepind marked this pull request as ready for review October 1, 2026 07:14
@paldepind
paldepind requested review from a team as code owners October 1, 2026 07:14
Copilot AI balanced review requested due to automatic review settings October 1, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The mapping matches the existing AST schema and is covered by extractor and downstream generated expectations.

Review effort: Balanced
Findings: None

What changed in this PR

Adds structured Swift dictionary literal extraction to the unified AST.

Changes:

  • Maps dictionary entries to key_value_pair children of map_literal.
  • Handles empty dictionaries.
  • Expands corpus, type-inference, and control-flow coverage.
File Description
unified/​extractor/​src/​languages/​swift/​swift.rs Adds dictionary mapping rules.
unified/​extractor/​tests/​corpus/​swift/​collections/​dictionary-literal.swift Adds dictionary test cases.
unified/​extractor/​tests/​corpus/​swift/​collections/​dictionary-literal.output Updates generated corpus output.
unified/​extractor/​tests/​corpus/​swift/​control-flow/​switch-expression-pattern.output Updates generated nested dictionary AST.
unified/​ql/​test/​library-tests/​type-inference/​type-inference.expected Records inferred entry types.
unified/​ql/​test/​library-tests/​controlflow/​basicblock-slices.expected Records entry evaluation flow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@paldepind
paldepind merged commit eb88f92 into main Oct 1, 2026
10 checks passed
@paldepind
paldepind deleted the unified/swift-map-literal branch October 1, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants