add trait checking

This commit is contained in:
2025-08-19 21:54:06 -06:00
parent d370fb44a2
commit 90381840af
6 changed files with 109 additions and 14 deletions

View File

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