add trait checking
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { defineCommand } from "@bunli/core";
|
||||
import { boringGrammar } from "../parse/grammar";
|
||||
import { semantics } from "../parse/semantics";
|
||||
import TraitChecker from "../types/trait_checker";
|
||||
|
||||
export const run = defineCommand({
|
||||
name: "run",
|
||||
@@ -20,6 +21,8 @@ export const run = defineCommand({
|
||||
if (match.succeeded()) {
|
||||
const adapter = semantics(match);
|
||||
const ast = adapter.toAST();
|
||||
new TraitChecker().withModule(ast);
|
||||
|
||||
console.log(JSON.stringify(ast, null, 2));
|
||||
} else {
|
||||
console.log(match.message);
|
||||
|
||||
Reference in New Issue
Block a user