mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-04-25 06:15:42 +00:00
add TorqueScript transpiler and runtime
This commit is contained in:
parent
c8391a1056
commit
7d10fb7dee
49 changed files with 12324 additions and 2075 deletions
11
scripts/transpile-torquescript.ts
Normal file
11
scripts/transpile-torquescript.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import fs from "node:fs/promises";
|
||||
import { transpile } from "@/src/torqueScript";
|
||||
|
||||
async function run(scriptPath: string) {
|
||||
const script = await fs.readFile(scriptPath, "utf8");
|
||||
const { code } = transpile(script);
|
||||
console.log(code);
|
||||
}
|
||||
|
||||
const scriptPath = process.argv[2];
|
||||
await run(scriptPath);
|
||||
Loading…
Add table
Add a link
Reference in a new issue