feat(lang): rename concept_comparison to definition (v0.3.2)
Renames the `concept_comparison` keyword to `definition` across the entire codebase for better readability and conciseness. Changes: - Tree-sitter grammar: `concept_comparison` node → `definition` - Tree-sitter queries: highlights, outline, and indents updated - Zed extension highlights.scm updated to match - Lexer: `Token::ConceptComparison` → `Token::Definition` - Parser: `ConceptComparisonDecl` rule → `DefinitionDecl` - AST: `Declaration::ConceptComparison` → `Declaration::Definition`, `ConceptComparisonDecl` struct → `DefinitionDecl` - All Rust source files updated (validate, names, convert, references, semantic_tokens, symbols, code_actions, hover, completion) - `validate_concept_comparison_patterns` → `validate_definition_patterns` - Example file and test corpus updated - Spec docs: created SBIR-v0.3.2-SPEC.md, updated TYPE-SYSTEM.md, README.md, SBIR-CHANGELOG.md, SBIR-v0.3.1-SPEC.md
This commit is contained in:
@@ -58,7 +58,7 @@ The Storybook Intermediate Representation (SBIR) is a binary format that represe
|
||||
3. **Life Arc Field Requirements** - Life arcs can declare required fields with type annotations
|
||||
|
||||
**Breaking changes:**
|
||||
- TYPES section now populated with concept, sub_concept, and concept_comparison definitions
|
||||
- TYPES section now populated with concept, sub_concept, and definition declarations
|
||||
- Value discriminants renamed: Int→Number, Float→Decimal, String→Text, Bool→Boolean
|
||||
- Expression discriminants renamed: IntLit→NumberLit, FloatLit→DecimalLit, StringLit→TextLit, BoolLit→BooleanLit
|
||||
- TEMPLATES section extended with species_base field
|
||||
@@ -385,7 +385,7 @@ concept Cup
|
||||
sub_concept Cup.Type { Small, Medium, Large }
|
||||
sub_concept Cup.Material { weight: 100, fragile: true }
|
||||
|
||||
concept_comparison CupDefaults for Cup matching Cup.Type {
|
||||
definition CupDefaults for Cup matching Cup.Type {
|
||||
Small { capacity: 200 }
|
||||
Medium { capacity: 350 }
|
||||
Large { capacity: 500 }
|
||||
@@ -1051,7 +1051,7 @@ enumerations used primarily for calendar patterns and simple value sets.
|
||||
- Value/expression type renames aligned with Storybook language terminology
|
||||
|
||||
**Breaking Changes:**
|
||||
- TYPES section (Section 3) now populated with concept, sub_concept, and concept_comparison definitions
|
||||
- TYPES section (Section 3) now populated with concept, sub_concept, and definition declarations
|
||||
- Value discriminant names changed: Int→Number, Float→Decimal, String→Text, Bool→Boolean (wire format unchanged)
|
||||
- Expression discriminant names changed: IntLit→NumberLit, FloatLit→DecimalLit, StringLit→TextLit, BoolLit→BooleanLit (wire format unchanged)
|
||||
- TEMPLATES section: added `species_base: Option<StringRef>` field before `strict`
|
||||
|
||||
Reference in New Issue
Block a user