Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Acorn: top-level parsing experiment
// See for example
acorn.plugins.top_level = function (instance) {
// Could skip other things as well, but this
// is where the most time can be saved
instance.parseBlock = function () {
var node = this.startNode();
var length = this.context.length;
do {;
} while (this.context.length >= length);; // this.expect(tt.braceR);
node.body = [];
return this.finishNode(node, "BlockStatement");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.