Skip to content

Introduce $ sigil for value variables and reserve @ for node refs; update parser, writer, lexer, docs and templates - #11

Merged
TiernanDeFranco merged 1 commit into
mainfrom
codex/create-scene-parser-with-@-node-refs-ptd262
May 8, 2026
Merged

TiernanDeFranco merged 1 commit into
mainfrom
codex/create-scene-parser-with-@-node-refs-ptd262

Conversation

@TiernanDeFranco

Copy link
Copy Markdown
Collaborator

Motivation

  • Remove ambiguity between scene-level value variables and node references by introducing distinct sigils: $ for value vars and @ for node refs/scene keys.
  • Update the scene parser, lexer, and scene writer so the format is unambiguous and consistent across code and docs.
  • Refresh authoring templates and example .scn/animation docs to use the new sigil conventions.

Description

  • Add a Dollar token to the lexer and update the parser to treat $ as the value-var sigil and @ as node reference, including new parsing branches in parser.rs and variable collection changes in collect_var_entries and parse_value.
  • Update scene document writer (scene_doc.rs) to emit $ for value vars and @ for node refs, and adjust dedupe/var output accordingly.
  • Change error messages and behavior in scene preparation (prepare/core.rs) to reference $root where applicable when a missing root is detected.
  • Revise many documentation files and scene/templates (docs/*, perro_editor/res/*.scn, perro_editor/res/proj_manager.scn, scene node templates) to reflect the new sigils and examples for AnimationPlayer/AnimationTree bindings and scene parent/key usages.

Testing

  • Ran unit tests for the scene crate with cargo test -p perro_scene which includes parser and scene_doc tests, and they passed after updating test expectations to the new syntax.
  • Ran scene loader unit tests in the runtime crate (tests touching root_of and static boot scenes) via cargo test -p perro_runtime and they passed with the updated input/expectations.
  • Ran cargo test for the modified workspace crates to verify integration; all affected tests succeeded.

Codex Task

@TiernanDeFranco
TiernanDeFranco merged commit 9502037 into main May 8, 2026
2 of 3 checks passed
@TiernanDeFranco
TiernanDeFranco deleted the codex/create-scene-parser-with-@-node-refs-ptd262 branch May 8, 2026 23:10
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.

1 participant