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:
@@ -98,6 +98,11 @@ pub fn convert_file_with_all_files(
|
||||
// Use declarations are handled during name resolution, not
|
||||
// conversion
|
||||
},
|
||||
| ast::Declaration::Concept(_) |
|
||||
ast::Declaration::SubConcept(_) |
|
||||
ast::Declaration::ConceptComparison(_) => {
|
||||
// TODO: Implement conversion for type system declarations
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -139,6 +139,10 @@ impl NameTable {
|
||||
| Declaration::Location(l) => (l.name.clone(), DeclKind::Location, l.span.clone()),
|
||||
| Declaration::Species(s) => (s.name.clone(), DeclKind::Species, s.span.clone()),
|
||||
| Declaration::Enum(e) => (e.name.clone(), DeclKind::Enum, e.span.clone()),
|
||||
| Declaration::Concept(_) |
|
||||
Declaration::SubConcept(_) |
|
||||
Declaration::ConceptComparison(_) => continue, /* TODO: Implement name resolution
|
||||
* for type system */
|
||||
};
|
||||
|
||||
// For now, qualified path is just the name
|
||||
|
||||
@@ -191,6 +191,11 @@ fn find_references_in_declaration(
|
||||
| Declaration::Use(_) => {
|
||||
// Use statements are handled separately
|
||||
},
|
||||
| Declaration::Concept(_) |
|
||||
Declaration::SubConcept(_) |
|
||||
Declaration::ConceptComparison(_) => {
|
||||
// TODO: Implement reference finding for type system
|
||||
},
|
||||
}
|
||||
|
||||
refs
|
||||
|
||||
Reference in New Issue
Block a user