15 lines
427 B
JavaScript
15 lines
427 B
JavaScript
"use strict";
|
|
|
|
const fs = require("fs");
|
|
const assert = require("assert");
|
|
|
|
const parse = require("../src/parse");
|
|
const astformer = require("../src/astformer");
|
|
const transformers = require("../src/transformers");
|
|
const printAST = require("../src/print-ast");
|
|
|
|
assert(process.argv[2] != null);
|
|
let tree = parse(fs.readFileSync(process.argv[2], "utf8"));
|
|
let transformed = astformer(tree, transformers);
|
|
printAST(transformed);
|