added type resolver

This commit is contained in:
2025-08-30 22:11:19 -06:00
parent 66c7864df0
commit dd4f5b9ee6
3 changed files with 220 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import TraitChecker from "../types/trait_checker";
import { TypeAliasResolver } from "../types/type_alias_resolution";
import { TypeSystem } from "../types/type_system";
import { TypeChecker } from "../types/type_checker";
import { TypeResolver } from "../types/type_resolver";
export const run = defineCommand({
name: "run",
@@ -28,9 +29,11 @@ export const run = defineCommand({
const aliasResolvedAst = new TypeAliasResolver().withModule(ast);
const typeSystem = new TypeSystem();
const typeChecker = new TypeChecker();
const typeResolver = new TypeResolver();
typeChecker.withModule(aliasResolvedAst, typeSystem);
typeSystem.solve();
console.log(JSON.stringify(typeSystem, null, 2));
const typeResolvedAst = typeResolver.withModule(aliasResolvedAst, typeSystem);
console.log(JSON.stringify(typeResolvedAst, null, 2));
// console.log(JSON.stringify(aliasResolvedAst, null, 2));
} else {