Add template yields and inline template definitions#158
Merged
Conversation
Contributor
|
yields property to pointer template referencesf687e91 to
7b662d9
Compare
gnidan
commented
Jan 13, 2026
- Define optional `yields` property on reference collection schema to map template region names to new names - Implement rename context stack in dereference loop to apply mappings - Save regions under both original names (for internal references) and new names (for external access) - Update struct storage example to use `packed-field` template with `yields` for x, y, salt fields - Add reference collection documentation page - Remove resolved limitation from pointer status banner Closes #122
- Define `templates`/`in` collection type for declaring templates within a pointer, following the `define`/`in` pattern from scope - Implement template context stack in dereference loop to merge inline templates with external templates (inline takes precedence) - Update struct storage example to define `packed-field` template inline, making the example fully self-contained - Add documentation page for templates collection - Add unit tests for inline template definitions
7b662d9 to
4e9d0ac
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
yieldsproperty to template references for renamingregions produced by templates
templates/incollection type for defining templates inlinewithin a pointer
Changes
yieldsproperty (closes #122)yieldsproperty on reference collection schema tomap template region names to new names
new names (for external access)
Inline template definitions
templates/incollection type for declaring templateswithin a pointer, following the
define/inpattern from scopeinline templates with external templates (inline takes precedence)
packed-fieldtemplateinline, making the example fully self-contained