Merge branch 'master' of https://github.com/marijnh/acorn
Conflicts: acorn.js package.json
This commit is contained in:
@@ -43,10 +43,9 @@
|
||||
else callback("ok", test.code);
|
||||
} else {
|
||||
var mis = misMatch(test.ast, ast);
|
||||
if (!mis && test.comments) mis = misMatch(test.comments, comments);
|
||||
if (mis) callback("fail", test.code, mis);
|
||||
if (test.comments) mis = misMatch(test.comments, comments);
|
||||
if (!mis) callback("ok", test.code);
|
||||
else callback("fail", test.code, mis);
|
||||
else callback("ok", test.code);
|
||||
}
|
||||
} catch(e) {
|
||||
if (test.error && e instanceof SyntaxError) {
|
||||
@@ -67,7 +66,7 @@
|
||||
return str + " (" + pt + ")";
|
||||
}
|
||||
|
||||
function misMatch(exp, act) {
|
||||
var misMatch = exports.misMatch = function(exp, act) {
|
||||
if (!exp || !act || (typeof exp != "object") || (typeof act != "object")) {
|
||||
if (exp !== act) return ppJSON(exp) + " !== " + ppJSON(act);
|
||||
} else if (exp.splice) {
|
||||
@@ -83,7 +82,7 @@
|
||||
if (mis) return addPath(mis, prop);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function mangle(ast) {
|
||||
if (typeof ast != "object" || !ast) return;
|
||||
|
||||
@@ -1511,10 +1511,10 @@ test("e => ({ property: 42 })", {
|
||||
end: {line: 1, column: 20}
|
||||
}
|
||||
}],
|
||||
range: [5, 23],
|
||||
range: [6, 22],
|
||||
loc: {
|
||||
start: {line: 1, column: 5},
|
||||
end: {line: 1, column: 23}
|
||||
start: {line: 1, column: 6},
|
||||
end: {line: 1, column: 22}
|
||||
}
|
||||
},
|
||||
rest: null,
|
||||
@@ -2330,10 +2330,10 @@ test("(x => x)", {
|
||||
rest: null,
|
||||
generator: false,
|
||||
expression: true,
|
||||
range: [0, 8],
|
||||
range: [1, 7],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 8}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 7}
|
||||
}
|
||||
},
|
||||
range: [0, 8],
|
||||
@@ -2500,19 +2500,19 @@ test("(x) => ((y, z) => (x, y, z))", {
|
||||
}
|
||||
}
|
||||
],
|
||||
range: [18, 27],
|
||||
range: [19, 26],
|
||||
loc: {
|
||||
start: {line: 1, column: 18},
|
||||
end: {line: 1, column: 27}
|
||||
start: {line: 1, column: 19},
|
||||
end: {line: 1, column: 26}
|
||||
}
|
||||
},
|
||||
rest: null,
|
||||
generator: false,
|
||||
expression: true,
|
||||
range: [7, 28],
|
||||
range: [8, 27],
|
||||
loc: {
|
||||
start: {line: 1, column: 7},
|
||||
end: {line: 1, column: 28}
|
||||
start: {line: 1, column: 8},
|
||||
end: {line: 1, column: 27}
|
||||
}
|
||||
},
|
||||
rest: null,
|
||||
@@ -4268,10 +4268,10 @@ test("({ responseText: text }) = res", {
|
||||
end: {line: 1, column: 21}
|
||||
}
|
||||
}],
|
||||
range: [0, 24],
|
||||
range: [1, 23],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 24}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 23}
|
||||
}
|
||||
},
|
||||
right: {
|
||||
@@ -6115,10 +6115,10 @@ test("(function* () { yield v })", {
|
||||
rest: null,
|
||||
generator: true,
|
||||
expression: false,
|
||||
range: [0, 26],
|
||||
range: [1, 25],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 26}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 25}
|
||||
}
|
||||
},
|
||||
range: [0, 26],
|
||||
@@ -6195,10 +6195,10 @@ test("(function* () { yield\nv })", {
|
||||
rest: null,
|
||||
generator: true,
|
||||
expression: false,
|
||||
range: [0, 26],
|
||||
range: [1, 25],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 2, column: 4}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 2, column: 3}
|
||||
}
|
||||
},
|
||||
range: [0, 26],
|
||||
@@ -6264,10 +6264,10 @@ test("(function* () { yield *v })", {
|
||||
rest: null,
|
||||
generator: true,
|
||||
expression: false,
|
||||
range: [0, 27],
|
||||
range: [1, 26],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 27}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 26}
|
||||
}
|
||||
},
|
||||
range: [0, 27],
|
||||
@@ -6572,10 +6572,10 @@ test("(function* () { yield yield 10 })", {
|
||||
rest: null,
|
||||
generator: true,
|
||||
expression: false,
|
||||
range: [0, 33],
|
||||
range: [1, 32],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 33}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 32}
|
||||
}
|
||||
},
|
||||
range: [0, 33],
|
||||
@@ -8138,10 +8138,10 @@ test("\"use strict\"; (class A {constructor() { super() }})", {
|
||||
end: {line: 1, column: 50}
|
||||
}
|
||||
},
|
||||
range: [14, 51],
|
||||
range: [15, 50],
|
||||
loc: {
|
||||
start: {line: 1, column: 14},
|
||||
end: {line: 1, column: 51}
|
||||
start: {line: 1, column: 15},
|
||||
end: {line: 1, column: 50}
|
||||
}
|
||||
},
|
||||
range: [14, 51],
|
||||
@@ -8482,10 +8482,10 @@ test("\"use strict\"; (class A { static constructor() { super() }})", {
|
||||
end: {line: 1, column: 58}
|
||||
}
|
||||
},
|
||||
range: [14, 59],
|
||||
range: [15, 58],
|
||||
loc: {
|
||||
start: {line: 1, column: 14},
|
||||
end: {line: 1, column: 59}
|
||||
start: {line: 1, column: 15},
|
||||
end: {line: 1, column: 58}
|
||||
}
|
||||
},
|
||||
range: [14, 59],
|
||||
@@ -9437,10 +9437,10 @@ test("({[x]: 10})", {
|
||||
end: {line: 1, column: 9}
|
||||
}
|
||||
}],
|
||||
range: [0, 11],
|
||||
range: [1, 10],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 11}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 10}
|
||||
}
|
||||
},
|
||||
range: [0, 11],
|
||||
@@ -9517,10 +9517,10 @@ test("({[\"x\" + \"y\"]: 10})", {
|
||||
end: {line: 1, column: 17}
|
||||
}
|
||||
}],
|
||||
range: [0, 19],
|
||||
range: [1, 18],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 19}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 18}
|
||||
}
|
||||
},
|
||||
range: [0, 19],
|
||||
@@ -9590,10 +9590,10 @@ test("({[x]: function() {}})", {
|
||||
end: {line: 1, column: 20}
|
||||
}
|
||||
}],
|
||||
range: [0, 22],
|
||||
range: [1, 21],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 22}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 21}
|
||||
}
|
||||
},
|
||||
range: [0, 22],
|
||||
@@ -9683,10 +9683,10 @@ test("({[x]: 10, y: 20})", {
|
||||
}
|
||||
}
|
||||
],
|
||||
range: [0, 18],
|
||||
range: [1, 17],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 18}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 17}
|
||||
}
|
||||
},
|
||||
range: [0, 18],
|
||||
@@ -9810,10 +9810,10 @@ test("({get [x]() {}, set [x](v) {}})", {
|
||||
}
|
||||
}
|
||||
],
|
||||
range: [0, 31],
|
||||
range: [1, 30],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 31}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 30}
|
||||
}
|
||||
},
|
||||
range: [0, 31],
|
||||
@@ -9883,10 +9883,10 @@ test("({[x]() {}})", {
|
||||
end: {line: 1, column: 10}
|
||||
}
|
||||
}],
|
||||
range: [0, 12],
|
||||
range: [1, 11],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 12}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 11}
|
||||
}
|
||||
},
|
||||
range: [0, 12],
|
||||
@@ -10769,10 +10769,10 @@ test("({f: function({x} = {x: 10}) {}})", {
|
||||
end: {line: 1, column: 31}
|
||||
}
|
||||
}],
|
||||
range: [0, 33],
|
||||
range: [1, 32],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 33}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 32}
|
||||
}
|
||||
},
|
||||
range: [0, 33],
|
||||
@@ -10917,10 +10917,10 @@ test("({f({x} = {x: 10}) {}})", {
|
||||
end: {line: 1, column: 21}
|
||||
}
|
||||
}],
|
||||
range: [0, 23],
|
||||
range: [1, 22],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 23}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 22}
|
||||
}
|
||||
},
|
||||
range: [0, 23],
|
||||
@@ -11073,10 +11073,10 @@ test("(class {f({x} = {x: 10}) {}})", {
|
||||
end: {line: 1, column: 28}
|
||||
}
|
||||
},
|
||||
range: [0, 29],
|
||||
range: [1, 28],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 29}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 28}
|
||||
}
|
||||
},
|
||||
range: [0, 29],
|
||||
@@ -11192,10 +11192,10 @@ test("(({x} = {x: 10}) => {})", {
|
||||
rest: null,
|
||||
generator: false,
|
||||
expression: false,
|
||||
range: [0, 23],
|
||||
range: [1, 22],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 23}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 22}
|
||||
}
|
||||
},
|
||||
range: [0, 23],
|
||||
@@ -12267,10 +12267,10 @@ test("(function x([ a, b ]){})", {
|
||||
rest: null,
|
||||
generator: false,
|
||||
expression: false,
|
||||
range: [0, 24],
|
||||
range: [1, 23],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 24}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 23}
|
||||
}
|
||||
},
|
||||
range: [0, 24],
|
||||
@@ -12388,10 +12388,10 @@ test("(function x({ a, b }){})", {
|
||||
rest: null,
|
||||
generator: false,
|
||||
expression: false,
|
||||
range: [0, 24],
|
||||
range: [1, 23],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 24}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 23}
|
||||
}
|
||||
},
|
||||
range: [0, 24],
|
||||
@@ -12467,10 +12467,10 @@ test("(function x(...[ a, b ]){})", {
|
||||
},
|
||||
generator: false,
|
||||
expression: false,
|
||||
range: [0, 27],
|
||||
range: [1, 26],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 27}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 26}
|
||||
}
|
||||
},
|
||||
range: [0, 27],
|
||||
@@ -12704,10 +12704,10 @@ test("(function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){})", {
|
||||
},
|
||||
generator: false,
|
||||
expression: false,
|
||||
range: [0, 56],
|
||||
range: [1, 55],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 56}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 55}
|
||||
}
|
||||
},
|
||||
range: [0, 56],
|
||||
@@ -12804,10 +12804,10 @@ test("({ x([ a, b ]){} })", {
|
||||
end: {line: 1, column: 16}
|
||||
}
|
||||
}],
|
||||
range: [0, 19],
|
||||
range: [1, 18],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 19}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 18}
|
||||
}
|
||||
},
|
||||
range: [0, 19],
|
||||
@@ -12904,10 +12904,10 @@ test("({ x(...[ a, b ]){} })", {
|
||||
end: {line: 1, column: 19}
|
||||
}
|
||||
}],
|
||||
range: [0, 22],
|
||||
range: [1, 21],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 22}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 21}
|
||||
}
|
||||
},
|
||||
range: [0, 22],
|
||||
@@ -13162,10 +13162,10 @@ test("({ x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){} })", {
|
||||
end: {line: 1, column: 48}
|
||||
}
|
||||
}],
|
||||
range: [0, 51],
|
||||
range: [1, 50],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 51}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 50}
|
||||
}
|
||||
},
|
||||
range: [0, 51],
|
||||
@@ -15086,10 +15086,10 @@ test("(function () { yield* 10 })", {
|
||||
rest: null,
|
||||
generator: false,
|
||||
expression: false,
|
||||
range: [0, 27],
|
||||
range: [1, 26],
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 27}
|
||||
start: {line: 1, column: 1},
|
||||
end: {line: 1, column: 26}
|
||||
}
|
||||
},
|
||||
range: [0, 27],
|
||||
@@ -15246,3 +15246,170 @@ testFail("\"use strict\"; (eval) => 42", "Defining 'eval' in strict mode (1:15)"
|
||||
testFail("(eval) => { \"use strict\"; 42 }", "Defining 'eval' in strict mode (1:1)", {ecmaVersion: 6});
|
||||
|
||||
testFail("({ get test() { } }) => 42", "Unexpected token (1:7)", {ecmaVersion: 6});
|
||||
|
||||
/* Regression tests */
|
||||
|
||||
// # https://github.com/marijnh/acorn/issues/127
|
||||
test('doSmth(`${x} + ${y} = ${x + y}`)', {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 32,
|
||||
body: [{
|
||||
type: "ExpressionStatement",
|
||||
start: 0,
|
||||
end: 32,
|
||||
expression: {
|
||||
type: "CallExpression",
|
||||
start: 0,
|
||||
end: 32,
|
||||
callee: {
|
||||
type: "Identifier",
|
||||
start: 0,
|
||||
end: 6,
|
||||
name: "doSmth"
|
||||
},
|
||||
arguments: [{
|
||||
type: "TemplateLiteral",
|
||||
start: 7,
|
||||
end: 31,
|
||||
expressions: [
|
||||
{
|
||||
type: "Identifier",
|
||||
start: 10,
|
||||
end: 11,
|
||||
name: "x"
|
||||
},
|
||||
{
|
||||
type: "Identifier",
|
||||
start: 17,
|
||||
end: 18,
|
||||
name: "y"
|
||||
},
|
||||
{
|
||||
type: "BinaryExpression",
|
||||
start: 24,
|
||||
end: 29,
|
||||
left: {
|
||||
type: "Identifier",
|
||||
start: 24,
|
||||
end: 25,
|
||||
name: "x"
|
||||
},
|
||||
operator: "+",
|
||||
right: {
|
||||
type: "Identifier",
|
||||
start: 28,
|
||||
end: 29,
|
||||
name: "y"
|
||||
}
|
||||
}
|
||||
],
|
||||
quasis: [
|
||||
{
|
||||
type: "TemplateElement",
|
||||
start: 8,
|
||||
end: 8,
|
||||
value: {cooked: "", raw: ""},
|
||||
tail: false
|
||||
},
|
||||
{
|
||||
type: "TemplateElement",
|
||||
start: 12,
|
||||
end: 15,
|
||||
value: {cooked: " + ", raw: " + "},
|
||||
tail: false
|
||||
},
|
||||
{
|
||||
type: "TemplateElement",
|
||||
start: 19,
|
||||
end: 22,
|
||||
value: {cooked: " = ", raw: " = "},
|
||||
tail: false
|
||||
},
|
||||
{
|
||||
type: "TemplateElement",
|
||||
start: 30,
|
||||
end: 30,
|
||||
value: {cooked: "", raw: ""},
|
||||
tail: true
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
}]
|
||||
}, {ecmaVersion: 6});
|
||||
|
||||
// # https://github.com/marijnh/acorn/issues/129
|
||||
test('function normal(x, y = 10) {}', {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 29,
|
||||
body: [{
|
||||
type: "FunctionDeclaration",
|
||||
start: 0,
|
||||
end: 29,
|
||||
id: {
|
||||
type: "Identifier",
|
||||
start: 9,
|
||||
end: 15,
|
||||
name: "normal"
|
||||
},
|
||||
params: [
|
||||
{
|
||||
type: "Identifier",
|
||||
start: 16,
|
||||
end: 17,
|
||||
name: "x"
|
||||
},
|
||||
{
|
||||
type: "Identifier",
|
||||
start: 19,
|
||||
end: 20,
|
||||
name: "y"
|
||||
}
|
||||
],
|
||||
defaults: [
|
||||
null,
|
||||
{
|
||||
type: "Literal",
|
||||
start: 23,
|
||||
end: 25,
|
||||
value: 10,
|
||||
raw: "10"
|
||||
}
|
||||
],
|
||||
rest: null,
|
||||
generator: false,
|
||||
body: {
|
||||
type: "BlockStatement",
|
||||
start: 27,
|
||||
end: 29,
|
||||
body: []
|
||||
},
|
||||
expression: false
|
||||
}]
|
||||
}, {ecmaVersion: 6});
|
||||
|
||||
test("'use strict'; function f([x,,z]) {}", {}, {ecmaVersion: 6});
|
||||
|
||||
// test preserveParens option with arrow functions
|
||||
test("() => 42", {
|
||||
type: "Program",
|
||||
body: [{
|
||||
type: "ExpressionStatement",
|
||||
expression: {
|
||||
type: "ArrowFunctionExpression"
|
||||
}
|
||||
}]
|
||||
}, {ecmaVersion: 6, preserveParens: true});
|
||||
|
||||
// test preserveParens with generators
|
||||
test("(for (x of array) for (y of array2) if (x === test) x)", {
|
||||
type: "Program",
|
||||
body: [{
|
||||
type: "ExpressionStatement",
|
||||
expression: {
|
||||
type: "ComprehensionExpression"
|
||||
}
|
||||
}]
|
||||
}, {ecmaVersion: 6, preserveParens: true});
|
||||
|
||||
@@ -2029,10 +2029,10 @@ var fbTestFixture = {
|
||||
},
|
||||
closingElement: null,
|
||||
children: [],
|
||||
range: [0, 9],
|
||||
range: [1, 8],
|
||||
loc: {
|
||||
start: { line: 1, column: 0 },
|
||||
end: { line: 1, column: 9 }
|
||||
start: { line: 1, column: 1 },
|
||||
end: { line: 1, column: 8 }
|
||||
}
|
||||
},
|
||||
right: {
|
||||
@@ -3215,4 +3215,4 @@ for (var code in fbTestFixture.XJS) {
|
||||
locations: true,
|
||||
ranges: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
321
test/tests.js
321
test/tests.js
@@ -2,9 +2,8 @@
|
||||
// (http://esprima.org/test/)
|
||||
|
||||
if (typeof exports != "undefined") {
|
||||
var test = require("./driver.js").test;
|
||||
var testFail = require("./driver.js").testFail;
|
||||
var testAssert = require("./driver.js").testAssert;
|
||||
var driver = require("./driver.js");
|
||||
var test = driver.test, testFail = driver.testFail, testAssert = driver.testAssert, misMatch = driver.misMatch;
|
||||
var acorn = require("..");
|
||||
}
|
||||
|
||||
@@ -174,6 +173,118 @@ test("(1 + 2 ) * 3", {
|
||||
}
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 6
|
||||
}
|
||||
}
|
||||
},
|
||||
operator: "*",
|
||||
right: {
|
||||
type: "Literal",
|
||||
value: 3,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 11
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 12
|
||||
}
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 12
|
||||
}
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 12
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 12
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test("(1 + 2 ) * 3", {
|
||||
type: "Program",
|
||||
body: [
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
expression: {
|
||||
type: "BinaryExpression",
|
||||
left: {
|
||||
type: "ParenthesizedExpression",
|
||||
expression: {
|
||||
type: "BinaryExpression",
|
||||
left: {
|
||||
type: "Literal",
|
||||
value: 1,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 2
|
||||
}
|
||||
}
|
||||
},
|
||||
operator: "+",
|
||||
right: {
|
||||
type: "Literal",
|
||||
value: 2,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 5
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 6
|
||||
}
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 6
|
||||
}
|
||||
}
|
||||
},
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -233,8 +344,13 @@ test("(1 + 2 ) * 3", {
|
||||
column: 12
|
||||
}
|
||||
}
|
||||
}, {
|
||||
locations: true,
|
||||
preserveParens: true
|
||||
});
|
||||
|
||||
test("(x) = 23", {}, { preserveParens: true });
|
||||
|
||||
test("x = []", {
|
||||
type: "Program",
|
||||
body: [
|
||||
@@ -8202,11 +8318,11 @@ test("( new foo).bar()", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 2
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 10
|
||||
column: 9
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -8371,11 +8487,11 @@ test("( foo )()", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 5
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 11
|
||||
column: 8
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -17217,11 +17333,11 @@ test("if (morning) (function(){})", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 13
|
||||
column: 14
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 27
|
||||
column: 26
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -20508,11 +20624,11 @@ test("(function(){ return })", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 22
|
||||
column: 21
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -20581,11 +20697,11 @@ test("(function(){ return; })", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 23
|
||||
column: 22
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -20667,11 +20783,11 @@ test("(function(){ return x; })", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 25
|
||||
column: 24
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -20781,11 +20897,11 @@ test("(function(){ return x * y })", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 28
|
||||
column: 27
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -23194,11 +23310,11 @@ test("(function test(t, t) { })", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 25
|
||||
column: 24
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -24412,11 +24528,11 @@ test("(function(){})", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 1,
|
||||
column: 14
|
||||
column: 13
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -25522,11 +25638,11 @@ test("(function(){ return\nx; })", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 2,
|
||||
column: 5
|
||||
column: 4
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -25622,11 +25738,11 @@ test("(function(){ return // Comment\nx; })", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 2,
|
||||
column: 5
|
||||
column: 4
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -25722,11 +25838,11 @@ test("(function(){ return/* Multiline\nComment */x; })", {
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 2,
|
||||
column: 15
|
||||
column: 14
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -26026,8 +26142,6 @@ test("", {
|
||||
|
||||
test("foo: if (true) break foo;", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 25,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26041,8 +26155,6 @@ test("foo: if (true) break foo;", {
|
||||
body: [
|
||||
{
|
||||
type: "LabeledStatement",
|
||||
start: 0,
|
||||
end: 25,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26055,8 +26167,6 @@ test("foo: if (true) break foo;", {
|
||||
},
|
||||
body: {
|
||||
type: "IfStatement",
|
||||
start: 5,
|
||||
end: 25,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26069,8 +26179,6 @@ test("foo: if (true) break foo;", {
|
||||
},
|
||||
test: {
|
||||
type: "Literal",
|
||||
start: 9,
|
||||
end: 13,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26085,8 +26193,6 @@ test("foo: if (true) break foo;", {
|
||||
},
|
||||
consequent: {
|
||||
type: "BreakStatement",
|
||||
start: 15,
|
||||
end: 25,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26099,8 +26205,6 @@ test("foo: if (true) break foo;", {
|
||||
},
|
||||
label: {
|
||||
type: "Identifier",
|
||||
start: 21,
|
||||
end: 24,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26118,8 +26222,6 @@ test("foo: if (true) break foo;", {
|
||||
},
|
||||
label: {
|
||||
type: "Identifier",
|
||||
start: 0,
|
||||
end: 3,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26138,8 +26240,6 @@ test("foo: if (true) break foo;", {
|
||||
|
||||
test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 40,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26153,8 +26253,6 @@ test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
body: [
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 0,
|
||||
end: 40,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26167,21 +26265,18 @@ test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
},
|
||||
expression: {
|
||||
type: "CallExpression",
|
||||
start: 0,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
column: 0
|
||||
column: 1
|
||||
},
|
||||
end: {
|
||||
line: 4,
|
||||
column: 4
|
||||
column: 3
|
||||
}
|
||||
},
|
||||
callee: {
|
||||
type: "FunctionExpression",
|
||||
start: 1,
|
||||
end: 37,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26196,8 +26291,6 @@ test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
params: [],
|
||||
body: {
|
||||
type: "BlockStatement",
|
||||
start: 13,
|
||||
end: 37,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26211,8 +26304,6 @@ test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
body: [
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 16,
|
||||
end: 29,
|
||||
loc: {
|
||||
start: {
|
||||
line: 2,
|
||||
@@ -26225,8 +26316,6 @@ test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
},
|
||||
expression: {
|
||||
type: "Literal",
|
||||
start: 16,
|
||||
end: 28,
|
||||
loc: {
|
||||
start: {
|
||||
line: 2,
|
||||
@@ -26242,8 +26331,6 @@ test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
},
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 31,
|
||||
end: 35,
|
||||
loc: {
|
||||
start: {
|
||||
line: 3,
|
||||
@@ -26256,8 +26343,6 @@ test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
},
|
||||
expression: {
|
||||
type: "Literal",
|
||||
start: 31,
|
||||
end: 34,
|
||||
loc: {
|
||||
start: {
|
||||
line: 3,
|
||||
@@ -26275,7 +26360,6 @@ test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
}
|
||||
},
|
||||
arguments: [],
|
||||
end: 40
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -26283,43 +26367,29 @@ test("(function () {\n 'use strict';\n '\0';\n}())", {
|
||||
|
||||
test("123..toString(10)", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 17,
|
||||
body: [
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 0,
|
||||
end: 17,
|
||||
expression: {
|
||||
type: "CallExpression",
|
||||
start: 0,
|
||||
callee: {
|
||||
type: "MemberExpression",
|
||||
start: 0,
|
||||
object: {
|
||||
type: "Literal",
|
||||
start: 0,
|
||||
end: 4,
|
||||
value: 123
|
||||
},
|
||||
property: {
|
||||
type: "Identifier",
|
||||
start: 5,
|
||||
end: 13,
|
||||
name: "toString"
|
||||
},
|
||||
computed: false,
|
||||
end: 13
|
||||
},
|
||||
arguments: [
|
||||
{
|
||||
type: "Literal",
|
||||
start: 14,
|
||||
end: 16,
|
||||
value: 10
|
||||
}
|
||||
],
|
||||
end: 17
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -26327,30 +26397,20 @@ test("123..toString(10)", {
|
||||
|
||||
test("123.+2", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 6,
|
||||
body: [
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 0,
|
||||
end: 6,
|
||||
expression: {
|
||||
type: "BinaryExpression",
|
||||
start: 0,
|
||||
left: {
|
||||
type: "Literal",
|
||||
start: 0,
|
||||
end: 4,
|
||||
value: 123
|
||||
},
|
||||
operator: "+",
|
||||
right: {
|
||||
type: "Literal",
|
||||
start: 5,
|
||||
end: 6,
|
||||
value: 2
|
||||
},
|
||||
end: 6
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -26358,28 +26418,18 @@ test("123.+2", {
|
||||
|
||||
test("a\u2028b", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 3,
|
||||
body: [
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 0,
|
||||
end: 1,
|
||||
expression: {
|
||||
type: "Identifier",
|
||||
start: 0,
|
||||
end: 1,
|
||||
name: "a"
|
||||
}
|
||||
},
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 2,
|
||||
end: 3,
|
||||
expression: {
|
||||
type: "Identifier",
|
||||
start: 2,
|
||||
end: 3,
|
||||
name: "b"
|
||||
}
|
||||
}
|
||||
@@ -26437,28 +26487,18 @@ test("foo: 10; foo: 20;", {
|
||||
|
||||
test("if(1)/ foo/", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 12,
|
||||
body: [
|
||||
{
|
||||
type: "IfStatement",
|
||||
start: 0,
|
||||
end: 12,
|
||||
test: {
|
||||
type: "Literal",
|
||||
start: 3,
|
||||
end: 4,
|
||||
value: 1,
|
||||
raw: "1"
|
||||
},
|
||||
consequent: {
|
||||
type: "ExpressionStatement",
|
||||
start: 5,
|
||||
end: 12,
|
||||
expression: {
|
||||
type: "Literal",
|
||||
start: 5,
|
||||
end: 12,
|
||||
raw: "/ foo/"
|
||||
}
|
||||
},
|
||||
@@ -26475,8 +26515,6 @@ test("price_9̶9̶_89", {
|
||||
expression: {
|
||||
type: "Identifier",
|
||||
name: "price_9̶9̶_89",
|
||||
start: 0,
|
||||
end: 13
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -26486,8 +26524,6 @@ test("price_9̶9̶_89", {
|
||||
|
||||
test("var a = 1;", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 10,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26502,8 +26538,6 @@ test("var a = 1;", {
|
||||
body: [
|
||||
{
|
||||
type: "VariableDeclaration",
|
||||
start: 0,
|
||||
end: 10,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26518,8 +26552,6 @@ test("var a = 1;", {
|
||||
declarations: [
|
||||
{
|
||||
type: "VariableDeclarator",
|
||||
start: 4,
|
||||
end: 9,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26533,8 +26565,6 @@ test("var a = 1;", {
|
||||
},
|
||||
id: {
|
||||
type: "Identifier",
|
||||
start: 4,
|
||||
end: 5,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26550,8 +26580,6 @@ test("var a = 1;", {
|
||||
},
|
||||
init: {
|
||||
type: "Literal",
|
||||
start: 8,
|
||||
end: 9,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -26624,28 +26652,18 @@ test("{}/=/", {
|
||||
|
||||
test("foo <!--bar\n+baz", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 16,
|
||||
body: [
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 0,
|
||||
end: 16,
|
||||
expression: {
|
||||
type: "BinaryExpression",
|
||||
start: 0,
|
||||
end: 16,
|
||||
left: {
|
||||
type: "Identifier",
|
||||
start: 0,
|
||||
end: 3,
|
||||
name: "foo"
|
||||
},
|
||||
operator: "+",
|
||||
right: {
|
||||
type: "Identifier",
|
||||
start: 13,
|
||||
end: 16,
|
||||
name: "baz"
|
||||
}
|
||||
}
|
||||
@@ -26795,7 +26813,7 @@ testFail("func() = 4",
|
||||
"Assigning to rvalue (1:0)");
|
||||
|
||||
testFail("(1 + 1) = 10",
|
||||
"Assigning to rvalue (1:0)");
|
||||
"Assigning to rvalue (1:1)");
|
||||
|
||||
testFail("1++",
|
||||
"Assigning to rvalue (1:0)");
|
||||
@@ -26810,7 +26828,7 @@ testFail("--1",
|
||||
"Assigning to rvalue (1:2)");
|
||||
|
||||
testFail("for((1 + 1) in list) process(x);",
|
||||
"Assigning to rvalue (1:4)");
|
||||
"Assigning to rvalue (1:5)");
|
||||
|
||||
testFail("[",
|
||||
"Unexpected token (1:1)");
|
||||
@@ -27285,6 +27303,9 @@ testFail("(function a(eval) { \"use strict\"; })",
|
||||
testFail("(function a(package) { \"use strict\"; })",
|
||||
"Defining 'package' in strict mode (1:12)");
|
||||
|
||||
testFail("\"use strict\";function foo(){\"use strict\";}function bar(){var v = 015}",
|
||||
"Invalid number (1:65)");
|
||||
|
||||
testFail("var this = 10;", "Unexpected token (1:4)");
|
||||
|
||||
testFail("throw\n10;", "Illegal newline after throw (1:5)");
|
||||
@@ -27306,8 +27327,6 @@ testFail("for(let x = 0;;);", "Unexpected token (1:8)");
|
||||
|
||||
test("let++", {
|
||||
type: "Program",
|
||||
start: 0,
|
||||
end: 5,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -27321,8 +27340,6 @@ test("let++", {
|
||||
body: [
|
||||
{
|
||||
type: "ExpressionStatement",
|
||||
start: 0,
|
||||
end: 5,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -27335,8 +27352,6 @@ test("let++", {
|
||||
},
|
||||
expression: {
|
||||
type: "UpdateExpression",
|
||||
start: 0,
|
||||
end: 5,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -27351,8 +27366,6 @@ test("let++", {
|
||||
prefix: false,
|
||||
argument: {
|
||||
type: "Identifier",
|
||||
start: 0,
|
||||
end: 3,
|
||||
loc: {
|
||||
start: {
|
||||
line: 1,
|
||||
@@ -28594,6 +28607,10 @@ testFail("const a;", "Unexpected token (1:7)", {ecmaVersion: 6});
|
||||
|
||||
testFail("for(const x = 0;;);", "Unexpected token (1:4)", {ecmaVersion: 6});
|
||||
|
||||
testFail("for(x of a);", "Unexpected token (1:6)");
|
||||
|
||||
testFail("for(var x of a);", "Unexpected token (1:10)");
|
||||
|
||||
// Assertion Tests
|
||||
(function() {
|
||||
var actualComments = [],
|
||||
@@ -28697,8 +28714,6 @@ test("<!--\n;", {
|
||||
{
|
||||
type: tokTypes._var,
|
||||
value: "var",
|
||||
start: 0,
|
||||
end: 3,
|
||||
loc: {
|
||||
start: {line: 1, column: 0},
|
||||
end: {line: 1, column: 3}
|
||||
@@ -28707,8 +28722,6 @@ test("<!--\n;", {
|
||||
{
|
||||
type: tokTypes.name,
|
||||
value: "x",
|
||||
start: 4,
|
||||
end: 5,
|
||||
loc: {
|
||||
start: {line: 1, column: 4},
|
||||
end: {line: 1, column: 5}
|
||||
@@ -28717,8 +28730,6 @@ test("<!--\n;", {
|
||||
{
|
||||
type: tokTypes.eq,
|
||||
value: "=",
|
||||
start: 6,
|
||||
end: 7,
|
||||
loc: {
|
||||
start: {line: 1, column: 6},
|
||||
end: {line: 1, column: 7}
|
||||
@@ -28727,8 +28738,6 @@ test("<!--\n;", {
|
||||
{
|
||||
type: tokTypes.parenL,
|
||||
value: undefined,
|
||||
start: 8,
|
||||
end: 9,
|
||||
loc: {
|
||||
start: {line: 1, column: 8},
|
||||
end: {line: 1, column: 9}
|
||||
@@ -28737,8 +28746,6 @@ test("<!--\n;", {
|
||||
{
|
||||
type: tokTypes.num,
|
||||
value: 1,
|
||||
start: 9,
|
||||
end: 10,
|
||||
loc: {
|
||||
start: {line: 1, column: 9},
|
||||
end: {line: 1, column: 10}
|
||||
@@ -28747,8 +28754,6 @@ test("<!--\n;", {
|
||||
{
|
||||
type: {binop: 9, prefix: true, beforeExpr: true},
|
||||
value: "+",
|
||||
start: 11,
|
||||
end: 12,
|
||||
loc: {
|
||||
start: {line: 1, column: 11},
|
||||
end: {line: 1, column: 12}
|
||||
@@ -28757,8 +28762,6 @@ test("<!--\n;", {
|
||||
{
|
||||
type: tokTypes.num,
|
||||
value: 2,
|
||||
start: 13,
|
||||
end: 14,
|
||||
loc: {
|
||||
start: {line: 1, column: 13},
|
||||
end: {line: 1, column: 14}
|
||||
@@ -28767,8 +28770,6 @@ test("<!--\n;", {
|
||||
{
|
||||
type: tokTypes.parenR,
|
||||
value: undefined,
|
||||
start: 14,
|
||||
end: 15,
|
||||
loc: {
|
||||
start: {line: 1, column: 14},
|
||||
end: {line: 1, column: 15}
|
||||
@@ -28777,8 +28778,6 @@ test("<!--\n;", {
|
||||
{
|
||||
type: tokTypes.eof,
|
||||
value: undefined,
|
||||
start: 15,
|
||||
end: 15,
|
||||
loc: {
|
||||
start: {line: 1, column: 15},
|
||||
end: {line: 1, column: 15}
|
||||
@@ -28787,17 +28786,11 @@ test("<!--\n;", {
|
||||
];
|
||||
testAssert('var x = (1 + 2)', function assert(ast) {
|
||||
if (actualTokens.length !== expectedTokens.length) {
|
||||
return JSON.stringify(actualTokens) + " !== " + JSON.stringify(expectedTokens);
|
||||
return "Bad token stream length: expected " + expectedTokens.length + ", got " + actualTokens.length;
|
||||
} else {
|
||||
for (var i=0, n=actualTokens.length; i < n; i++) {
|
||||
var actualToken = JSON.stringify(
|
||||
actualTokens[i],
|
||||
// just remove this when startLoc/endLoc support is dropped
|
||||
function (key, value) { if (key !== 'startLoc' && key !== 'endLoc') return value; }
|
||||
);
|
||||
var expectedToken = JSON.stringify(expectedTokens[i]);
|
||||
if (actualToken !== expectedToken)
|
||||
return actualToken + ' !== ' + expectedToken;
|
||||
var mis = misMatch(expectedTokens[i], actualTokens[i]);
|
||||
if (mis) return mis;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user