Make Pivot code to run more accessible.
This commit is contained in:
parent
840bf52012
commit
2e0ca49190
5
pivot.js
5
pivot.js
@ -1,9 +1,12 @@
|
|||||||
|
// The Pivot code to run.
|
||||||
|
var code = `asdf = (a) {return(a++)}`;
|
||||||
|
|
||||||
// Import the tokenizer and parser.
|
// Import the tokenizer and parser.
|
||||||
const tokenize = require("./tokenizer.js");
|
const tokenize = require("./tokenizer.js");
|
||||||
const parse = require("./parser.js");
|
const parse = require("./parser.js");
|
||||||
|
|
||||||
// Generate the AST.
|
// Generate the AST.
|
||||||
var ast = parse(tokenize(`asdf = (a) {return(a++)}`));
|
var ast = parse(tokenize(code));
|
||||||
|
|
||||||
// Write the AST to ast.json.
|
// Write the AST to ast.json.
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user