Files
storybook/tree-sitter-storybook/test/corpus/highlights.txt
Sienna Meridian Satterwhite e6d297420c feat(grammar): update tree-sitter grammar to v0.3.0
Updated tree-sitter grammar to match v0.3.0 LALRPOP parser:

Grammar updates:
- Schedule: block-based syntax with extends, override, recurrence
- Life arc: requires clause for field validation
- Template: uses behaviors/schedules syntax
- Behavior: correct keywords (choose/then/repeat with optional params)
- Type system: concept_comparison with any/is_condition
- Removed concept semicolon requirement

Query file updates:
- highlights.scm: updated node names to *_declaration
- outline.scm: updated for new declaration node names
- indents.scm: updated node names, removed concept semicolon

Corpus test updates:
- Created schedules.txt with v0.3.0 syntax tests
- Created highlights.txt for highlighting tests
- Updated type_system.txt for v0.3.0 type syntax
- Updated behaviors.txt for correct expression wrapping
- Updated declarations.txt to use correct node names
- Updated basic.txt to use character_declaration/character_body
- Deleted obsolete v0.2.0 syntax tests

Integration tests:
- Added tree_sitter_integration.rs test suite
- Fixed test_any_type to use correct v0.3.0 syntax
- Fixed test_tree_sitter_grammar_builds to use generate command
2026-02-14 17:43:26 +00:00

54 lines
956 B
Plaintext

==================
Keywords should highlight
==================
use schema::types;
character Alice from Person {
age: 25
}
---
(source_file
(declaration
(use_declaration
(path_segments
(identifier)
(identifier))))
(declaration
(character_declaration
name: (identifier)
template: (template_clause
(identifier))
body: (character_body
(field
name: (dotted_path
(identifier))
value: (value
(integer)))))))
==================
Any type in sub-concept
==================
sub_concept Field.Type {
name: "text",
value: 42
}
---
(source_file
(declaration
(sub_concept
parent: (identifier)
name: (identifier)
body: (sub_concept_record_body
(sub_concept_field
name: (identifier)
value: (string))
(sub_concept_field
name: (identifier)
value: (integer))))))