Skip to content

Conversation

@zharinov
Copy link
Member

Summary

  • Add semantic validation for anchor (.) placement
  • Boundary anchors at sequence start/end require parent named node context
  • Interior anchors (between items) are always valid
  • Add AnchorWithoutContext diagnostic with helpful hint

Valid:

(parent . (first))     ; ✓ boundary anchor inside named node
{(a) . (b)}            ; ✓ interior anchor (between items)

Invalid:

{. (a)}                ; ✗ boundary anchor without parent context

Test plan

  • cargo test -p plotnik-lib anchors passes (16 tests)
  • Updated parser tests to use valid anchor patterns

@zharinov zharinov enabled auto-merge (squash) December 31, 2025 12:15
@zharinov zharinov merged commit 28dbdc7 into master Dec 31, 2025
4 checks passed
@zharinov zharinov deleted the feat/anchor-validation branch December 31, 2025 12:16
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.

2 participants