feat(type-system): implement concept_comparison with pattern matching
Added complete support for the new type system syntax including: - concept: Base type declarations - sub_concept: Enum and record sub-type definitions - concept_comparison: Compile-time pattern matching with conditional guards Parser changes: - Added VariantPattern, FieldCondition, and Condition AST nodes - Implemented "is" keyword for pattern matching (e.g., "CupType is Glass or CupType is Plastic") - Added Value::Any variant to support universal type matching - Disambiguated enum-like vs record-like sub_concept syntax LSP updates: - Added Value::Any match arms across code_actions, completion, hover, inlay_hints, and semantic_tokens - Type inference and formatting support for Any values Example fixes: - Fixed syntax error in baker-family behaviors (missing closing brace in nested if) - Removed deprecated core_enums.sb file
This commit is contained in:
@@ -7,3 +7,4 @@
|
||||
cc 8ac445fa78ef3f5ec7fb7d096cbe589988a9478352f82cdac195f5cea57ec47a # shrinks to name = "A", tag = "A", content = "\n¡"
|
||||
cc 739a6de85e6f514f93fc2d077e929658b31c65294dd44b192972ed882a42171a # shrinks to name = "A", tag = "in", content = ""
|
||||
cc 2649e200eb6e916c605196497e1ef5bca64d982d731f71d519c6048671e52ebd # shrinks to name = "if", state_name = "a", target = "A", val = true
|
||||
cc 4ab46dfeb431c0c3fe0e894c969f971fd35ae15eec23e51fe170d925c1889526 # shrinks to keyword = "enum"
|
||||
|
||||
Reference in New Issue
Block a user