Skip to content

feat(types): Rename str capture type to text#588

Merged
zharinov merged 1 commit into
masterfrom
agent/rename-str-to-text
Jul 16, 2026
Merged

feat(types): Rename str capture type to text#588
zharinov merged 1 commit into
masterfrom
agent/rename-str-to-text

Conversation

@zharinov

Copy link
Copy Markdown
Member

Summary

  • rename the built-in capture projection from :: str to :: text
  • align compiler planning, bytecode effects, runtime journals, dumps, and traces with the existing Text primitive
  • update the Tree-sitter grammar, language documentation, examples, and golden fixtures

Why

text describes the operation in Plotnik's own domain: return the exact source text covered by the captured value. It is also target-neutral, unlike str, which resembles the Rust and Python representation even though generated targets may expose the value differently.

The new spelling also matches the existing Node.text vocabulary and sits naturally beside other source-oriented projections.

Compatibility

This intentionally removes :: str as an accepted capture type. Both :: str and :: string now produce a focused fix to :: text.

The bytecode opcode values and Rust &str representation stay unchanged. Symbolic bytecode and runtime names now use TextClose and NodeText.

Coverage

  • golden fixtures cover parsing, diagnostics, type inference, bytecode, Rust code generation, VM execution, and inspection output
  • migration fixtures pin the fixes from str and string to text
  • the Tree-sitter corpus and highlighting assertions cover the new spelling
  • the Tree-sitter and Arborium runtime implementations remain in sync

@zharinov
zharinov marked this pull request as ready for review July 16, 2026 03:13
@zharinov
zharinov enabled auto-merge (squash) July 16, 2026 03:13
@zharinov
zharinov merged commit 24c0d31 into master Jul 16, 2026
8 checks passed
@zharinov
zharinov deleted the agent/rename-str-to-text branch July 16, 2026 03:14
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.

1 participant