aboutsummaryrefslogtreecommitdiff
path: root/lib/node.js
blob: 36bc18a05b38e2870d5ed3be9f6d24e0c7dbb836 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /usr/bin/env node

var fs = require("fs");

function load_global(file) {
    var code = fs.readFileSync(file, "utf8");
    return global.eval(code);
};

load_global("./utils.js");
load_global("./ast.js");
load_global("./parse.js");

/// 

var filename = process.argv[2];
console.time("parse");
var ast = parse(fs.readFileSync(filename, "utf8"));
console.timeEnd("parse");