mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-01-19 20:25:01 +00:00
14 lines
370 B
TypeScript
14 lines
370 B
TypeScript
|
|
import fs from "node:fs/promises";
|
||
|
|
import { inspect } from "node:util";
|
||
|
|
import { parse } from "@/src/torqueScript";
|
||
|
|
|
||
|
|
async function run(scriptPath: string) {
|
||
|
|
const script = await fs.readFile(scriptPath, "utf8");
|
||
|
|
const ast = parse(script);
|
||
|
|
|
||
|
|
console.log(inspect(ast, { colors: true, depth: Infinity }));
|
||
|
|
}
|
||
|
|
|
||
|
|
const scriptPath = process.argv[2];
|
||
|
|
await run(scriptPath);
|