added type resolver
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user