Added grammar rules for v0.3 type system declarations: - concept_declaration: semicolon-terminated base type - sub_concept: enum and record forms with dot notation - concept_comparison: nested pattern matching with variant_pattern - any_type: named node for the 'any' keyword - template species extension: optional ': Species' syntax Updated query files: - highlights.scm: new keywords and named field highlights - outline.scm: concept/sub_concept/concept_comparison in outline - indents.scm: indentation for new brace-delimited nodes Fixed pre-existing query issues: - Replaced invalid repeat_node reference with decorator_node - Removed invalid '?' punctuation reference Added comprehensive test corpus (type_system.txt) covering: - concept declaration (simple and multiple) - sub_concept enum and record forms - concept_comparison with any/is conditions - template with species extension - full combined example
73 lines
1.1 KiB
Scheme
73 lines
1.1 KiB
Scheme
; Outline/symbols query for Storybook DSL
|
|
; Defines what symbols appear in the document outline
|
|
|
|
; Characters
|
|
(character
|
|
name: (identifier) @name
|
|
) @symbol.character
|
|
|
|
; Templates
|
|
(template
|
|
name: (identifier) @name
|
|
) @symbol.template
|
|
|
|
; Life arcs
|
|
(life_arc
|
|
name: (identifier) @name
|
|
) @symbol.life_arc
|
|
|
|
; Life arc states
|
|
(arc_state
|
|
name: (identifier) @name
|
|
) @symbol.state
|
|
|
|
; Schedules
|
|
(schedule
|
|
name: (identifier) @name
|
|
) @symbol.schedule
|
|
|
|
; Behaviors
|
|
(behavior
|
|
name: (identifier) @name
|
|
) @symbol.behavior
|
|
|
|
; Institutions
|
|
(institution
|
|
name: (identifier) @name
|
|
) @symbol.institution
|
|
|
|
; Relationships
|
|
(relationship
|
|
name: (identifier) @name
|
|
) @symbol.relationship
|
|
|
|
; Locations
|
|
(location
|
|
name: (identifier) @name
|
|
) @symbol.location
|
|
|
|
; Species
|
|
(species
|
|
name: (identifier) @name
|
|
) @symbol.species
|
|
|
|
; Enums
|
|
(enum_declaration
|
|
name: (identifier) @name
|
|
) @symbol.enum
|
|
|
|
; Concepts
|
|
(concept_declaration
|
|
name: (identifier) @name
|
|
) @symbol.concept
|
|
|
|
; Sub-concepts
|
|
(sub_concept
|
|
name: (identifier) @name
|
|
) @symbol.sub_concept
|
|
|
|
; Concept comparisons
|
|
(concept_comparison
|
|
name: (identifier) @name
|
|
) @symbol.concept_comparison
|