reference exports.Node so we can replace it if necessary
This commit is contained in:
parent
45bb4b00f0
commit
2fb5a3c46e
6
acorn.js
6
acorn.js
@ -2170,7 +2170,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startNode() {
|
function startNode() {
|
||||||
var node = new Node();
|
var node = new exports.Node();
|
||||||
if (options.locations)
|
if (options.locations)
|
||||||
node.loc = new SourceLocation();
|
node.loc = new SourceLocation();
|
||||||
if (options.directSourceFile)
|
if (options.directSourceFile)
|
||||||
@ -2189,7 +2189,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startNodeAt(pos) {
|
function startNodeAt(pos) {
|
||||||
var node = new Node(), start = pos;
|
var node = new exports.Node(), start = pos;
|
||||||
if (options.locations) {
|
if (options.locations) {
|
||||||
node.loc = new SourceLocation();
|
node.loc = new SourceLocation();
|
||||||
node.loc.start = start[1];
|
node.loc.start = start[1];
|
||||||
@ -2562,7 +2562,7 @@
|
|||||||
// Parse a program. Initializes the parser, reads any number of
|
// Parse a program. Initializes the parser, reads any number of
|
||||||
// statements, and wraps them in a Program node. Optionally takes a
|
// statements, and wraps them in a Program node. Optionally takes a
|
||||||
// `program` argument. If present, the statements will be appended
|
// `program` argument. If present, the statements will be appended
|
||||||
// to its body instead of creating a new node.
|
// to its body instead of creating a new exports.Node.
|
||||||
|
|
||||||
function parseTopLevel(node) {
|
function parseTopLevel(node) {
|
||||||
var first = true;
|
var first = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user