added interpreter
This commit is contained in:
@@ -6,6 +6,7 @@ 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";
|
||||
import { TreeWalkInterpreter } from "../interpreter";
|
||||
|
||||
export const run = defineCommand({
|
||||
name: "run",
|
||||
@@ -33,7 +34,9 @@ export const run = defineCommand({
|
||||
typeChecker.withModule(aliasResolvedAst, typeSystem);
|
||||
typeSystem.solve();
|
||||
const typeResolvedAst = typeResolver.withModule(aliasResolvedAst, typeSystem);
|
||||
console.log(JSON.stringify(typeResolvedAst, null, 2));
|
||||
const interpreter = new TreeWalkInterpreter();
|
||||
const result = interpreter.withModule(typeResolvedAst);
|
||||
console.log(JSON.stringify(result, null, 2));
|
||||
|
||||
// console.log(JSON.stringify(aliasResolvedAst, null, 2));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user