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:
2026-02-13 22:41:03 +00:00
parent f258a526e3
commit 6e3b35e68f
8 changed files with 81 additions and 0 deletions

View File

@@ -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
},
}
}

View File

@@ -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

View File

@@ -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