Support object spread in path-scoped scope blocks#86
Conversation
🦋 Changeset detectedLatest commit: a10741c The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bridge | a10741c | Commit Preview URL Branch Preview URL |
Mar 05 2026, 06:50 AM |
|
The code examples in the review are just illustration and need to be evaluated one by one. verify if the mentioned issues really are issues before making any changes. Test before fix! Architectural ReviewYou have done an excellent job integrating the spread operator into the existing CST-to-AST translation pipeline.
Because Code Review & Minor FixesWhile the architecture is sound, there are a few edge cases in the AST generation logic that need to be addressed to ensure robustness, especially when dealing with complex path scoping. 1. Spread Operator inside
|
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
Verified all three points:
Both standalone functions only receive |
Spreadtoken (...) to lexer, placed beforeDotscopeSpreadLinerule to parser...sourceExprinbridgeWirescope blocks (audit { ...i })...sourceExprin nestedpathScopeLinescope blocks (.foo { ...i })...sourceExprinelementLinearray mapper scope blocksprocessScopeLinesvisitor to handle spread lines (including spread-only nested scopes)processElementScopeLinesvisitor to handle spread linesbuildObjectLiteralto support spread + field override combination...sourceExprspread linessafe: trueon spread wires in element scope blocks when source uses?.safe navigation (processElementLinesandprocessElementScopeLines)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.