From 2e0ca49190ffa4f384a53030adc97be11ccc984b Mon Sep 17 00:00:00 2001 From: ElementG9 Date: Sat, 12 Jan 2019 20:44:07 -0700 Subject: [PATCH] Make Pivot code to run more accessible. --- pivot.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pivot.js b/pivot.js index 46f62ad..e9d92cc 100644 --- a/pivot.js +++ b/pivot.js @@ -1,9 +1,12 @@ +// The Pivot code to run. +var code = `asdf = (a) {return(a++)}`; + // Import the tokenizer and parser. const tokenize = require("./tokenizer.js"); const parse = require("./parser.js"); // Generate the AST. -var ast = parse(tokenize(`asdf = (a) {return(a++)}`)); +var ast = parse(tokenize(code)); // Write the AST to ast.json. var fs = require("fs");