f5c8484ea0
At this point, I have only 2 fails in the Node build, but I'm doing a bunch of manual stuff locally and still have a bunch of hacks.
13 lines
289 B
JavaScript
13 lines
289 B
JavaScript
import parser from "./parser";
|
|
import AST from "./ast";
|
|
|
|
export var parser = parser;
|
|
|
|
export function parse(input) {
|
|
// Just return if an already-compile AST was passed in.
|
|
if(input.constructor === AST.ProgramNode) { return input; }
|
|
|
|
parser.yy = AST;
|
|
return parser.parse(input);
|
|
}
|