feat(ast): add type system declaration nodes
Added AST structures for new type system: - ConceptDecl: Base type definition - SubConceptDecl: Enum or record subtype with SubConceptKind - ConceptComparisonDecl: Compile-time enum mapping - ConceptMapping: Individual mapping entry Added Declaration enum variants and stubs throughout codebase for LSP, resolve, and semantic analysis modules.
This commit is contained in:
@@ -179,6 +179,9 @@ fn get_declaration_name(decl: &Declaration) -> Option<String> {
|
||||
| Declaration::Schedule(s) => Some(s.name.clone()),
|
||||
| Declaration::Behavior(b) => Some(b.name.clone()),
|
||||
| Declaration::Use(_) => None,
|
||||
| Declaration::Concept(_) |
|
||||
Declaration::SubConcept(_) |
|
||||
Declaration::ConceptComparison(_) => None, // TODO: Implement hover for type system
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,6 +199,9 @@ fn format_declaration_hover(decl: &Declaration, _kind: &DeclKind) -> Hover {
|
||||
| Declaration::Schedule(s) => format_schedule_hover(s),
|
||||
| Declaration::Behavior(b) => format_behavior_hover(b),
|
||||
| Declaration::Use(_) => "**use** declaration".to_string(),
|
||||
| Declaration::Concept(_) => "**concept** declaration".to_string(),
|
||||
| Declaration::SubConcept(_) => "**sub_concept** declaration".to_string(),
|
||||
| Declaration::ConceptComparison(_) => "**concept_comparison** declaration".to_string(),
|
||||
};
|
||||
|
||||
Hover {
|
||||
|
||||
Reference in New Issue
Block a user