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:
2026-02-23 20:37:52 +00:00
parent 583cd485b9
commit 9c18bfa028
33 changed files with 4242 additions and 3061 deletions

View File

@@ -51,7 +51,7 @@ Storybook v0.3 introduces a **compile-time type system** for stronger validation
- **`species`** - Define base archetypes with default fields that characters inherit
- **`concept` / `sub_concept`** - Algebraic data types with dot notation (`sub_concept Cup.Size { Small, Medium, Large }`)
- **`concept_comparison`** - Compile-time pattern matching over concept variants
- **`definition`** - Compile-time pattern matching over concept variants
- **Template species inheritance** - Templates extend species for layered defaults (`template Person: Human { ... }`)
- **Life arc field requirements** - `life_arc Career requires { skill: Number }` validates fields at compile time