Merge branch 'master' into 7.0
This commit is contained in:
commit
5785f0ce72
92
CHANGELOG.md
92
CHANGELOG.md
@ -15,6 +15,98 @@ _Note: Gaps between patch versions are faulty, broken or test releases._
|
|||||||
|
|
||||||
See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog.
|
See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) for the pre-6.8.0 version Changelog.
|
||||||
|
|
||||||
|
## 6.15.0 (2017-01-10)
|
||||||
|
|
||||||
|
### :eyeglasses: Spec Compliancy
|
||||||
|
|
||||||
|
Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison)
|
||||||
|
|
||||||
|
This change implements flows new shorthand import syntax
|
||||||
|
and where previously you had to write this code:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import {someValue} from "blah";
|
||||||
|
import type {someType} from "blah";
|
||||||
|
import typeof {someOtherValue} from "blah";
|
||||||
|
```
|
||||||
|
|
||||||
|
you can now write it like this:
|
||||||
|
|
||||||
|
```js
|
||||||
|
import {
|
||||||
|
someValue,
|
||||||
|
type someType,
|
||||||
|
typeof someOtherValue,
|
||||||
|
} from "blah";
|
||||||
|
```
|
||||||
|
|
||||||
|
For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request.
|
||||||
|
|
||||||
|
flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin)
|
||||||
|
|
||||||
|
This change now allows a leading pipe everywhere types can be used:
|
||||||
|
```js
|
||||||
|
var f = (x): | 1 | 2 => 1;
|
||||||
|
```
|
||||||
|
|
||||||
|
Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo)
|
||||||
|
|
||||||
|
Previously babylon parsed the following exports, although they are not valid:
|
||||||
|
```js
|
||||||
|
export typeof foo;
|
||||||
|
export new Foo();
|
||||||
|
export function() {};
|
||||||
|
export for (;;);
|
||||||
|
export while(foo);
|
||||||
|
```
|
||||||
|
|
||||||
|
### :bug: Bug Fix
|
||||||
|
|
||||||
|
Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin)
|
||||||
|
|
||||||
|
This fixes parsing of this case:
|
||||||
|
|
||||||
|
```js
|
||||||
|
const map = {
|
||||||
|
[age <= 17] : 'Too young'
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long)
|
||||||
|
|
||||||
|
The following case produced an invalid AST
|
||||||
|
```js
|
||||||
|
<div>{/* foo */}</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy)
|
||||||
|
|
||||||
|
When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST.
|
||||||
|
|
||||||
|
Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant)
|
||||||
|
|
||||||
|
Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray)
|
||||||
|
|
||||||
|
### :house: Internal
|
||||||
|
|
||||||
|
User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder)
|
||||||
|
|
||||||
|
Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo)
|
||||||
|
|
||||||
|
Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine)
|
||||||
|
|
||||||
|
Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder)
|
||||||
|
|
||||||
|
Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine)
|
||||||
|
|
||||||
|
Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU)
|
||||||
|
|
||||||
|
Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot])
|
||||||
|
|
||||||
|
chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot])
|
||||||
|
|
||||||
|
chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot])
|
||||||
|
|
||||||
## 6.14.1 (2016-11-17)
|
## 6.14.1 (2016-11-17)
|
||||||
|
|
||||||
### :bug: Bug Fix
|
### :bug: Bug Fix
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "babylon",
|
"name": "babylon",
|
||||||
"version": "6.14.1",
|
"version": "6.15.0",
|
||||||
"description": "A JavaScript parser",
|
"description": "A JavaScript parser",
|
||||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||||
"homepage": "https://babeljs.io/",
|
"homepage": "https://babeljs.io/",
|
||||||
@ -25,7 +25,7 @@
|
|||||||
"codecov": "^1.0.1",
|
"codecov": "^1.0.1",
|
||||||
"cross-env": "^2.0.0",
|
"cross-env": "^2.0.0",
|
||||||
"eslint": "^3.7.1",
|
"eslint": "^3.7.1",
|
||||||
"eslint-config-babel": "^3.0.0",
|
"eslint-config-babel": "^4.0.1",
|
||||||
"eslint-plugin-babel": "^4.0.0",
|
"eslint-plugin-babel": "^4.0.0",
|
||||||
"eslint-plugin-flowtype": "^2.20.0",
|
"eslint-plugin-flowtype": "^2.20.0",
|
||||||
"flow-bin": "^0.37.0",
|
"flow-bin": "^0.37.0",
|
||||||
|
|||||||
@ -31,8 +31,8 @@ export const defaultOptions: {
|
|||||||
// Interpret and default an options object
|
// Interpret and default an options object
|
||||||
|
|
||||||
export function getOptions(opts?: Object): Object {
|
export function getOptions(opts?: Object): Object {
|
||||||
let options = {};
|
const options = {};
|
||||||
for (let key in defaultOptions) {
|
for (const key in defaultOptions) {
|
||||||
options[key] = opts && key in opts ? opts[key] : defaultOptions[key];
|
options[key] = opts && key in opts ? opts[key] : defaultOptions[key];
|
||||||
}
|
}
|
||||||
return options;
|
return options;
|
||||||
|
|||||||
@ -41,7 +41,7 @@ pp.addComment = function (comment) {
|
|||||||
pp.processComment = function (node) {
|
pp.processComment = function (node) {
|
||||||
if (node.type === "Program" && node.body.length > 0) return;
|
if (node.type === "Program" && node.body.length > 0) return;
|
||||||
|
|
||||||
let stack = this.state.commentStack;
|
const stack = this.state.commentStack;
|
||||||
|
|
||||||
let lastChild, trailingComments, i, j;
|
let lastChild, trailingComments, i, j;
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ pp.processComment = function (node) {
|
|||||||
this.state.trailingComments.length = 0;
|
this.state.trailingComments.length = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let lastInStack = last(stack);
|
const lastInStack = last(stack);
|
||||||
if (stack.length > 0 && lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
|
if (stack.length > 0 && lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
|
||||||
trailingComments = lastInStack.trailingComments;
|
trailingComments = lastInStack.trailingComments;
|
||||||
lastInStack.trailingComments = null;
|
lastInStack.trailingComments = null;
|
||||||
|
|||||||
@ -33,7 +33,7 @@ const pp = Parser.prototype;
|
|||||||
pp.checkPropClash = function (prop, propHash) {
|
pp.checkPropClash = function (prop, propHash) {
|
||||||
if (prop.computed) return;
|
if (prop.computed) return;
|
||||||
|
|
||||||
let key = prop.key;
|
const key = prop.key;
|
||||||
let name;
|
let name;
|
||||||
switch (key.type) {
|
switch (key.type) {
|
||||||
case "Identifier":
|
case "Identifier":
|
||||||
@ -72,10 +72,11 @@ pp.checkPropClash = function (prop, propHash) {
|
|||||||
// delayed syntax error at correct position).
|
// delayed syntax error at correct position).
|
||||||
|
|
||||||
pp.parseExpression = function (noIn, refShorthandDefaultPos) {
|
pp.parseExpression = function (noIn, refShorthandDefaultPos) {
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
let expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
|
const startLoc = this.state.startLoc;
|
||||||
|
const expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
|
||||||
if (this.match(tt.comma)) {
|
if (this.match(tt.comma)) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.expressions = [expr];
|
node.expressions = [expr];
|
||||||
while (this.eat(tt.comma)) {
|
while (this.eat(tt.comma)) {
|
||||||
node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
|
node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
|
||||||
@ -90,8 +91,8 @@ pp.parseExpression = function (noIn, refShorthandDefaultPos) {
|
|||||||
// operators like `+=`.
|
// operators like `+=`.
|
||||||
|
|
||||||
pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
|
pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {
|
||||||
let startPos = this.state.start;
|
const startPos = this.state.start;
|
||||||
let startLoc = this.state.startLoc;
|
const startLoc = this.state.startLoc;
|
||||||
|
|
||||||
if (this.match(tt._yield) && this.state.inGenerator) {
|
if (this.match(tt._yield) && this.state.inGenerator) {
|
||||||
let left = this.parseYield();
|
let left = this.parseYield();
|
||||||
@ -114,7 +115,7 @@ pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse, re
|
|||||||
let left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos);
|
let left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos);
|
||||||
if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc);
|
if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc);
|
||||||
if (this.state.type.isAssign) {
|
if (this.state.type.isAssign) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.operator = this.state.value;
|
node.operator = this.state.value;
|
||||||
node.left = this.match(tt.eq) ? this.toAssignable(left, undefined, "assignment expression") : left;
|
node.left = this.match(tt.eq) ? this.toAssignable(left, undefined, "assignment expression") : left;
|
||||||
refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
|
refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
|
||||||
@ -146,8 +147,9 @@ pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse, re
|
|||||||
// Parse a ternary conditional (`?:`) operator.
|
// Parse a ternary conditional (`?:`) operator.
|
||||||
|
|
||||||
pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos, refNeedsArrowPos) {
|
pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos, refNeedsArrowPos) {
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
let expr = this.parseExprOps(noIn, refShorthandDefaultPos);
|
const startLoc = this.state.startLoc;
|
||||||
|
const expr = this.parseExprOps(noIn, refShorthandDefaultPos);
|
||||||
if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
|
if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
|
||||||
|
|
||||||
return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos);
|
return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos);
|
||||||
@ -155,7 +157,7 @@ pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos, refNeedsArrow
|
|||||||
|
|
||||||
pp.parseConditional = function (expr, noIn, startPos, startLoc) {
|
pp.parseConditional = function (expr, noIn, startPos, startLoc) {
|
||||||
if (this.eat(tt.question)) {
|
if (this.eat(tt.question)) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.test = expr;
|
node.test = expr;
|
||||||
node.consequent = this.parseMaybeAssign();
|
node.consequent = this.parseMaybeAssign();
|
||||||
this.expect(tt.colon);
|
this.expect(tt.colon);
|
||||||
@ -168,8 +170,9 @@ pp.parseConditional = function (expr, noIn, startPos, startLoc) {
|
|||||||
// Start the precedence parser.
|
// Start the precedence parser.
|
||||||
|
|
||||||
pp.parseExprOps = function (noIn, refShorthandDefaultPos) {
|
pp.parseExprOps = function (noIn, refShorthandDefaultPos) {
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
let expr = this.parseMaybeUnary(refShorthandDefaultPos);
|
const startLoc = this.state.startLoc;
|
||||||
|
const expr = this.parseMaybeUnary(refShorthandDefaultPos);
|
||||||
if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
|
if (refShorthandDefaultPos && refShorthandDefaultPos.start) {
|
||||||
return expr;
|
return expr;
|
||||||
} else {
|
} else {
|
||||||
@ -184,10 +187,10 @@ pp.parseExprOps = function (noIn, refShorthandDefaultPos) {
|
|||||||
// operator that has a lower precedence than the set it is parsing.
|
// operator that has a lower precedence than the set it is parsing.
|
||||||
|
|
||||||
pp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
|
pp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
|
||||||
let prec = this.state.type.binop;
|
const prec = this.state.type.binop;
|
||||||
if (prec != null && (!noIn || !this.match(tt._in))) {
|
if (prec != null && (!noIn || !this.match(tt._in))) {
|
||||||
if (prec > minPrec) {
|
if (prec > minPrec) {
|
||||||
let node = this.startNodeAt(leftStartPos, leftStartLoc);
|
const node = this.startNodeAt(leftStartPos, leftStartLoc);
|
||||||
node.left = left;
|
node.left = left;
|
||||||
node.operator = this.state.value;
|
node.operator = this.state.value;
|
||||||
|
|
||||||
@ -201,11 +204,11 @@ pp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
|
|||||||
this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");
|
this.raise(left.argument.start, "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");
|
||||||
}
|
}
|
||||||
|
|
||||||
let op = this.state.type;
|
const op = this.state.type;
|
||||||
this.next();
|
this.next();
|
||||||
|
|
||||||
let startPos = this.state.start;
|
const startPos = this.state.start;
|
||||||
let startLoc = this.state.startLoc;
|
const startLoc = this.state.startLoc;
|
||||||
node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn);
|
node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn);
|
||||||
|
|
||||||
this.finishNode(node, (op === tt.logicalOR || op === tt.logicalAND) ? "LogicalExpression" : "BinaryExpression");
|
this.finishNode(node, (op === tt.logicalOR || op === tt.logicalAND) ? "LogicalExpression" : "BinaryExpression");
|
||||||
@ -219,13 +222,13 @@ pp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
|
|||||||
|
|
||||||
pp.parseMaybeUnary = function (refShorthandDefaultPos) {
|
pp.parseMaybeUnary = function (refShorthandDefaultPos) {
|
||||||
if (this.state.type.prefix) {
|
if (this.state.type.prefix) {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
let update = this.match(tt.incDec);
|
const update = this.match(tt.incDec);
|
||||||
node.operator = this.state.value;
|
node.operator = this.state.value;
|
||||||
node.prefix = true;
|
node.prefix = true;
|
||||||
this.next();
|
this.next();
|
||||||
|
|
||||||
let argType = this.state.type;
|
const argType = this.state.type;
|
||||||
node.argument = this.parseMaybeUnary();
|
node.argument = this.parseMaybeUnary();
|
||||||
|
|
||||||
this.addExtra(node, "parenthesizedArgument", argType === tt.parenL && (!node.argument.extra || !node.argument.extra.parenthesized));
|
this.addExtra(node, "parenthesizedArgument", argType === tt.parenL && (!node.argument.extra || !node.argument.extra.parenthesized));
|
||||||
@ -243,11 +246,12 @@ pp.parseMaybeUnary = function (refShorthandDefaultPos) {
|
|||||||
return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
|
return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
|
||||||
}
|
}
|
||||||
|
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
|
const startLoc = this.state.startLoc;
|
||||||
let expr = this.parseExprSubscripts(refShorthandDefaultPos);
|
let expr = this.parseExprSubscripts(refShorthandDefaultPos);
|
||||||
if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
|
if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
|
||||||
while (this.state.type.postfix && !this.canInsertSemicolon()) {
|
while (this.state.type.postfix && !this.canInsertSemicolon()) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.operator = this.state.value;
|
node.operator = this.state.value;
|
||||||
node.prefix = false;
|
node.prefix = false;
|
||||||
node.argument = expr;
|
node.argument = expr;
|
||||||
@ -261,9 +265,10 @@ pp.parseMaybeUnary = function (refShorthandDefaultPos) {
|
|||||||
// Parse call, dot, and `[]`-subscript expressions.
|
// Parse call, dot, and `[]`-subscript expressions.
|
||||||
|
|
||||||
pp.parseExprSubscripts = function (refShorthandDefaultPos) {
|
pp.parseExprSubscripts = function (refShorthandDefaultPos) {
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
let potentialArrowAt = this.state.potentialArrowAt;
|
const startLoc = this.state.startLoc;
|
||||||
let expr = this.parseExprAtom(refShorthandDefaultPos);
|
const potentialArrowAt = this.state.potentialArrowAt;
|
||||||
|
const expr = this.parseExprAtom(refShorthandDefaultPos);
|
||||||
|
|
||||||
if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
|
if (expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt) {
|
||||||
return expr;
|
return expr;
|
||||||
@ -279,28 +284,28 @@ pp.parseExprSubscripts = function (refShorthandDefaultPos) {
|
|||||||
pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
|
pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (!noCalls && this.eat(tt.doubleColon)) {
|
if (!noCalls && this.eat(tt.doubleColon)) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.object = base;
|
node.object = base;
|
||||||
node.callee = this.parseNoCallExpr();
|
node.callee = this.parseNoCallExpr();
|
||||||
return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
|
return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
|
||||||
} else if (this.eat(tt.dot)) {
|
} else if (this.eat(tt.dot)) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.object = base;
|
node.object = base;
|
||||||
node.property = this.parseIdentifier(true);
|
node.property = this.parseIdentifier(true);
|
||||||
node.computed = false;
|
node.computed = false;
|
||||||
base = this.finishNode(node, "MemberExpression");
|
base = this.finishNode(node, "MemberExpression");
|
||||||
} else if (this.eat(tt.bracketL)) {
|
} else if (this.eat(tt.bracketL)) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.object = base;
|
node.object = base;
|
||||||
node.property = this.parseExpression();
|
node.property = this.parseExpression();
|
||||||
node.computed = true;
|
node.computed = true;
|
||||||
this.expect(tt.bracketR);
|
this.expect(tt.bracketR);
|
||||||
base = this.finishNode(node, "MemberExpression");
|
base = this.finishNode(node, "MemberExpression");
|
||||||
} else if (!noCalls && this.match(tt.parenL)) {
|
} else if (!noCalls && this.match(tt.parenL)) {
|
||||||
let possibleAsync = this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
|
const possibleAsync = this.state.potentialArrowAt === base.start && base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
|
||||||
this.next();
|
this.next();
|
||||||
|
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.callee = base;
|
node.callee = base;
|
||||||
node.arguments = this.parseCallExpressionArguments(tt.parenR, possibleAsync);
|
node.arguments = this.parseCallExpressionArguments(tt.parenR, possibleAsync);
|
||||||
if (node.callee.type === "Import" && node.arguments.length !== 1) {
|
if (node.callee.type === "Import" && node.arguments.length !== 1) {
|
||||||
@ -314,7 +319,7 @@ pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
|
|||||||
this.toReferencedList(node.arguments);
|
this.toReferencedList(node.arguments);
|
||||||
}
|
}
|
||||||
} else if (this.match(tt.backQuote)) {
|
} else if (this.match(tt.backQuote)) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.tag = base;
|
node.tag = base;
|
||||||
node.quasi = this.parseTemplate();
|
node.quasi = this.parseTemplate();
|
||||||
base = this.finishNode(node, "TaggedTemplateExpression");
|
base = this.finishNode(node, "TaggedTemplateExpression");
|
||||||
@ -325,9 +330,10 @@ pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.parseCallExpressionArguments = function (close, possibleAsyncArrow) {
|
pp.parseCallExpressionArguments = function (close, possibleAsyncArrow) {
|
||||||
|
const elts = [];
|
||||||
let innerParenStart;
|
let innerParenStart;
|
||||||
|
let first = true;
|
||||||
|
|
||||||
let elts = [], first = true;
|
|
||||||
while (!this.eat(close)) {
|
while (!this.eat(close)) {
|
||||||
if (first) {
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
@ -364,7 +370,8 @@ pp.parseAsyncArrowFromCallExpression = function (node, call) {
|
|||||||
// Parse a no-call expression (like argument of `new` or `::` operators).
|
// Parse a no-call expression (like argument of `new` or `::` operators).
|
||||||
|
|
||||||
pp.parseNoCallExpr = function () {
|
pp.parseNoCallExpr = function () {
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
|
const startLoc = this.state.startLoc;
|
||||||
return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
|
return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -374,7 +381,9 @@ pp.parseNoCallExpr = function () {
|
|||||||
// or `{}`.
|
// or `{}`.
|
||||||
|
|
||||||
pp.parseExprAtom = function (refShorthandDefaultPos) {
|
pp.parseExprAtom = function (refShorthandDefaultPos) {
|
||||||
let node, canBeArrow = this.state.potentialArrowAt === this.state.start;
|
const canBeArrow = this.state.potentialArrowAt === this.state.start;
|
||||||
|
let node;
|
||||||
|
|
||||||
switch (this.state.type) {
|
switch (this.state.type) {
|
||||||
case tt._super:
|
case tt._super:
|
||||||
if (!this.state.inMethod && !this.options.allowSuperOutsideMethod) {
|
if (!this.state.inMethod && !this.options.allowSuperOutsideMethod) {
|
||||||
@ -411,9 +420,9 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
|
|||||||
|
|
||||||
case tt.name:
|
case tt.name:
|
||||||
node = this.startNode();
|
node = this.startNode();
|
||||||
let allowAwait = this.state.value === "await" && this.state.inAsync;
|
const allowAwait = this.state.value === "await" && this.state.inAsync;
|
||||||
let allowYield = this.shouldAllowYieldIdentifier();
|
const allowYield = this.shouldAllowYieldIdentifier();
|
||||||
let id = this.parseIdentifier(allowAwait || allowYield);
|
const id = this.parseIdentifier(allowAwait || allowYield);
|
||||||
|
|
||||||
if (id.name === "await") {
|
if (id.name === "await") {
|
||||||
if (this.state.inAsync || this.inModule) {
|
if (this.state.inAsync || this.inModule) {
|
||||||
@ -423,7 +432,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
|
|||||||
this.next();
|
this.next();
|
||||||
return this.parseFunction(node, false, false, true);
|
return this.parseFunction(node, false, false, true);
|
||||||
} else if (canBeArrow && id.name === "async" && this.match(tt.name)) {
|
} else if (canBeArrow && id.name === "async" && this.match(tt.name)) {
|
||||||
let params = [this.parseIdentifier()];
|
const params = [this.parseIdentifier()];
|
||||||
this.expect(tt.arrow);
|
this.expect(tt.arrow);
|
||||||
// let foo = bar => {};
|
// let foo = bar => {};
|
||||||
return this.parseArrowExpression(node, params, true);
|
return this.parseArrowExpression(node, params, true);
|
||||||
@ -437,10 +446,10 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
|
|||||||
|
|
||||||
case tt._do:
|
case tt._do:
|
||||||
if (this.hasPlugin("doExpressions")) {
|
if (this.hasPlugin("doExpressions")) {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
let oldInFunction = this.state.inFunction;
|
const oldInFunction = this.state.inFunction;
|
||||||
let oldLabels = this.state.labels;
|
const oldLabels = this.state.labels;
|
||||||
this.state.labels = [];
|
this.state.labels = [];
|
||||||
this.state.inFunction = false;
|
this.state.inFunction = false;
|
||||||
node.body = this.parseBlock(false, true);
|
node.body = this.parseBlock(false, true);
|
||||||
@ -450,7 +459,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case tt.regexp:
|
case tt.regexp:
|
||||||
let value = this.state.value;
|
const value = this.state.value;
|
||||||
node = this.parseLiteral(value.value, "RegExpLiteral");
|
node = this.parseLiteral(value.value, "RegExpLiteral");
|
||||||
node.pattern = value.pattern;
|
node.pattern = value.pattern;
|
||||||
node.flags = value.flags;
|
node.flags = value.flags;
|
||||||
@ -507,7 +516,7 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
|
|||||||
node = this.startNode();
|
node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
node.object = null;
|
node.object = null;
|
||||||
let callee = node.callee = this.parseNoCallExpr();
|
const callee = node.callee = this.parseNoCallExpr();
|
||||||
if (callee.type === "MemberExpression") {
|
if (callee.type === "MemberExpression") {
|
||||||
return this.finishNode(node, "BindExpression");
|
return this.finishNode(node, "BindExpression");
|
||||||
} else {
|
} else {
|
||||||
@ -520,8 +529,8 @@ pp.parseExprAtom = function (refShorthandDefaultPos) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.parseFunctionExpression = function () {
|
pp.parseFunctionExpression = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
let meta = this.parseIdentifier(true);
|
const meta = this.parseIdentifier(true);
|
||||||
if (this.state.inGenerator && this.eat(tt.dot) && this.hasPlugin("functionSent")) {
|
if (this.state.inGenerator && this.eat(tt.dot) && this.hasPlugin("functionSent")) {
|
||||||
return this.parseMetaProperty(node, meta, "sent");
|
return this.parseMetaProperty(node, meta, "sent");
|
||||||
} else {
|
} else {
|
||||||
@ -541,7 +550,7 @@ pp.parseMetaProperty = function (node, meta, propertyName) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.parseLiteral = function (value, type) {
|
pp.parseLiteral = function (value, type) {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.addExtra(node, "rawValue", value);
|
this.addExtra(node, "rawValue", value);
|
||||||
this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
|
this.addExtra(node, "raw", this.input.slice(this.state.start, this.state.end));
|
||||||
node.value = value;
|
node.value = value;
|
||||||
@ -551,7 +560,7 @@ pp.parseLiteral = function (value, type) {
|
|||||||
|
|
||||||
pp.parseParenExpression = function () {
|
pp.parseParenExpression = function () {
|
||||||
this.expect(tt.parenL);
|
this.expect(tt.parenL);
|
||||||
let val = this.parseExpression();
|
const val = this.parseExpression();
|
||||||
this.expect(tt.parenR);
|
this.expect(tt.parenR);
|
||||||
return val;
|
return val;
|
||||||
};
|
};
|
||||||
@ -563,10 +572,15 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow
|
|||||||
let val;
|
let val;
|
||||||
this.expect(tt.parenL);
|
this.expect(tt.parenL);
|
||||||
|
|
||||||
let innerStartPos = this.state.start, innerStartLoc = this.state.startLoc;
|
const innerStartPos = this.state.start;
|
||||||
let exprList = [], first = true;
|
const innerStartLoc = this.state.startLoc;
|
||||||
let refShorthandDefaultPos = { start: 0 }, spreadStart, optionalCommaStart;
|
const exprList = [];
|
||||||
let refNeedsArrowPos = { start: 0 };
|
const refShorthandDefaultPos = { start: 0 };
|
||||||
|
const refNeedsArrowPos = { start: 0 };
|
||||||
|
let first = true;
|
||||||
|
let spreadStart;
|
||||||
|
let optionalCommaStart;
|
||||||
|
|
||||||
while (!this.match(tt.parenR)) {
|
while (!this.match(tt.parenR)) {
|
||||||
if (first) {
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
@ -579,7 +593,8 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.match(tt.ellipsis)) {
|
if (this.match(tt.ellipsis)) {
|
||||||
let spreadNodeStartPos = this.state.start, spreadNodeStartLoc = this.state.startLoc;
|
const spreadNodeStartPos = this.state.start;
|
||||||
|
const spreadNodeStartLoc = this.state.startLoc;
|
||||||
spreadStart = this.state.start;
|
spreadStart = this.state.start;
|
||||||
exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartLoc, spreadNodeStartPos));
|
exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartLoc, spreadNodeStartPos));
|
||||||
break;
|
break;
|
||||||
@ -588,13 +603,13 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let innerEndPos = this.state.start;
|
const innerEndPos = this.state.start;
|
||||||
let innerEndLoc = this.state.startLoc;
|
const innerEndLoc = this.state.startLoc;
|
||||||
this.expect(tt.parenR);
|
this.expect(tt.parenR);
|
||||||
|
|
||||||
let arrowNode = this.startNodeAt(startPos, startLoc);
|
let arrowNode = this.startNodeAt(startPos, startLoc);
|
||||||
if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
|
if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
|
||||||
for (let param of exprList) {
|
for (const param of exprList) {
|
||||||
if (param.extra && param.extra.parenthesized) this.unexpected(param.extra.parenStart);
|
if (param.extra && param.extra.parenthesized) this.unexpected(param.extra.parenStart);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -644,8 +659,8 @@ pp.parseParenItem = function (node) {
|
|||||||
// least, not without wrapping it in parentheses. Thus, it uses the
|
// least, not without wrapping it in parentheses. Thus, it uses the
|
||||||
|
|
||||||
pp.parseNew = function () {
|
pp.parseNew = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
let meta = this.parseIdentifier(true);
|
const meta = this.parseIdentifier(true);
|
||||||
|
|
||||||
if (this.eat(tt.dot)) {
|
if (this.eat(tt.dot)) {
|
||||||
return this.parseMetaProperty(node, meta, "target");
|
return this.parseMetaProperty(node, meta, "target");
|
||||||
@ -666,7 +681,7 @@ pp.parseNew = function () {
|
|||||||
// Parse template expression.
|
// Parse template expression.
|
||||||
|
|
||||||
pp.parseTemplateElement = function () {
|
pp.parseTemplateElement = function () {
|
||||||
let elem = this.startNode();
|
const elem = this.startNode();
|
||||||
elem.value = {
|
elem.value = {
|
||||||
raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
|
raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
|
||||||
cooked: this.state.value
|
cooked: this.state.value
|
||||||
@ -677,7 +692,7 @@ pp.parseTemplateElement = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.parseTemplate = function () {
|
pp.parseTemplate = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
node.expressions = [];
|
node.expressions = [];
|
||||||
let curElt = this.parseTemplateElement();
|
let curElt = this.parseTemplateElement();
|
||||||
@ -696,9 +711,9 @@ pp.parseTemplate = function () {
|
|||||||
|
|
||||||
pp.parseObj = function (isPattern, refShorthandDefaultPos) {
|
pp.parseObj = function (isPattern, refShorthandDefaultPos) {
|
||||||
let decorators = [];
|
let decorators = [];
|
||||||
let propHash = Object.create(null);
|
const propHash = Object.create(null);
|
||||||
let first = true;
|
let first = true;
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
|
|
||||||
node.properties = [];
|
node.properties = [];
|
||||||
this.next();
|
this.next();
|
||||||
@ -761,7 +776,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) {
|
|||||||
if (!isPattern && this.isContextual("async")) {
|
if (!isPattern && this.isContextual("async")) {
|
||||||
if (isGenerator) this.unexpected();
|
if (isGenerator) this.unexpected();
|
||||||
|
|
||||||
let asyncId = this.parseIdentifier();
|
const asyncId = this.parseIdentifier();
|
||||||
if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR) || this.match(tt.eq) || this.match(tt.comma)) {
|
if (this.match(tt.colon) || this.match(tt.parenL) || this.match(tt.braceR) || this.match(tt.eq) || this.match(tt.comma)) {
|
||||||
prop.key = asyncId;
|
prop.key = asyncId;
|
||||||
} else {
|
} else {
|
||||||
@ -813,9 +828,9 @@ pp.parseObjPropValue = function (prop, startPos, startLoc, isGenerator, isAsync,
|
|||||||
prop.kind = prop.key.name;
|
prop.kind = prop.key.name;
|
||||||
this.parsePropertyName(prop);
|
this.parsePropertyName(prop);
|
||||||
this.parseMethod(prop, false);
|
this.parseMethod(prop, false);
|
||||||
let paramCount = prop.kind === "get" ? 0 : 1;
|
const paramCount = prop.kind === "get" ? 0 : 1;
|
||||||
if (prop.params.length !== paramCount) {
|
if (prop.params.length !== paramCount) {
|
||||||
let start = prop.start;
|
const start = prop.start;
|
||||||
if (prop.kind === "get") {
|
if (prop.kind === "get") {
|
||||||
this.raise(start, "getter should have no params");
|
this.raise(start, "getter should have no params");
|
||||||
} else {
|
} else {
|
||||||
@ -872,7 +887,7 @@ pp.initFunction = function (node, isAsync) {
|
|||||||
// Parse object or class method.
|
// Parse object or class method.
|
||||||
|
|
||||||
pp.parseMethod = function (node, isGenerator, isAsync) {
|
pp.parseMethod = function (node, isGenerator, isAsync) {
|
||||||
let oldInMethod = this.state.inMethod;
|
const oldInMethod = this.state.inMethod;
|
||||||
this.state.inMethod = node.kind || true;
|
this.state.inMethod = node.kind || true;
|
||||||
this.initFunction(node, isAsync);
|
this.initFunction(node, isAsync);
|
||||||
this.expect(tt.parenL);
|
this.expect(tt.parenL);
|
||||||
@ -895,9 +910,9 @@ pp.parseArrowExpression = function (node, params, isAsync) {
|
|||||||
// Parse function body and check parameters.
|
// Parse function body and check parameters.
|
||||||
|
|
||||||
pp.parseFunctionBody = function (node, allowExpression) {
|
pp.parseFunctionBody = function (node, allowExpression) {
|
||||||
let isExpression = allowExpression && !this.match(tt.braceL);
|
const isExpression = allowExpression && !this.match(tt.braceL);
|
||||||
|
|
||||||
let oldInAsync = this.state.inAsync;
|
const oldInAsync = this.state.inAsync;
|
||||||
this.state.inAsync = node.async;
|
this.state.inAsync = node.async;
|
||||||
if (isExpression) {
|
if (isExpression) {
|
||||||
node.body = this.parseMaybeAssign();
|
node.body = this.parseMaybeAssign();
|
||||||
@ -905,7 +920,9 @@ pp.parseFunctionBody = function (node, allowExpression) {
|
|||||||
} else {
|
} else {
|
||||||
// Start a new scope with regard to labels and the `inFunction`
|
// Start a new scope with regard to labels and the `inFunction`
|
||||||
// flag (restore them to their old value afterwards).
|
// flag (restore them to their old value afterwards).
|
||||||
let oldInFunc = this.state.inFunction, oldInGen = this.state.inGenerator, oldLabels = this.state.labels;
|
const oldInFunc = this.state.inFunction;
|
||||||
|
const oldInGen = this.state.inGenerator;
|
||||||
|
const oldLabels = this.state.labels;
|
||||||
this.state.inFunction = true; this.state.inGenerator = node.generator; this.state.labels = [];
|
this.state.inFunction = true; this.state.inGenerator = node.generator; this.state.labels = [];
|
||||||
node.body = this.parseBlock(true);
|
node.body = this.parseBlock(true);
|
||||||
node.expression = false;
|
node.expression = false;
|
||||||
@ -924,7 +941,7 @@ pp.parseFunctionBody = function (node, allowExpression) {
|
|||||||
|
|
||||||
// normal function
|
// normal function
|
||||||
if (!isExpression && node.body.directives.length) {
|
if (!isExpression && node.body.directives.length) {
|
||||||
for (let directive of (node.body.directives: Array<Object>)) {
|
for (const directive of (node.body.directives: Array<Object>)) {
|
||||||
if (directive.value.value === "use strict") {
|
if (directive.value.value === "use strict") {
|
||||||
isStrict = true;
|
isStrict = true;
|
||||||
checkLVal = true;
|
checkLVal = true;
|
||||||
@ -939,13 +956,13 @@ pp.parseFunctionBody = function (node, allowExpression) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (checkLVal) {
|
if (checkLVal) {
|
||||||
let nameHash = Object.create(null);
|
const nameHash = Object.create(null);
|
||||||
let oldStrict = this.state.strict;
|
const oldStrict = this.state.strict;
|
||||||
if (isStrict) this.state.strict = true;
|
if (isStrict) this.state.strict = true;
|
||||||
if (node.id) {
|
if (node.id) {
|
||||||
this.checkLVal(node.id, true, undefined, "function name");
|
this.checkLVal(node.id, true, undefined, "function name");
|
||||||
}
|
}
|
||||||
for (let param of (node.params: Array<Object>)) {
|
for (const param of (node.params: Array<Object>)) {
|
||||||
if (isStrict && param.type !== "Identifier") {
|
if (isStrict && param.type !== "Identifier") {
|
||||||
this.raise(param.start, "Non-simple parameter in strict mode");
|
this.raise(param.start, "Non-simple parameter in strict mode");
|
||||||
}
|
}
|
||||||
@ -962,7 +979,9 @@ pp.parseFunctionBody = function (node, allowExpression) {
|
|||||||
// for array literals).
|
// for array literals).
|
||||||
|
|
||||||
pp.parseExprList = function (close, allowEmpty, refShorthandDefaultPos) {
|
pp.parseExprList = function (close, allowEmpty, refShorthandDefaultPos) {
|
||||||
let elts = [], first = true;
|
const elts = [];
|
||||||
|
let first = true;
|
||||||
|
|
||||||
while (!this.eat(close)) {
|
while (!this.eat(close)) {
|
||||||
if (first) {
|
if (first) {
|
||||||
first = false;
|
first = false;
|
||||||
@ -993,7 +1012,7 @@ pp.parseExprListItem = function (allowEmpty, refShorthandDefaultPos) {
|
|||||||
// identifiers.
|
// identifiers.
|
||||||
|
|
||||||
pp.parseIdentifier = function (liberal) {
|
pp.parseIdentifier = function (liberal) {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
|
|
||||||
if (this.match(tt.name)) {
|
if (this.match(tt.name)) {
|
||||||
if (!liberal) {
|
if (!liberal) {
|
||||||
@ -1044,7 +1063,7 @@ pp.parseAwait = function (node) {
|
|||||||
// Parses yield expression inside generator.
|
// Parses yield expression inside generator.
|
||||||
|
|
||||||
pp.parseYield = function () {
|
pp.parseYield = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
if (this.match(tt.semi) || this.canInsertSemicolon() || (!this.match(tt.star) && !this.state.type.startsExpr)) {
|
if (this.match(tt.semi) || this.canInsertSemicolon() || (!this.match(tt.star) && !this.state.type.startsExpr)) {
|
||||||
node.delegate = false;
|
node.delegate = false;
|
||||||
|
|||||||
@ -60,7 +60,7 @@ export default class Parser extends Tokenizer {
|
|||||||
pluginNames.push("flow");
|
pluginNames.push("flow");
|
||||||
|
|
||||||
pluginNames.forEach((name) => {
|
pluginNames.forEach((name) => {
|
||||||
let plugin = plugins[name];
|
const plugin = plugins[name];
|
||||||
if (plugin) plugin(this);
|
if (plugin) plugin(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ export default class Parser extends Tokenizer {
|
|||||||
return { "*": true };
|
return { "*": true };
|
||||||
}
|
}
|
||||||
|
|
||||||
let pluginMap = {};
|
const pluginMap = {};
|
||||||
|
|
||||||
if (pluginList.indexOf("flow") >= 0) {
|
if (pluginList.indexOf("flow") >= 0) {
|
||||||
// ensure flow plugin loads last
|
// ensure flow plugin loads last
|
||||||
@ -81,11 +81,11 @@ export default class Parser extends Tokenizer {
|
|||||||
pluginList.push("flow");
|
pluginList.push("flow");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let name of pluginList) {
|
for (const name of pluginList) {
|
||||||
if (!pluginMap[name]) {
|
if (!pluginMap[name]) {
|
||||||
pluginMap[name] = true;
|
pluginMap[name] = true;
|
||||||
|
|
||||||
let plugin = plugins[name];
|
const plugin = plugins[name];
|
||||||
if (plugin) plugin(this);
|
if (plugin) plugin(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,8 +100,8 @@ export default class Parser extends Tokenizer {
|
|||||||
body: Array<Object>
|
body: Array<Object>
|
||||||
}
|
}
|
||||||
} {
|
} {
|
||||||
let file = this.startNode();
|
const file = this.startNode();
|
||||||
let program = this.startNode();
|
const program = this.startNode();
|
||||||
this.nextToken();
|
this.nextToken();
|
||||||
return this.parseTopLevel(file, program);
|
return this.parseTopLevel(file, program);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,9 +10,9 @@ const pp = Parser.prototype;
|
|||||||
// message.
|
// message.
|
||||||
|
|
||||||
pp.raise = function (pos, message) {
|
pp.raise = function (pos, message) {
|
||||||
let loc = getLineInfo(this.input, pos);
|
const loc = getLineInfo(this.input, pos);
|
||||||
message += ` (${loc.line}:${loc.column})`;
|
message += ` (${loc.line}:${loc.column})`;
|
||||||
let err = new SyntaxError(message);
|
const err = new SyntaxError(message);
|
||||||
err.pos = pos;
|
err.pos = pos;
|
||||||
err.loc = loc;
|
err.loc = loc;
|
||||||
throw err;
|
throw err;
|
||||||
|
|||||||
@ -19,7 +19,7 @@ pp.toAssignable = function (node, isBinding, contextDescription) {
|
|||||||
|
|
||||||
case "ObjectExpression":
|
case "ObjectExpression":
|
||||||
node.type = "ObjectPattern";
|
node.type = "ObjectPattern";
|
||||||
for (let prop of (node.properties: Array<Object>)) {
|
for (const prop of (node.properties: Array<Object>)) {
|
||||||
if (prop.type === "ObjectMethod") {
|
if (prop.type === "ObjectMethod") {
|
||||||
if (prop.kind === "get" || prop.kind === "set") {
|
if (prop.kind === "get" || prop.kind === "set") {
|
||||||
this.raise(prop.key.start, "Object pattern can't contain getter or setter");
|
this.raise(prop.key.start, "Object pattern can't contain getter or setter");
|
||||||
@ -72,12 +72,12 @@ pp.toAssignable = function (node, isBinding, contextDescription) {
|
|||||||
pp.toAssignableList = function (exprList, isBinding, contextDescription) {
|
pp.toAssignableList = function (exprList, isBinding, contextDescription) {
|
||||||
let end = exprList.length;
|
let end = exprList.length;
|
||||||
if (end) {
|
if (end) {
|
||||||
let last = exprList[end - 1];
|
const last = exprList[end - 1];
|
||||||
if (last && last.type === "RestElement") {
|
if (last && last.type === "RestElement") {
|
||||||
--end;
|
--end;
|
||||||
} else if (last && last.type === "SpreadElement") {
|
} else if (last && last.type === "SpreadElement") {
|
||||||
last.type = "RestElement";
|
last.type = "RestElement";
|
||||||
let arg = last.argument;
|
const arg = last.argument;
|
||||||
this.toAssignable(arg, isBinding, contextDescription);
|
this.toAssignable(arg, isBinding, contextDescription);
|
||||||
if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") {
|
if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") {
|
||||||
this.unexpected(arg.start);
|
this.unexpected(arg.start);
|
||||||
@ -86,7 +86,7 @@ pp.toAssignableList = function (exprList, isBinding, contextDescription) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i = 0; i < end; i++) {
|
for (let i = 0; i < end; i++) {
|
||||||
let elt = exprList[i];
|
const elt = exprList[i];
|
||||||
if (elt) this.toAssignable(elt, isBinding, contextDescription);
|
if (elt) this.toAssignable(elt, isBinding, contextDescription);
|
||||||
}
|
}
|
||||||
return exprList;
|
return exprList;
|
||||||
@ -101,14 +101,14 @@ pp.toReferencedList = function (exprList) {
|
|||||||
// Parses spread element.
|
// Parses spread element.
|
||||||
|
|
||||||
pp.parseSpread = function (refShorthandDefaultPos) {
|
pp.parseSpread = function (refShorthandDefaultPos) {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos);
|
node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos);
|
||||||
return this.finishNode(node, "SpreadElement");
|
return this.finishNode(node, "SpreadElement");
|
||||||
};
|
};
|
||||||
|
|
||||||
pp.parseRest = function () {
|
pp.parseRest = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
node.argument = this.parseBindingIdentifier();
|
node.argument = this.parseBindingIdentifier();
|
||||||
return this.finishNode(node, "RestElement");
|
return this.finishNode(node, "RestElement");
|
||||||
@ -133,7 +133,7 @@ pp.parseBindingAtom = function () {
|
|||||||
return this.parseIdentifier(true);
|
return this.parseIdentifier(true);
|
||||||
|
|
||||||
case tt.bracketL:
|
case tt.bracketL:
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
node.elements = this.parseBindingList(tt.bracketR, true);
|
node.elements = this.parseBindingList(tt.bracketR, true);
|
||||||
return this.finishNode(node, "ArrayPattern");
|
return this.finishNode(node, "ArrayPattern");
|
||||||
@ -147,7 +147,7 @@ pp.parseBindingAtom = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.parseBindingList = function (close, allowEmpty) {
|
pp.parseBindingList = function (close, allowEmpty) {
|
||||||
let elts = [];
|
const elts = [];
|
||||||
let first = true;
|
let first = true;
|
||||||
while (!this.eat(close)) {
|
while (!this.eat(close)) {
|
||||||
if (first) {
|
if (first) {
|
||||||
@ -164,11 +164,11 @@ pp.parseBindingList = function (close, allowEmpty) {
|
|||||||
this.expect(close);
|
this.expect(close);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
let decorators = [];
|
const decorators = [];
|
||||||
while (this.match(tt.at)) {
|
while (this.match(tt.at)) {
|
||||||
decorators.push(this.parseDecorator());
|
decorators.push(this.parseDecorator());
|
||||||
}
|
}
|
||||||
let left = this.parseMaybeDefault();
|
const left = this.parseMaybeDefault();
|
||||||
if (decorators.length) {
|
if (decorators.length) {
|
||||||
left.decorators = decorators;
|
left.decorators = decorators;
|
||||||
}
|
}
|
||||||
@ -191,7 +191,7 @@ pp.parseMaybeDefault = function (startPos, startLoc, left) {
|
|||||||
left = left || this.parseBindingAtom();
|
left = left || this.parseBindingAtom();
|
||||||
if (!this.eat(tt.eq)) return left;
|
if (!this.eat(tt.eq)) return left;
|
||||||
|
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.left = left;
|
node.left = left;
|
||||||
node.right = this.parseMaybeAssign();
|
node.right = this.parseMaybeAssign();
|
||||||
return this.finishNode(node, "AssignmentPattern");
|
return this.finishNode(node, "AssignmentPattern");
|
||||||
@ -217,7 +217,7 @@ pp.checkLVal = function (expr, isBinding, checkClashes, contextDescription) {
|
|||||||
// true
|
// true
|
||||||
// > obj.__proto__
|
// > obj.__proto__
|
||||||
// null
|
// null
|
||||||
let key = `_${expr.name}`;
|
const key = `_${expr.name}`;
|
||||||
|
|
||||||
if (checkClashes[key]) {
|
if (checkClashes[key]) {
|
||||||
this.raise(expr.start, "Argument name clash in strict mode");
|
this.raise(expr.start, "Argument name clash in strict mode");
|
||||||
@ -239,7 +239,7 @@ pp.checkLVal = function (expr, isBinding, checkClashes, contextDescription) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "ArrayPattern":
|
case "ArrayPattern":
|
||||||
for (let elem of (expr.elements: Array<Object>)) {
|
for (const elem of (expr.elements: Array<Object>)) {
|
||||||
if (elem) this.checkLVal(elem, isBinding, checkClashes, "array destructuring pattern");
|
if (elem) this.checkLVal(elem, isBinding, checkClashes, "array destructuring pattern");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -22,7 +22,7 @@ class Node {
|
|||||||
|
|
||||||
__clone(): Node {
|
__clone(): Node {
|
||||||
const node2 = new Node;
|
const node2 = new Node;
|
||||||
for (let key in this) {
|
for (const key in this) {
|
||||||
// Do not clone comments that are already attached to the node
|
// Do not clone comments that are already attached to the node
|
||||||
if (commentKeys.indexOf(key) < 0) {
|
if (commentKeys.indexOf(key) < 0) {
|
||||||
node2[key] = this[key];
|
node2[key] = this[key];
|
||||||
|
|||||||
@ -31,13 +31,13 @@ const loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"};
|
|||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
pp.stmtToDirective = function (stmt) {
|
pp.stmtToDirective = function (stmt) {
|
||||||
let expr = stmt.expression;
|
const expr = stmt.expression;
|
||||||
|
|
||||||
let directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
|
const directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
|
||||||
let directive = this.startNodeAt(stmt.start, stmt.loc.start);
|
const directive = this.startNodeAt(stmt.start, stmt.loc.start);
|
||||||
|
|
||||||
let raw = this.input.slice(expr.start, expr.end);
|
const raw = this.input.slice(expr.start, expr.end);
|
||||||
let val = directiveLiteral.value = raw.slice(1, -1); // remove quotes
|
const val = directiveLiteral.value = raw.slice(1, -1); // remove quotes
|
||||||
|
|
||||||
this.addExtra(directiveLiteral, "raw", raw);
|
this.addExtra(directiveLiteral, "raw", raw);
|
||||||
this.addExtra(directiveLiteral, "rawValue", val);
|
this.addExtra(directiveLiteral, "rawValue", val);
|
||||||
@ -59,7 +59,8 @@ pp.parseStatement = function (declaration, topLevel) {
|
|||||||
this.parseDecorators(true);
|
this.parseDecorators(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
let starttype = this.state.type, node = this.startNode();
|
const starttype = this.state.type;
|
||||||
|
const node = this.startNode();
|
||||||
|
|
||||||
// Most types of statements are recognized by the keyword they
|
// Most types of statements are recognized by the keyword they
|
||||||
// start with. Many are trivial to parse, some require a bit of
|
// start with. Many are trivial to parse, some require a bit of
|
||||||
@ -114,7 +115,7 @@ pp.parseStatement = function (declaration, topLevel) {
|
|||||||
case tt.name:
|
case tt.name:
|
||||||
if (this.state.value === "async") {
|
if (this.state.value === "async") {
|
||||||
// peek ahead and see if next token is a function
|
// peek ahead and see if next token is a function
|
||||||
let state = this.state.clone();
|
const state = this.state.clone();
|
||||||
this.next();
|
this.next();
|
||||||
if (this.match(tt._function) && !this.canInsertSemicolon()) {
|
if (this.match(tt._function) && !this.canInsertSemicolon()) {
|
||||||
this.expect(tt._function);
|
this.expect(tt._function);
|
||||||
@ -130,8 +131,8 @@ pp.parseStatement = function (declaration, topLevel) {
|
|||||||
// simply start parsing an expression, and afterwards, if the
|
// simply start parsing an expression, and afterwards, if the
|
||||||
// next token is a colon and the expression was a simple
|
// next token is a colon and the expression was a simple
|
||||||
// Identifier node, we switch to interpreting it as a label.
|
// Identifier node, we switch to interpreting it as a label.
|
||||||
let maybeName = this.state.value;
|
const maybeName = this.state.value;
|
||||||
let expr = this.parseExpression();
|
const expr = this.parseExpression();
|
||||||
|
|
||||||
if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) {
|
if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) {
|
||||||
return this.parseLabeledStatement(node, maybeName, expr);
|
return this.parseLabeledStatement(node, maybeName, expr);
|
||||||
@ -149,7 +150,7 @@ pp.takeDecorators = function (node) {
|
|||||||
|
|
||||||
pp.parseDecorators = function (allowExport) {
|
pp.parseDecorators = function (allowExport) {
|
||||||
while (this.match(tt.at)) {
|
while (this.match(tt.at)) {
|
||||||
let decorator = this.parseDecorator();
|
const decorator = this.parseDecorator();
|
||||||
this.state.decorators.push(decorator);
|
this.state.decorators.push(decorator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,14 +167,14 @@ pp.parseDecorator = function () {
|
|||||||
if (!this.hasPlugin("decorators")) {
|
if (!this.hasPlugin("decorators")) {
|
||||||
this.unexpected();
|
this.unexpected();
|
||||||
}
|
}
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
node.expression = this.parseMaybeAssign();
|
node.expression = this.parseMaybeAssign();
|
||||||
return this.finishNode(node, "Decorator");
|
return this.finishNode(node, "Decorator");
|
||||||
};
|
};
|
||||||
|
|
||||||
pp.parseBreakContinueStatement = function (node, keyword) {
|
pp.parseBreakContinueStatement = function (node, keyword) {
|
||||||
let isBreak = keyword === "break";
|
const isBreak = keyword === "break";
|
||||||
this.next();
|
this.next();
|
||||||
|
|
||||||
if (this.isLineTerminator()) {
|
if (this.isLineTerminator()) {
|
||||||
@ -189,7 +190,7 @@ pp.parseBreakContinueStatement = function (node, keyword) {
|
|||||||
// continue to.
|
// continue to.
|
||||||
let i;
|
let i;
|
||||||
for (i = 0; i < this.state.labels.length; ++i) {
|
for (i = 0; i < this.state.labels.length; ++i) {
|
||||||
let lab = this.state.labels[i];
|
const lab = this.state.labels[i];
|
||||||
if (node.label == null || lab.name === node.label.name) {
|
if (node.label == null || lab.name === node.label.name) {
|
||||||
if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
|
if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
|
||||||
if (node.label && isBreak) break;
|
if (node.label && isBreak) break;
|
||||||
@ -243,7 +244,8 @@ pp.parseForStatement = function (node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.match(tt._var) || this.match(tt._let) || this.match(tt._const)) {
|
if (this.match(tt._var) || this.match(tt._let) || this.match(tt._const)) {
|
||||||
let init = this.startNode(), varKind = this.state.type;
|
const init = this.startNode();
|
||||||
|
const varKind = this.state.type;
|
||||||
this.next();
|
this.next();
|
||||||
this.parseVar(init, true, varKind);
|
this.parseVar(init, true, varKind);
|
||||||
this.finishNode(init, "VariableDeclaration");
|
this.finishNode(init, "VariableDeclaration");
|
||||||
@ -259,8 +261,8 @@ pp.parseForStatement = function (node) {
|
|||||||
return this.parseFor(node, init);
|
return this.parseFor(node, init);
|
||||||
}
|
}
|
||||||
|
|
||||||
let refShorthandDefaultPos = {start: 0};
|
const refShorthandDefaultPos = {start: 0};
|
||||||
let init = this.parseExpression(true, refShorthandDefaultPos);
|
const init = this.parseExpression(true, refShorthandDefaultPos);
|
||||||
if (this.match(tt._in) || this.isContextual("of")) {
|
if (this.match(tt._in) || this.isContextual("of")) {
|
||||||
const description = this.isContextual("of") ? "for-of statement" : "for-in statement";
|
const description = this.isContextual("of") ? "for-of statement" : "for-in statement";
|
||||||
this.toAssignable(init, undefined, description);
|
this.toAssignable(init, undefined, description);
|
||||||
@ -323,7 +325,7 @@ pp.parseSwitchStatement = function (node) {
|
|||||||
let cur;
|
let cur;
|
||||||
for (let sawDefault; !this.match(tt.braceR); ) {
|
for (let sawDefault; !this.match(tt.braceR); ) {
|
||||||
if (this.match(tt._case) || this.match(tt._default)) {
|
if (this.match(tt._case) || this.match(tt._default)) {
|
||||||
let isCase = this.match(tt._case);
|
const isCase = this.match(tt._case);
|
||||||
if (cur) this.finishNode(cur, "SwitchCase");
|
if (cur) this.finishNode(cur, "SwitchCase");
|
||||||
node.cases.push(cur = this.startNode());
|
node.cases.push(cur = this.startNode());
|
||||||
cur.consequent = [];
|
cur.consequent = [];
|
||||||
@ -361,7 +363,7 @@ pp.parseThrowStatement = function (node) {
|
|||||||
|
|
||||||
// Reused empty array added for node fields that are always empty.
|
// Reused empty array added for node fields that are always empty.
|
||||||
|
|
||||||
let empty = [];
|
const empty = [];
|
||||||
|
|
||||||
pp.parseTryStatement = function (node) {
|
pp.parseTryStatement = function (node) {
|
||||||
this.next();
|
this.next();
|
||||||
@ -370,7 +372,7 @@ pp.parseTryStatement = function (node) {
|
|||||||
node.handler = null;
|
node.handler = null;
|
||||||
|
|
||||||
if (this.match(tt._catch)) {
|
if (this.match(tt._catch)) {
|
||||||
let clause = this.startNode();
|
const clause = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
|
|
||||||
this.expect(tt.parenL);
|
this.expect(tt.parenL);
|
||||||
@ -422,15 +424,15 @@ pp.parseEmptyStatement = function (node) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.parseLabeledStatement = function (node, maybeName, expr) {
|
pp.parseLabeledStatement = function (node, maybeName, expr) {
|
||||||
for (let label of (this.state.labels: Array<Object>)) {
|
for (const label of (this.state.labels: Array<Object>)) {
|
||||||
if (label.name === maybeName) {
|
if (label.name === maybeName) {
|
||||||
this.raise(expr.start, `Label '${maybeName}' is already declared`);
|
this.raise(expr.start, `Label '${maybeName}' is already declared`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let kind = this.state.type.isLoop ? "loop" : this.match(tt._switch) ? "switch" : null;
|
const kind = this.state.type.isLoop ? "loop" : this.match(tt._switch) ? "switch" : null;
|
||||||
for (let i = this.state.labels.length - 1; i >= 0; i--) {
|
for (let i = this.state.labels.length - 1; i >= 0; i--) {
|
||||||
let label = this.state.labels[i];
|
const label = this.state.labels[i];
|
||||||
if (label.statementStart === node.start) {
|
if (label.statementStart === node.start) {
|
||||||
label.statementStart = this.state.start;
|
label.statementStart = this.state.start;
|
||||||
label.kind = kind;
|
label.kind = kind;
|
||||||
@ -457,7 +459,7 @@ pp.parseExpressionStatement = function (node, expr) {
|
|||||||
// function bodies).
|
// function bodies).
|
||||||
|
|
||||||
pp.parseBlock = function (allowDirectives?) {
|
pp.parseBlock = function (allowDirectives?) {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.expect(tt.braceL);
|
this.expect(tt.braceL);
|
||||||
this.parseBlockBody(node, allowDirectives, false, tt.braceR);
|
this.parseBlockBody(node, allowDirectives, false, tt.braceR);
|
||||||
return this.finishNode(node, "BlockStatement");
|
return this.finishNode(node, "BlockStatement");
|
||||||
@ -478,12 +480,12 @@ pp.parseBlockBody = function (node, allowDirectives, topLevel, end) {
|
|||||||
octalPosition = this.state.octalPosition;
|
octalPosition = this.state.octalPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
let stmt = this.parseStatement(true, topLevel);
|
const stmt = this.parseStatement(true, topLevel);
|
||||||
|
|
||||||
if (allowDirectives && !parsedNonDirective &&
|
if (allowDirectives && !parsedNonDirective &&
|
||||||
stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" &&
|
stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" &&
|
||||||
!stmt.expression.extra.parenthesized) {
|
!stmt.expression.extra.parenthesized) {
|
||||||
let directive = this.stmtToDirective(stmt);
|
const directive = this.stmtToDirective(stmt);
|
||||||
node.directives.push(directive);
|
node.directives.push(directive);
|
||||||
|
|
||||||
if (oldStrict === undefined && directive.value.value === "use strict") {
|
if (oldStrict === undefined && directive.value.value === "use strict") {
|
||||||
@ -549,7 +551,7 @@ pp.parseVar = function (node, isFor, kind) {
|
|||||||
node.declarations = [];
|
node.declarations = [];
|
||||||
node.kind = kind.keyword;
|
node.kind = kind.keyword;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
let decl = this.startNode();
|
const decl = this.startNode();
|
||||||
this.parseVarHead(decl);
|
this.parseVarHead(decl);
|
||||||
if (this.eat(tt.eq)) {
|
if (this.eat(tt.eq)) {
|
||||||
decl.init = this.parseMaybeAssign(isFor);
|
decl.init = this.parseMaybeAssign(isFor);
|
||||||
@ -575,7 +577,7 @@ pp.parseVarHead = function (decl) {
|
|||||||
// `isStatement` parameter).
|
// `isStatement` parameter).
|
||||||
|
|
||||||
pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, optionalId) {
|
pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync, optionalId) {
|
||||||
let oldInMethod = this.state.inMethod;
|
const oldInMethod = this.state.inMethod;
|
||||||
this.state.inMethod = false;
|
this.state.inMethod = false;
|
||||||
|
|
||||||
this.initFunction(node, isAsync);
|
this.initFunction(node, isAsync);
|
||||||
@ -631,13 +633,13 @@ pp.isClassMutatorStarter = function () {
|
|||||||
|
|
||||||
pp.parseClassBody = function (node) {
|
pp.parseClassBody = function (node) {
|
||||||
// class bodies are implicitly strict
|
// class bodies are implicitly strict
|
||||||
let oldStrict = this.state.strict;
|
const oldStrict = this.state.strict;
|
||||||
this.state.strict = true;
|
this.state.strict = true;
|
||||||
|
|
||||||
let hadConstructorCall = false;
|
let hadConstructorCall = false;
|
||||||
let hadConstructor = false;
|
let hadConstructor = false;
|
||||||
let decorators = [];
|
let decorators = [];
|
||||||
let classBody = this.startNode();
|
const classBody = this.startNode();
|
||||||
|
|
||||||
classBody.body = [];
|
classBody.body = [];
|
||||||
|
|
||||||
@ -653,7 +655,7 @@ pp.parseClassBody = function (node) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let method = this.startNode();
|
const method = this.startNode();
|
||||||
|
|
||||||
// steal the decorators if there are any
|
// steal the decorators if there are any
|
||||||
if (decorators.length) {
|
if (decorators.length) {
|
||||||
@ -662,7 +664,7 @@ pp.parseClassBody = function (node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let isConstructorCall = false;
|
let isConstructorCall = false;
|
||||||
let isMaybeStatic = this.match(tt.name) && this.state.value === "static";
|
const isMaybeStatic = this.match(tt.name) && this.state.value === "static";
|
||||||
let isGenerator = this.eat(tt.star);
|
let isGenerator = this.eat(tt.star);
|
||||||
let isGetSet = false;
|
let isGetSet = false;
|
||||||
let isAsync = false;
|
let isAsync = false;
|
||||||
@ -687,7 +689,7 @@ pp.parseClassBody = function (node) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let isAsyncMethod = !this.match(tt.parenL) && !method.computed && method.key.type === "Identifier" && method.key.name === "async";
|
const isAsyncMethod = !this.match(tt.parenL) && !method.computed && method.key.type === "Identifier" && method.key.name === "async";
|
||||||
if (isAsyncMethod) {
|
if (isAsyncMethod) {
|
||||||
if (this.hasPlugin("asyncGenerators") && this.eat(tt.star)) isGenerator = true;
|
if (this.hasPlugin("asyncGenerators") && this.eat(tt.star)) isGenerator = true;
|
||||||
isAsync = true;
|
isAsync = true;
|
||||||
@ -708,7 +710,7 @@ pp.parseClassBody = function (node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// disallow invalid constructors
|
// disallow invalid constructors
|
||||||
let isConstructor = !isConstructorCall && !method.static && (
|
const isConstructor = !isConstructorCall && !method.static && (
|
||||||
(key.type === "Identifier" && key.name === "constructor") ||
|
(key.type === "Identifier" && key.name === "constructor") ||
|
||||||
(key.type === "StringLiteral" && key.value === "constructor")
|
(key.type === "StringLiteral" && key.value === "constructor")
|
||||||
);
|
);
|
||||||
@ -722,7 +724,7 @@ pp.parseClassBody = function (node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// disallow static prototype method
|
// disallow static prototype method
|
||||||
let isStaticPrototype = method.static && (
|
const isStaticPrototype = method.static && (
|
||||||
(key.type === "Identifier" && key.name === "prototype") ||
|
(key.type === "Identifier" && key.name === "prototype") ||
|
||||||
(key.type === "StringLiteral" && key.value === "prototype")
|
(key.type === "StringLiteral" && key.value === "prototype")
|
||||||
);
|
);
|
||||||
@ -748,9 +750,9 @@ pp.parseClassBody = function (node) {
|
|||||||
// get methods aren't allowed to have any parameters
|
// get methods aren't allowed to have any parameters
|
||||||
// set methods must have exactly 1 parameter
|
// set methods must have exactly 1 parameter
|
||||||
if (isGetSet) {
|
if (isGetSet) {
|
||||||
let paramCount = method.kind === "get" ? 0 : 1;
|
const paramCount = method.kind === "get" ? 0 : 1;
|
||||||
if (method.params.length !== paramCount) {
|
if (method.params.length !== paramCount) {
|
||||||
let start = method.start;
|
const start = method.start;
|
||||||
if (method.kind === "get") {
|
if (method.kind === "get") {
|
||||||
this.raise(start, "getter should have no params");
|
this.raise(start, "getter should have no params");
|
||||||
} else {
|
} else {
|
||||||
@ -808,7 +810,7 @@ pp.parseExport = function (node) {
|
|||||||
this.next();
|
this.next();
|
||||||
// export * from '...'
|
// export * from '...'
|
||||||
if (this.match(tt.star)) {
|
if (this.match(tt.star)) {
|
||||||
let specifier = this.startNode();
|
const specifier = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) {
|
if (this.hasPlugin("exportExtensions") && this.eatContextual("as")) {
|
||||||
specifier.exported = this.parseIdentifier();
|
specifier.exported = this.parseIdentifier();
|
||||||
@ -820,12 +822,12 @@ pp.parseExport = function (node) {
|
|||||||
return this.finishNode(node, "ExportAllDeclaration");
|
return this.finishNode(node, "ExportAllDeclaration");
|
||||||
}
|
}
|
||||||
} else if (this.hasPlugin("exportExtensions") && this.isExportDefaultSpecifier()) {
|
} else if (this.hasPlugin("exportExtensions") && this.isExportDefaultSpecifier()) {
|
||||||
let specifier = this.startNode();
|
const specifier = this.startNode();
|
||||||
specifier.exported = this.parseIdentifier(true);
|
specifier.exported = this.parseIdentifier(true);
|
||||||
node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
|
node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
|
||||||
if (this.match(tt.comma) && this.lookahead().type === tt.star) {
|
if (this.match(tt.comma) && this.lookahead().type === tt.star) {
|
||||||
this.expect(tt.comma);
|
this.expect(tt.comma);
|
||||||
let specifier = this.startNode();
|
const specifier = this.startNode();
|
||||||
this.expect(tt.star);
|
this.expect(tt.star);
|
||||||
this.expectContextual("as");
|
this.expectContextual("as");
|
||||||
specifier.exported = this.parseIdentifier();
|
specifier.exported = this.parseIdentifier();
|
||||||
@ -877,7 +879,7 @@ pp.isExportDefaultSpecifier = function () {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let lookahead = this.lookahead();
|
const lookahead = this.lookahead();
|
||||||
return lookahead.type === tt.comma || (lookahead.type === tt.name && lookahead.value === "from");
|
return lookahead.type === tt.comma || (lookahead.type === tt.name && lookahead.value === "from");
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -919,7 +921,7 @@ pp.checkExport = function (node, checkNames, isDefault) {
|
|||||||
this.checkDuplicateExports(node, "default");
|
this.checkDuplicateExports(node, "default");
|
||||||
} else if (node.specifiers && node.specifiers.length) {
|
} else if (node.specifiers && node.specifiers.length) {
|
||||||
// Named exports
|
// Named exports
|
||||||
for (let specifier of node.specifiers) {
|
for (const specifier of node.specifiers) {
|
||||||
this.checkDuplicateExports(specifier, specifier.exported.name);
|
this.checkDuplicateExports(specifier, specifier.exported.name);
|
||||||
}
|
}
|
||||||
} else if (node.declaration) {
|
} else if (node.declaration) {
|
||||||
@ -927,7 +929,7 @@ pp.checkExport = function (node, checkNames, isDefault) {
|
|||||||
if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
|
if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
|
||||||
this.checkDuplicateExports(node, node.declaration.id.name);
|
this.checkDuplicateExports(node, node.declaration.id.name);
|
||||||
} else if (node.declaration.type === "VariableDeclaration") {
|
} else if (node.declaration.type === "VariableDeclaration") {
|
||||||
for (let declaration of node.declaration.declarations) {
|
for (const declaration of node.declaration.declarations) {
|
||||||
this.checkDeclaration(declaration.id);
|
this.checkDeclaration(declaration.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -935,7 +937,7 @@ pp.checkExport = function (node, checkNames, isDefault) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.decorators.length) {
|
if (this.state.decorators.length) {
|
||||||
let isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
|
const isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
|
||||||
if (!node.declaration || !isClass) {
|
if (!node.declaration || !isClass) {
|
||||||
this.raise(node.start, "You can only use decorators on an export when exporting a class");
|
this.raise(node.start, "You can only use decorators on an export when exporting a class");
|
||||||
}
|
}
|
||||||
@ -945,11 +947,11 @@ pp.checkExport = function (node, checkNames, isDefault) {
|
|||||||
|
|
||||||
pp.checkDeclaration = function(node) {
|
pp.checkDeclaration = function(node) {
|
||||||
if (node.type === "ObjectPattern") {
|
if (node.type === "ObjectPattern") {
|
||||||
for (let prop of node.properties) {
|
for (const prop of node.properties) {
|
||||||
this.checkDeclaration(prop);
|
this.checkDeclaration(prop);
|
||||||
}
|
}
|
||||||
} else if (node.type === "ArrayPattern") {
|
} else if (node.type === "ArrayPattern") {
|
||||||
for (let elem of node.elements) {
|
for (const elem of node.elements) {
|
||||||
if (elem) {
|
if (elem) {
|
||||||
this.checkDeclaration(elem);
|
this.checkDeclaration(elem);
|
||||||
}
|
}
|
||||||
@ -980,7 +982,7 @@ pp.raiseDuplicateExportError = function(node, name) {
|
|||||||
// Parses a comma-separated list of module exports.
|
// Parses a comma-separated list of module exports.
|
||||||
|
|
||||||
pp.parseExportSpecifiers = function () {
|
pp.parseExportSpecifiers = function () {
|
||||||
let nodes = [];
|
const nodes = [];
|
||||||
let first = true;
|
let first = true;
|
||||||
let needsFrom;
|
let needsFrom;
|
||||||
|
|
||||||
@ -995,10 +997,10 @@ pp.parseExportSpecifiers = function () {
|
|||||||
if (this.eat(tt.braceR)) break;
|
if (this.eat(tt.braceR)) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
let isDefault = this.match(tt._default);
|
const isDefault = this.match(tt._default);
|
||||||
if (isDefault && !needsFrom) needsFrom = true;
|
if (isDefault && !needsFrom) needsFrom = true;
|
||||||
|
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
node.local = this.parseIdentifier(isDefault);
|
node.local = this.parseIdentifier(isDefault);
|
||||||
node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
|
node.exported = this.eatContextual("as") ? this.parseIdentifier(true) : node.local.__clone();
|
||||||
nodes.push(this.finishNode(node, "ExportSpecifier"));
|
nodes.push(this.finishNode(node, "ExportSpecifier"));
|
||||||
@ -1037,13 +1039,14 @@ pp.parseImportSpecifiers = function (node) {
|
|||||||
let first = true;
|
let first = true;
|
||||||
if (this.match(tt.name)) {
|
if (this.match(tt.name)) {
|
||||||
// import defaultObj, { x, y as z } from '...'
|
// import defaultObj, { x, y as z } from '...'
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
|
const startLoc = this.state.startLoc;
|
||||||
node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc));
|
node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), startPos, startLoc));
|
||||||
if (!this.eat(tt.comma)) return;
|
if (!this.eat(tt.comma)) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.match(tt.star)) {
|
if (this.match(tt.star)) {
|
||||||
let specifier = this.startNode();
|
const specifier = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
this.expectContextual("as");
|
this.expectContextual("as");
|
||||||
specifier.local = this.parseIdentifier();
|
specifier.local = this.parseIdentifier();
|
||||||
@ -1066,7 +1069,7 @@ pp.parseImportSpecifiers = function (node) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.parseImportSpecifier = function (node) {
|
pp.parseImportSpecifier = function (node) {
|
||||||
let specifier = this.startNode();
|
const specifier = this.startNode();
|
||||||
specifier.imported = this.parseIdentifier(true);
|
specifier.imported = this.parseIdentifier(true);
|
||||||
specifier.local = this.eatContextual("as") ? this.parseIdentifier() : specifier.imported.__clone();
|
specifier.local = this.eatContextual("as") ? this.parseIdentifier() : specifier.imported.__clone();
|
||||||
this.checkLVal(specifier.local, true, undefined, "import specifier");
|
this.checkLVal(specifier.local, true, undefined, "import specifier");
|
||||||
@ -1074,7 +1077,7 @@ pp.parseImportSpecifier = function (node) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.parseImportSpecifierDefault = function (id, startPos, startLoc) {
|
pp.parseImportSpecifierDefault = function (id, startPos, startLoc) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.local = id;
|
node.local = id;
|
||||||
this.checkLVal(node.local, true, undefined, "default import specifier");
|
this.checkLVal(node.local, true, undefined, "default import specifier");
|
||||||
return this.finishNode(node, "ImportDefaultSpecifier");
|
return this.finishNode(node, "ImportDefaultSpecifier");
|
||||||
|
|||||||
@ -11,7 +11,7 @@ const pp = Parser.prototype;
|
|||||||
pp.addExtra = function (node, key, val) {
|
pp.addExtra = function (node, key, val) {
|
||||||
if (!node) return;
|
if (!node) return;
|
||||||
|
|
||||||
let extra = node.extra = node.extra || {};
|
const extra = node.extra = node.extra || {};
|
||||||
extra[key] = val;
|
extra[key] = val;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -5,14 +5,14 @@ import { types as tt } from "../tokenizer/types";
|
|||||||
import { types as ct } from "../tokenizer/context";
|
import { types as ct } from "../tokenizer/context";
|
||||||
import Parser from "../parser";
|
import Parser from "../parser";
|
||||||
|
|
||||||
let pp = Parser.prototype;
|
const pp = Parser.prototype;
|
||||||
|
|
||||||
pp.flowParseTypeInitialiser = function (tok) {
|
pp.flowParseTypeInitialiser = function (tok) {
|
||||||
let oldInType = this.state.inType;
|
const oldInType = this.state.inType;
|
||||||
this.state.inType = true;
|
this.state.inType = true;
|
||||||
this.expect(tok || tt.colon);
|
this.expect(tok || tt.colon);
|
||||||
|
|
||||||
let type = this.flowParseType();
|
const type = this.flowParseType();
|
||||||
this.state.inType = oldInType;
|
this.state.inType = oldInType;
|
||||||
return type;
|
return type;
|
||||||
};
|
};
|
||||||
@ -26,10 +26,10 @@ pp.flowParseDeclareClass = function (node) {
|
|||||||
pp.flowParseDeclareFunction = function (node) {
|
pp.flowParseDeclareFunction = function (node) {
|
||||||
this.next();
|
this.next();
|
||||||
|
|
||||||
let id = node.id = this.parseIdentifier();
|
const id = node.id = this.parseIdentifier();
|
||||||
|
|
||||||
let typeNode = this.startNode();
|
const typeNode = this.startNode();
|
||||||
let typeContainer = this.startNode();
|
const typeContainer = this.startNode();
|
||||||
|
|
||||||
if (this.isRelational("<")) {
|
if (this.isRelational("<")) {
|
||||||
typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
|
typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
|
||||||
@ -38,7 +38,7 @@ pp.flowParseDeclareFunction = function (node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.expect(tt.parenL);
|
this.expect(tt.parenL);
|
||||||
let tmp = this.flowParseFunctionTypeParams();
|
const tmp = this.flowParseFunctionTypeParams();
|
||||||
typeNode.params = tmp.params;
|
typeNode.params = tmp.params;
|
||||||
typeNode.rest = tmp.rest;
|
typeNode.rest = tmp.rest;
|
||||||
this.expect(tt.parenR);
|
this.expect(tt.parenR);
|
||||||
@ -92,11 +92,11 @@ pp.flowParseDeclareModule = function (node) {
|
|||||||
node.id = this.parseIdentifier();
|
node.id = this.parseIdentifier();
|
||||||
}
|
}
|
||||||
|
|
||||||
let bodyNode = node.body = this.startNode();
|
const bodyNode = node.body = this.startNode();
|
||||||
let body = bodyNode.body = [];
|
const body = bodyNode.body = [];
|
||||||
this.expect(tt.braceL);
|
this.expect(tt.braceL);
|
||||||
while (!this.match(tt.braceR)) {
|
while (!this.match(tt.braceR)) {
|
||||||
let node2 = this.startNode();
|
const node2 = this.startNode();
|
||||||
|
|
||||||
this.expectContextual("declare", "Unexpected token. Only declares are allowed inside declare module");
|
this.expectContextual("declare", "Unexpected token. Only declares are allowed inside declare module");
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ pp.flowParseInterfaceish = function (node, allowStatic) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseInterfaceExtends = function () {
|
pp.flowParseInterfaceExtends = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
|
|
||||||
node.id = this.flowParseQualifiedTypeIdentifier();
|
node.id = this.flowParseQualifiedTypeIdentifier();
|
||||||
if (this.isRelational("<")) {
|
if (this.isRelational("<")) {
|
||||||
@ -198,11 +198,11 @@ pp.flowParseTypeAlias = function (node) {
|
|||||||
// Type annotations
|
// Type annotations
|
||||||
|
|
||||||
pp.flowParseTypeParameter = function () {
|
pp.flowParseTypeParameter = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
|
|
||||||
let variance = this.flowParseVariance();
|
const variance = this.flowParseVariance();
|
||||||
|
|
||||||
let ident = this.flowParseTypeAnnotatableIdentifier();
|
const ident = this.flowParseTypeAnnotatableIdentifier();
|
||||||
node.name = ident.name;
|
node.name = ident.name;
|
||||||
node.variance = variance;
|
node.variance = variance;
|
||||||
node.bound = ident.typeAnnotation;
|
node.bound = ident.typeAnnotation;
|
||||||
@ -217,7 +217,7 @@ pp.flowParseTypeParameter = function () {
|
|||||||
|
|
||||||
pp.flowParseTypeParameterDeclaration = function () {
|
pp.flowParseTypeParameterDeclaration = function () {
|
||||||
const oldInType = this.state.inType;
|
const oldInType = this.state.inType;
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
node.params = [];
|
node.params = [];
|
||||||
|
|
||||||
this.state.inType = true;
|
this.state.inType = true;
|
||||||
@ -243,7 +243,8 @@ pp.flowParseTypeParameterDeclaration = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseTypeParameterInstantiation = function () {
|
pp.flowParseTypeParameterInstantiation = function () {
|
||||||
let node = this.startNode(), oldInType = this.state.inType;
|
const node = this.startNode();
|
||||||
|
const oldInType = this.state.inType;
|
||||||
node.params = [];
|
node.params = [];
|
||||||
|
|
||||||
this.state.inType = true;
|
this.state.inType = true;
|
||||||
@ -312,7 +313,7 @@ pp.flowParseObjectTypeMethodish = function (node) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
|
pp.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(startPos, startLoc));
|
node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(startPos, startLoc));
|
||||||
node.static = isStatic;
|
node.static = isStatic;
|
||||||
node.key = key;
|
node.key = key;
|
||||||
@ -322,7 +323,7 @@ pp.flowParseObjectTypeMethod = function (startPos, startLoc, isStatic, key) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseObjectTypeCallProperty = function (node, isStatic) {
|
pp.flowParseObjectTypeCallProperty = function (node, isStatic) {
|
||||||
let valueNode = this.startNode();
|
const valueNode = this.startNode();
|
||||||
node.static = isStatic;
|
node.static = isStatic;
|
||||||
node.value = this.flowParseObjectTypeMethodish(valueNode);
|
node.value = this.flowParseObjectTypeMethodish(valueNode);
|
||||||
this.flowObjectTypeSemicolon();
|
this.flowObjectTypeSemicolon();
|
||||||
@ -333,7 +334,7 @@ pp.flowParseObjectType = function (allowStatic, allowExact) {
|
|||||||
const oldInType = this.state.inType;
|
const oldInType = this.state.inType;
|
||||||
this.state.inType = true;
|
this.state.inType = true;
|
||||||
|
|
||||||
let nodeStart = this.startNode();
|
const nodeStart = this.startNode();
|
||||||
let node;
|
let node;
|
||||||
let propertyKey;
|
let propertyKey;
|
||||||
let isStatic = false;
|
let isStatic = false;
|
||||||
@ -358,15 +359,16 @@ pp.flowParseObjectType = function (allowStatic, allowExact) {
|
|||||||
|
|
||||||
while (!this.match(endDelim)) {
|
while (!this.match(endDelim)) {
|
||||||
let optional = false;
|
let optional = false;
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
|
const startLoc = this.state.startLoc;
|
||||||
node = this.startNode();
|
node = this.startNode();
|
||||||
if (allowStatic && this.isContextual("static") && this.lookahead().type !== tt.colon) {
|
if (allowStatic && this.isContextual("static") && this.lookahead().type !== tt.colon) {
|
||||||
this.next();
|
this.next();
|
||||||
isStatic = true;
|
isStatic = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let variancePos = this.state.start;
|
const variancePos = this.state.start;
|
||||||
let variance = this.flowParseVariance();
|
const variance = this.flowParseVariance();
|
||||||
|
|
||||||
if (this.match(tt.bracketL)) {
|
if (this.match(tt.bracketL)) {
|
||||||
nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
|
nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
|
||||||
@ -422,7 +424,7 @@ pp.flowParseQualifiedTypeIdentifier = function (startPos, startLoc, id) {
|
|||||||
let node = id || this.parseIdentifier();
|
let node = id || this.parseIdentifier();
|
||||||
|
|
||||||
while (this.eat(tt.dot)) {
|
while (this.eat(tt.dot)) {
|
||||||
let node2 = this.startNodeAt(startPos, startLoc);
|
const node2 = this.startNodeAt(startPos, startLoc);
|
||||||
node2.qualification = node;
|
node2.qualification = node;
|
||||||
node2.id = this.parseIdentifier();
|
node2.id = this.parseIdentifier();
|
||||||
node = this.finishNode(node2, "QualifiedTypeIdentifier");
|
node = this.finishNode(node2, "QualifiedTypeIdentifier");
|
||||||
@ -432,7 +434,7 @@ pp.flowParseQualifiedTypeIdentifier = function (startPos, startLoc, id) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseGenericType = function (startPos, startLoc, id) {
|
pp.flowParseGenericType = function (startPos, startLoc, id) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
|
|
||||||
node.typeParameters = null;
|
node.typeParameters = null;
|
||||||
node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
|
node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
|
||||||
@ -445,14 +447,14 @@ pp.flowParseGenericType = function (startPos, startLoc, id) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseTypeofType = function () {
|
pp.flowParseTypeofType = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.expect(tt._typeof);
|
this.expect(tt._typeof);
|
||||||
node.argument = this.flowParsePrimaryType();
|
node.argument = this.flowParsePrimaryType();
|
||||||
return this.finishNode(node, "TypeofTypeAnnotation");
|
return this.finishNode(node, "TypeofTypeAnnotation");
|
||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseTupleType = function () {
|
pp.flowParseTupleType = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
node.types = [];
|
node.types = [];
|
||||||
this.expect(tt.bracketL);
|
this.expect(tt.bracketL);
|
||||||
// We allow trailing commas
|
// We allow trailing commas
|
||||||
@ -469,7 +471,7 @@ pp.flowParseFunctionTypeParam = function () {
|
|||||||
let name = null;
|
let name = null;
|
||||||
let optional = false;
|
let optional = false;
|
||||||
let typeAnnotation = null;
|
let typeAnnotation = null;
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
const lh = this.lookahead();
|
const lh = this.lookahead();
|
||||||
if (lh.type === tt.colon ||
|
if (lh.type === tt.colon ||
|
||||||
lh.type === tt.question) {
|
lh.type === tt.question) {
|
||||||
@ -488,7 +490,7 @@ pp.flowParseFunctionTypeParam = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.reinterpretTypeAsFunctionTypeParam = function (type) {
|
pp.reinterpretTypeAsFunctionTypeParam = function (type) {
|
||||||
let node = this.startNodeAt(type.start, type.loc);
|
const node = this.startNodeAt(type.start, type.loc);
|
||||||
node.name = null;
|
node.name = null;
|
||||||
node.optional = false;
|
node.optional = false;
|
||||||
node.typeAnnotation = type;
|
node.typeAnnotation = type;
|
||||||
@ -496,7 +498,7 @@ pp.reinterpretTypeAsFunctionTypeParam = function (type) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseFunctionTypeParams = function (params = []) {
|
pp.flowParseFunctionTypeParams = function (params = []) {
|
||||||
let ret = { params, rest: null };
|
const ret = { params, rest: null };
|
||||||
while (this.match(tt.name)) {
|
while (this.match(tt.name)) {
|
||||||
ret.params.push(this.flowParseFunctionTypeParam());
|
ret.params.push(this.flowParseFunctionTypeParam());
|
||||||
if (!this.match(tt.parenR)) {
|
if (!this.match(tt.parenR)) {
|
||||||
@ -542,12 +544,13 @@ pp.flowIdentToTypeAnnotation = function (startPos, startLoc, node, id) {
|
|||||||
// primary types are kind of like primary expressions...they're the
|
// primary types are kind of like primary expressions...they're the
|
||||||
// primitives with which other types are constructed.
|
// primitives with which other types are constructed.
|
||||||
pp.flowParsePrimaryType = function () {
|
pp.flowParsePrimaryType = function () {
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
let node = this.startNode();
|
const startLoc = this.state.startLoc;
|
||||||
|
const node = this.startNode();
|
||||||
let tmp;
|
let tmp;
|
||||||
let type;
|
let type;
|
||||||
let isGroupedType = false;
|
let isGroupedType = false;
|
||||||
let oldNoAnonFunctionType = this.state.noAnonFunctionType;
|
const oldNoAnonFunctionType = this.state.noAnonFunctionType;
|
||||||
|
|
||||||
switch (this.state.type) {
|
switch (this.state.type) {
|
||||||
case tt.name:
|
case tt.name:
|
||||||
@ -585,7 +588,7 @@ pp.flowParsePrimaryType = function () {
|
|||||||
// Check to see if this is actually a grouped type
|
// Check to see if this is actually a grouped type
|
||||||
if (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {
|
if (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {
|
||||||
if (this.match(tt.name)) {
|
if (this.match(tt.name)) {
|
||||||
let token = this.lookahead().type;
|
const token = this.lookahead().type;
|
||||||
isGroupedType = token !== tt.question && token !== tt.colon;
|
isGroupedType = token !== tt.question && token !== tt.colon;
|
||||||
} else {
|
} else {
|
||||||
isGroupedType = true;
|
isGroupedType = true;
|
||||||
@ -698,7 +701,7 @@ pp.flowParsePostfixType = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParsePrefixType = function () {
|
pp.flowParsePrefixType = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
if (this.eat(tt.question)) {
|
if (this.eat(tt.question)) {
|
||||||
node.typeAnnotation = this.flowParsePrefixType();
|
node.typeAnnotation = this.flowParsePrefixType();
|
||||||
return this.finishNode(node, "NullableTypeAnnotation");
|
return this.finishNode(node, "NullableTypeAnnotation");
|
||||||
@ -721,9 +724,9 @@ pp.flowParseAnonFunctionWithoutParens = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseIntersectionType = function () {
|
pp.flowParseIntersectionType = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.eat(tt.bitwiseAND);
|
this.eat(tt.bitwiseAND);
|
||||||
let type = this.flowParseAnonFunctionWithoutParens();
|
const type = this.flowParseAnonFunctionWithoutParens();
|
||||||
node.types = [type];
|
node.types = [type];
|
||||||
while (this.eat(tt.bitwiseAND)) {
|
while (this.eat(tt.bitwiseAND)) {
|
||||||
node.types.push(this.flowParseAnonFunctionWithoutParens());
|
node.types.push(this.flowParseAnonFunctionWithoutParens());
|
||||||
@ -732,9 +735,9 @@ pp.flowParseIntersectionType = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseUnionType = function () {
|
pp.flowParseUnionType = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.eat(tt.bitwiseOR);
|
this.eat(tt.bitwiseOR);
|
||||||
let type = this.flowParseIntersectionType();
|
const type = this.flowParseIntersectionType();
|
||||||
node.types = [type];
|
node.types = [type];
|
||||||
while (this.eat(tt.bitwiseOR)) {
|
while (this.eat(tt.bitwiseOR)) {
|
||||||
node.types.push(this.flowParseIntersectionType());
|
node.types.push(this.flowParseIntersectionType());
|
||||||
@ -743,21 +746,21 @@ pp.flowParseUnionType = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseType = function () {
|
pp.flowParseType = function () {
|
||||||
let oldInType = this.state.inType;
|
const oldInType = this.state.inType;
|
||||||
this.state.inType = true;
|
this.state.inType = true;
|
||||||
let type = this.flowParseUnionType();
|
const type = this.flowParseUnionType();
|
||||||
this.state.inType = oldInType;
|
this.state.inType = oldInType;
|
||||||
return type;
|
return type;
|
||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseTypeAnnotation = function () {
|
pp.flowParseTypeAnnotation = function () {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
node.typeAnnotation = this.flowParseTypeInitialiser();
|
node.typeAnnotation = this.flowParseTypeInitialiser();
|
||||||
return this.finishNode(node, "TypeAnnotation");
|
return this.finishNode(node, "TypeAnnotation");
|
||||||
};
|
};
|
||||||
|
|
||||||
pp.flowParseTypeAnnotatableIdentifier = function () {
|
pp.flowParseTypeAnnotatableIdentifier = function () {
|
||||||
let ident = this.parseIdentifier();
|
const ident = this.parseIdentifier();
|
||||||
if (this.match(tt.colon)) {
|
if (this.match(tt.colon)) {
|
||||||
ident.typeAnnotation = this.flowParseTypeAnnotation();
|
ident.typeAnnotation = this.flowParseTypeAnnotation();
|
||||||
this.finishNode(ident, ident.type);
|
this.finishNode(ident, ident.type);
|
||||||
@ -808,7 +811,7 @@ export default function (instance) {
|
|||||||
return function (declaration, topLevel) {
|
return function (declaration, topLevel) {
|
||||||
// strict mode handling of `interface` since it's a reserved word
|
// strict mode handling of `interface` since it's a reserved word
|
||||||
if (this.state.strict && this.match(tt.name) && this.state.value === "interface") {
|
if (this.state.strict && this.match(tt.name) && this.state.value === "interface") {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
return this.flowParseInterface(node);
|
return this.flowParseInterface(node);
|
||||||
} else {
|
} else {
|
||||||
@ -879,7 +882,7 @@ export default function (instance) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.match(tt.colon)) {
|
if (this.match(tt.colon)) {
|
||||||
let typeCastNode = this.startNodeAt(startLoc, startPos);
|
const typeCastNode = this.startNodeAt(startLoc, startPos);
|
||||||
typeCastNode.expression = node;
|
typeCastNode.expression = node;
|
||||||
typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
|
typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
|
||||||
|
|
||||||
@ -905,7 +908,7 @@ export default function (instance) {
|
|||||||
if (this.isContextual("type")) {
|
if (this.isContextual("type")) {
|
||||||
node.exportKind = "type";
|
node.exportKind = "type";
|
||||||
|
|
||||||
let declarationNode = this.startNode();
|
const declarationNode = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
|
|
||||||
if (this.match(tt.braceL)) {
|
if (this.match(tt.braceL)) {
|
||||||
@ -919,7 +922,7 @@ export default function (instance) {
|
|||||||
}
|
}
|
||||||
} else if (this.isContextual("interface")) {
|
} else if (this.isContextual("interface")) {
|
||||||
node.exportKind = "type";
|
node.exportKind = "type";
|
||||||
let declarationNode = this.startNode();
|
const declarationNode = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
return this.flowParseInterface(declarationNode);
|
return this.flowParseInterface(declarationNode);
|
||||||
} else {
|
} else {
|
||||||
@ -981,7 +984,7 @@ export default function (instance) {
|
|||||||
instance.extend("toAssignableList", function (inner) {
|
instance.extend("toAssignableList", function (inner) {
|
||||||
return function (exprList, isBinding, contextDescription) {
|
return function (exprList, isBinding, contextDescription) {
|
||||||
for (let i = 0; i < exprList.length; i++) {
|
for (let i = 0; i < exprList.length; i++) {
|
||||||
let expr = exprList[i];
|
const expr = exprList[i];
|
||||||
if (expr && expr.type === "TypeCastExpression") {
|
if (expr && expr.type === "TypeCastExpression") {
|
||||||
exprList[i] = this.typeCastToParameter(expr);
|
exprList[i] = this.typeCastToParameter(expr);
|
||||||
}
|
}
|
||||||
@ -995,7 +998,7 @@ export default function (instance) {
|
|||||||
instance.extend("toReferencedList", function () {
|
instance.extend("toReferencedList", function () {
|
||||||
return function (exprList) {
|
return function (exprList) {
|
||||||
for (let i = 0; i < exprList.length; i++) {
|
for (let i = 0; i < exprList.length; i++) {
|
||||||
let expr = exprList[i];
|
const expr = exprList[i];
|
||||||
if (expr && expr._exprListItem && expr.type === "TypeCastExpression") {
|
if (expr && expr._exprListItem && expr.type === "TypeCastExpression") {
|
||||||
this.raise(expr.start, "Unexpected type cast");
|
this.raise(expr.start, "Unexpected type cast");
|
||||||
}
|
}
|
||||||
@ -1009,8 +1012,8 @@ export default function (instance) {
|
|||||||
// the position where this function is called
|
// the position where this function is called
|
||||||
instance.extend("parseExprListItem", function (inner) {
|
instance.extend("parseExprListItem", function (inner) {
|
||||||
return function (allowEmpty, refShorthandDefaultPos) {
|
return function (allowEmpty, refShorthandDefaultPos) {
|
||||||
let container = this.startNode();
|
const container = this.startNode();
|
||||||
let node = inner.call(this, allowEmpty, refShorthandDefaultPos);
|
const node = inner.call(this, allowEmpty, refShorthandDefaultPos);
|
||||||
if (this.match(tt.colon)) {
|
if (this.match(tt.colon)) {
|
||||||
container._exprListItem = true;
|
container._exprListItem = true;
|
||||||
container.expression = node;
|
container.expression = node;
|
||||||
@ -1073,9 +1076,9 @@ export default function (instance) {
|
|||||||
}
|
}
|
||||||
if (this.isContextual("implements")) {
|
if (this.isContextual("implements")) {
|
||||||
this.next();
|
this.next();
|
||||||
let implemented = node.implements = [];
|
const implemented = node.implements = [];
|
||||||
do {
|
do {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
node.id = this.parseIdentifier();
|
node.id = this.parseIdentifier();
|
||||||
if (this.isRelational("<")) {
|
if (this.isRelational("<")) {
|
||||||
node.typeParameters = this.flowParseTypeParameterInstantiation();
|
node.typeParameters = this.flowParseTypeParameterInstantiation();
|
||||||
@ -1090,9 +1093,9 @@ export default function (instance) {
|
|||||||
|
|
||||||
instance.extend("parsePropertyName", function (inner) {
|
instance.extend("parsePropertyName", function (inner) {
|
||||||
return function (node) {
|
return function (node) {
|
||||||
let variancePos = this.state.start;
|
const variancePos = this.state.start;
|
||||||
let variance = this.flowParseVariance();
|
const variance = this.flowParseVariance();
|
||||||
let key = inner.call(this, node);
|
const key = inner.call(this, node);
|
||||||
node.variance = variance;
|
node.variance = variance;
|
||||||
node.variancePos = variancePos;
|
node.variancePos = variancePos;
|
||||||
return key;
|
return key;
|
||||||
@ -1163,7 +1166,7 @@ export default function (instance) {
|
|||||||
kind = "type";
|
kind = "type";
|
||||||
}
|
}
|
||||||
if (kind) {
|
if (kind) {
|
||||||
let lh = this.lookahead();
|
const lh = this.lookahead();
|
||||||
if ((lh.type === tt.name && lh.value !== "from") || lh.type === tt.braceL || lh.type === tt.star) {
|
if ((lh.type === tt.name && lh.value !== "from") || lh.type === tt.braceL || lh.type === tt.star) {
|
||||||
this.next();
|
this.next();
|
||||||
node.importKind = kind;
|
node.importKind = kind;
|
||||||
@ -1177,7 +1180,7 @@ export default function (instance) {
|
|||||||
// parse import-type/typeof shorthand
|
// parse import-type/typeof shorthand
|
||||||
instance.extend("parseImportSpecifier", function () {
|
instance.extend("parseImportSpecifier", function () {
|
||||||
return function (node) {
|
return function (node) {
|
||||||
let specifier = this.startNode();
|
const specifier = this.startNode();
|
||||||
const firstIdentLoc = this.state.start;
|
const firstIdentLoc = this.state.start;
|
||||||
const firstIdent = this.parseIdentifier(true);
|
const firstIdent = this.parseIdentifier(true);
|
||||||
|
|
||||||
@ -1334,11 +1337,11 @@ export default function (instance) {
|
|||||||
instance.extend("parseArrow", function (inner) {
|
instance.extend("parseArrow", function (inner) {
|
||||||
return function (node) {
|
return function (node) {
|
||||||
if (this.match(tt.colon)) {
|
if (this.match(tt.colon)) {
|
||||||
let state = this.state.clone();
|
const state = this.state.clone();
|
||||||
try {
|
try {
|
||||||
const oldNoAnonFunctionType = this.state.noAnonFunctionType;
|
const oldNoAnonFunctionType = this.state.noAnonFunctionType;
|
||||||
this.state.noAnonFunctionType = true;
|
this.state.noAnonFunctionType = true;
|
||||||
let returnType = this.flowParseTypeAnnotation();
|
const returnType = this.flowParseTypeAnnotation();
|
||||||
this.state.noAnonFunctionType = oldNoAnonFunctionType;
|
this.state.noAnonFunctionType = oldNoAnonFunctionType;
|
||||||
|
|
||||||
if (this.canInsertSemicolon()) this.unexpected();
|
if (this.canInsertSemicolon()) this.unexpected();
|
||||||
|
|||||||
@ -26,7 +26,7 @@ tt.jsxTagStart.updateContext = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
tt.jsxTagEnd.updateContext = function(prevType) {
|
tt.jsxTagEnd.updateContext = function(prevType) {
|
||||||
let out = this.state.context.pop();
|
const out = this.state.context.pop();
|
||||||
if (out === tc.j_oTag && prevType === tt.slash || out === tc.j_cTag) {
|
if (out === tc.j_oTag && prevType === tt.slash || out === tc.j_cTag) {
|
||||||
this.state.context.pop();
|
this.state.context.pop();
|
||||||
this.state.exprAllowed = this.curContext() === tc.j_expr;
|
this.state.exprAllowed = this.curContext() === tc.j_expr;
|
||||||
@ -35,7 +35,7 @@ tt.jsxTagEnd.updateContext = function(prevType) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let pp = Parser.prototype;
|
const pp = Parser.prototype;
|
||||||
|
|
||||||
// Reads inline JSX contents token.
|
// Reads inline JSX contents token.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ pp.jsxReadToken = function() {
|
|||||||
this.raise(this.state.start, "Unterminated JSX contents");
|
this.raise(this.state.start, "Unterminated JSX contents");
|
||||||
}
|
}
|
||||||
|
|
||||||
let ch = this.input.charCodeAt(this.state.pos);
|
const ch = this.input.charCodeAt(this.state.pos);
|
||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 60: // "<"
|
case 60: // "<"
|
||||||
@ -81,7 +81,7 @@ pp.jsxReadToken = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pp.jsxReadNewLine = function(normalizeCRLF) {
|
pp.jsxReadNewLine = function(normalizeCRLF) {
|
||||||
let ch = this.input.charCodeAt(this.state.pos);
|
const ch = this.input.charCodeAt(this.state.pos);
|
||||||
let out;
|
let out;
|
||||||
++this.state.pos;
|
++this.state.pos;
|
||||||
if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
|
if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
|
||||||
@ -104,7 +104,7 @@ pp.jsxReadString = function(quote) {
|
|||||||
this.raise(this.state.start, "Unterminated string constant");
|
this.raise(this.state.start, "Unterminated string constant");
|
||||||
}
|
}
|
||||||
|
|
||||||
let ch = this.input.charCodeAt(this.state.pos);
|
const ch = this.input.charCodeAt(this.state.pos);
|
||||||
if (ch === quote) break;
|
if (ch === quote) break;
|
||||||
if (ch === 38) { // "&"
|
if (ch === 38) { // "&"
|
||||||
out += this.input.slice(chunkStart, this.state.pos);
|
out += this.input.slice(chunkStart, this.state.pos);
|
||||||
@ -128,7 +128,7 @@ pp.jsxReadEntity = function() {
|
|||||||
let entity;
|
let entity;
|
||||||
let ch = this.input[this.state.pos];
|
let ch = this.input[this.state.pos];
|
||||||
|
|
||||||
let startPos = ++this.state.pos;
|
const startPos = ++this.state.pos;
|
||||||
while (this.state.pos < this.input.length && count++ < 10) {
|
while (this.state.pos < this.input.length && count++ < 10) {
|
||||||
ch = this.input[this.state.pos++];
|
ch = this.input[this.state.pos++];
|
||||||
if (ch === ";") {
|
if (ch === ";") {
|
||||||
@ -166,7 +166,7 @@ pp.jsxReadEntity = function() {
|
|||||||
|
|
||||||
pp.jsxReadWord = function() {
|
pp.jsxReadWord = function() {
|
||||||
let ch;
|
let ch;
|
||||||
let start = this.state.pos;
|
const start = this.state.pos;
|
||||||
do {
|
do {
|
||||||
ch = this.input.charCodeAt(++this.state.pos);
|
ch = this.input.charCodeAt(++this.state.pos);
|
||||||
} while (isIdentifierChar(ch) || ch === 45); // "-"
|
} while (isIdentifierChar(ch) || ch === 45); // "-"
|
||||||
@ -192,7 +192,7 @@ function getQualifiedJSXName(object) {
|
|||||||
// Parse next token as JSX identifier
|
// Parse next token as JSX identifier
|
||||||
|
|
||||||
pp.jsxParseIdentifier = function() {
|
pp.jsxParseIdentifier = function() {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
if (this.match(tt.jsxName)) {
|
if (this.match(tt.jsxName)) {
|
||||||
node.name = this.state.value;
|
node.name = this.state.value;
|
||||||
} else if (this.state.type.keyword) {
|
} else if (this.state.type.keyword) {
|
||||||
@ -207,11 +207,12 @@ pp.jsxParseIdentifier = function() {
|
|||||||
// Parse namespaced identifier.
|
// Parse namespaced identifier.
|
||||||
|
|
||||||
pp.jsxParseNamespacedName = function() {
|
pp.jsxParseNamespacedName = function() {
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
let name = this.jsxParseIdentifier();
|
const startLoc = this.state.startLoc;
|
||||||
|
const name = this.jsxParseIdentifier();
|
||||||
if (!this.eat(tt.colon)) return name;
|
if (!this.eat(tt.colon)) return name;
|
||||||
|
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.namespace = name;
|
node.namespace = name;
|
||||||
node.name = this.jsxParseIdentifier();
|
node.name = this.jsxParseIdentifier();
|
||||||
return this.finishNode(node, "JSXNamespacedName");
|
return this.finishNode(node, "JSXNamespacedName");
|
||||||
@ -221,10 +222,11 @@ pp.jsxParseNamespacedName = function() {
|
|||||||
// or single identifier.
|
// or single identifier.
|
||||||
|
|
||||||
pp.jsxParseElementName = function() {
|
pp.jsxParseElementName = function() {
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
|
const startLoc = this.state.startLoc;
|
||||||
let node = this.jsxParseNamespacedName();
|
let node = this.jsxParseNamespacedName();
|
||||||
while (this.eat(tt.dot)) {
|
while (this.eat(tt.dot)) {
|
||||||
let newNode = this.startNodeAt(startPos, startLoc);
|
const newNode = this.startNodeAt(startPos, startLoc);
|
||||||
newNode.object = node;
|
newNode.object = node;
|
||||||
newNode.property = this.jsxParseIdentifier();
|
newNode.property = this.jsxParseIdentifier();
|
||||||
node = this.finishNode(newNode, "JSXMemberExpression");
|
node = this.finishNode(newNode, "JSXMemberExpression");
|
||||||
@ -261,14 +263,14 @@ pp.jsxParseAttributeValue = function() {
|
|||||||
// at the beginning of the next one (right brace).
|
// at the beginning of the next one (right brace).
|
||||||
|
|
||||||
pp.jsxParseEmptyExpression = function() {
|
pp.jsxParseEmptyExpression = function() {
|
||||||
let node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
|
const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
|
||||||
return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
|
return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Parse JSX spread child
|
// Parse JSX spread child
|
||||||
|
|
||||||
pp.jsxParseSpreadChild = function() {
|
pp.jsxParseSpreadChild = function() {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.expect(tt.braceL);
|
this.expect(tt.braceL);
|
||||||
this.expect(tt.ellipsis);
|
this.expect(tt.ellipsis);
|
||||||
node.expression = this.parseExpression();
|
node.expression = this.parseExpression();
|
||||||
@ -281,7 +283,7 @@ pp.jsxParseSpreadChild = function() {
|
|||||||
|
|
||||||
|
|
||||||
pp.jsxParseExpressionContainer = function() {
|
pp.jsxParseExpressionContainer = function() {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
this.next();
|
this.next();
|
||||||
if (this.match(tt.braceR)) {
|
if (this.match(tt.braceR)) {
|
||||||
node.expression = this.jsxParseEmptyExpression();
|
node.expression = this.jsxParseEmptyExpression();
|
||||||
@ -295,7 +297,7 @@ pp.jsxParseExpressionContainer = function() {
|
|||||||
// Parses following JSX attribute name-value pair.
|
// Parses following JSX attribute name-value pair.
|
||||||
|
|
||||||
pp.jsxParseAttribute = function() {
|
pp.jsxParseAttribute = function() {
|
||||||
let node = this.startNode();
|
const node = this.startNode();
|
||||||
if (this.eat(tt.braceL)) {
|
if (this.eat(tt.braceL)) {
|
||||||
this.expect(tt.ellipsis);
|
this.expect(tt.ellipsis);
|
||||||
node.argument = this.parseMaybeAssign();
|
node.argument = this.parseMaybeAssign();
|
||||||
@ -310,7 +312,7 @@ pp.jsxParseAttribute = function() {
|
|||||||
// Parses JSX opening tag starting after "<".
|
// Parses JSX opening tag starting after "<".
|
||||||
|
|
||||||
pp.jsxParseOpeningElementAt = function(startPos, startLoc) {
|
pp.jsxParseOpeningElementAt = function(startPos, startLoc) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.attributes = [];
|
node.attributes = [];
|
||||||
node.name = this.jsxParseElementName();
|
node.name = this.jsxParseElementName();
|
||||||
while (!this.match(tt.slash) && !this.match(tt.jsxTagEnd)) {
|
while (!this.match(tt.slash) && !this.match(tt.jsxTagEnd)) {
|
||||||
@ -324,7 +326,7 @@ pp.jsxParseOpeningElementAt = function(startPos, startLoc) {
|
|||||||
// Parses JSX closing tag starting after "</".
|
// Parses JSX closing tag starting after "</".
|
||||||
|
|
||||||
pp.jsxParseClosingElementAt = function(startPos, startLoc) {
|
pp.jsxParseClosingElementAt = function(startPos, startLoc) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
node.name = this.jsxParseElementName();
|
node.name = this.jsxParseElementName();
|
||||||
this.expect(tt.jsxTagEnd);
|
this.expect(tt.jsxTagEnd);
|
||||||
return this.finishNode(node, "JSXClosingElement");
|
return this.finishNode(node, "JSXClosingElement");
|
||||||
@ -334,9 +336,9 @@ pp.jsxParseClosingElementAt = function(startPos, startLoc) {
|
|||||||
// (starting after "<"), attributes, contents and closing tag.
|
// (starting after "<"), attributes, contents and closing tag.
|
||||||
|
|
||||||
pp.jsxParseElementAt = function(startPos, startLoc) {
|
pp.jsxParseElementAt = function(startPos, startLoc) {
|
||||||
let node = this.startNodeAt(startPos, startLoc);
|
const node = this.startNodeAt(startPos, startLoc);
|
||||||
let children = [];
|
const children = [];
|
||||||
let openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
|
const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
|
||||||
let closingElement = null;
|
let closingElement = null;
|
||||||
|
|
||||||
if (!openingElement.selfClosing) {
|
if (!openingElement.selfClosing) {
|
||||||
@ -391,7 +393,8 @@ pp.jsxParseElementAt = function(startPos, startLoc) {
|
|||||||
// Parses entire JSX element from current position.
|
// Parses entire JSX element from current position.
|
||||||
|
|
||||||
pp.jsxParseElement = function() {
|
pp.jsxParseElement = function() {
|
||||||
let startPos = this.state.start, startLoc = this.state.startLoc;
|
const startPos = this.state.start;
|
||||||
|
const startLoc = this.state.startLoc;
|
||||||
this.next();
|
this.next();
|
||||||
return this.jsxParseElementAt(startPos, startLoc);
|
return this.jsxParseElementAt(startPos, startLoc);
|
||||||
};
|
};
|
||||||
@ -400,7 +403,7 @@ export default function(instance) {
|
|||||||
instance.extend("parseExprAtom", function(inner) {
|
instance.extend("parseExprAtom", function(inner) {
|
||||||
return function(refShortHandDefaultPos) {
|
return function(refShortHandDefaultPos) {
|
||||||
if (this.match(tt.jsxText)) {
|
if (this.match(tt.jsxText)) {
|
||||||
let node = this.parseLiteral(this.state.value, "JSXText");
|
const node = this.parseLiteral(this.state.value, "JSXText");
|
||||||
// https://github.com/babel/babel/issues/2078
|
// https://github.com/babel/babel/issues/2078
|
||||||
node.extra = null;
|
node.extra = null;
|
||||||
return node;
|
return node;
|
||||||
@ -449,7 +452,7 @@ export default function(instance) {
|
|||||||
instance.extend("updateContext", function(inner) {
|
instance.extend("updateContext", function(inner) {
|
||||||
return function(prevType) {
|
return function(prevType) {
|
||||||
if (this.match(tt.braceL)) {
|
if (this.match(tt.braceL)) {
|
||||||
let curContext = this.curContext();
|
const curContext = this.curContext();
|
||||||
if (curContext === tc.j_oTag) {
|
if (curContext === tc.j_oTag) {
|
||||||
this.state.context.push(tc.braceExpression);
|
this.state.context.push(tc.braceExpression);
|
||||||
} else if (curContext === tc.j_expr) {
|
} else if (curContext === tc.j_expr) {
|
||||||
|
|||||||
@ -44,7 +44,7 @@ tt.parenR.updateContext = tt.braceR.updateContext = function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let out = this.state.context.pop();
|
const out = this.state.context.pop();
|
||||||
if (out === types.braceStatement && this.curContext() === types.functionExpression) {
|
if (out === types.braceStatement && this.curContext() === types.functionExpression) {
|
||||||
this.state.context.pop();
|
this.state.context.pop();
|
||||||
this.state.exprAllowed = false;
|
this.state.exprAllowed = false;
|
||||||
@ -76,7 +76,7 @@ tt.dollarBraceL.updateContext = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
tt.parenL.updateContext = function (prevType) {
|
tt.parenL.updateContext = function (prevType) {
|
||||||
let statementParens = prevType === tt._if || prevType === tt._for ||
|
const statementParens = prevType === tt._if || prevType === tt._for ||
|
||||||
prevType === tt._with || prevType === tt._while;
|
prevType === tt._with || prevType === tt._while;
|
||||||
this.state.context.push(statementParens ? types.parenStatement : types.parenExpression);
|
this.state.context.push(statementParens ? types.parenStatement : types.parenExpression);
|
||||||
this.state.exprAllowed = true;
|
this.state.exprAllowed = true;
|
||||||
|
|||||||
@ -86,14 +86,14 @@ export default class Tokenizer {
|
|||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
lookahead() {
|
lookahead() {
|
||||||
let old = this.state;
|
const old = this.state;
|
||||||
this.state = old.clone(true);
|
this.state = old.clone(true);
|
||||||
|
|
||||||
this.isLookahead = true;
|
this.isLookahead = true;
|
||||||
this.next();
|
this.next();
|
||||||
this.isLookahead = false;
|
this.isLookahead = false;
|
||||||
|
|
||||||
let curr = this.state.clone(true);
|
const curr = this.state.clone(true);
|
||||||
this.state = old;
|
this.state = old;
|
||||||
return curr;
|
return curr;
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ export default class Tokenizer {
|
|||||||
// properties.
|
// properties.
|
||||||
|
|
||||||
nextToken() {
|
nextToken() {
|
||||||
let curContext = this.curContext();
|
const curContext = this.curContext();
|
||||||
if (!curContext || !curContext.preserveSpace) this.skipSpace();
|
if (!curContext || !curContext.preserveSpace) this.skipSpace();
|
||||||
|
|
||||||
this.state.containsOctal = false;
|
this.state.containsOctal = false;
|
||||||
@ -147,15 +147,15 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fullCharCodeAtPos() {
|
fullCharCodeAtPos() {
|
||||||
let code = this.input.charCodeAt(this.state.pos);
|
const code = this.input.charCodeAt(this.state.pos);
|
||||||
if (code <= 0xd7ff || code >= 0xe000) return code;
|
if (code <= 0xd7ff || code >= 0xe000) return code;
|
||||||
|
|
||||||
let next = this.input.charCodeAt(this.state.pos + 1);
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||||
return (code << 10) + next - 0x35fdc00;
|
return (code << 10) + next - 0x35fdc00;
|
||||||
}
|
}
|
||||||
|
|
||||||
pushComment(block, text, start, end, startLoc, endLoc) {
|
pushComment(block, text, start, end, startLoc, endLoc) {
|
||||||
let comment = {
|
const comment = {
|
||||||
type: block ? "CommentBlock" : "CommentLine",
|
type: block ? "CommentBlock" : "CommentLine",
|
||||||
value: text,
|
value: text,
|
||||||
start: start,
|
start: start,
|
||||||
@ -171,8 +171,9 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
skipBlockComment() {
|
skipBlockComment() {
|
||||||
let startLoc = this.state.curPosition();
|
const startLoc = this.state.curPosition();
|
||||||
let start = this.state.pos, end = this.input.indexOf("*/", this.state.pos += 2);
|
const start = this.state.pos;
|
||||||
|
const end = this.input.indexOf("*/", this.state.pos += 2);
|
||||||
if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
|
if (end === -1) this.raise(this.state.pos - 2, "Unterminated comment");
|
||||||
|
|
||||||
this.state.pos = end + 2;
|
this.state.pos = end + 2;
|
||||||
@ -187,8 +188,8 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
skipLineComment(startSkip) {
|
skipLineComment(startSkip) {
|
||||||
let start = this.state.pos;
|
const start = this.state.pos;
|
||||||
let startLoc = this.state.curPosition();
|
const startLoc = this.state.curPosition();
|
||||||
let ch = this.input.charCodeAt(this.state.pos += startSkip);
|
let ch = this.input.charCodeAt(this.state.pos += startSkip);
|
||||||
while (this.state.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
|
while (this.state.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
|
||||||
++this.state.pos;
|
++this.state.pos;
|
||||||
@ -203,7 +204,7 @@ export default class Tokenizer {
|
|||||||
|
|
||||||
skipSpace() {
|
skipSpace() {
|
||||||
loop: while (this.state.pos < this.input.length) {
|
loop: while (this.state.pos < this.input.length) {
|
||||||
let ch = this.input.charCodeAt(this.state.pos);
|
const ch = this.input.charCodeAt(this.state.pos);
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 32: case 160: // ' '
|
case 32: case 160: // ' '
|
||||||
++this.state.pos;
|
++this.state.pos;
|
||||||
@ -253,7 +254,7 @@ export default class Tokenizer {
|
|||||||
finishToken(type, val) {
|
finishToken(type, val) {
|
||||||
this.state.end = this.state.pos;
|
this.state.end = this.state.pos;
|
||||||
this.state.endLoc = this.state.curPosition();
|
this.state.endLoc = this.state.curPosition();
|
||||||
let prevType = this.state.type;
|
const prevType = this.state.type;
|
||||||
this.state.type = type;
|
this.state.type = type;
|
||||||
this.state.value = val;
|
this.state.value = val;
|
||||||
|
|
||||||
@ -270,12 +271,12 @@ export default class Tokenizer {
|
|||||||
// All in the name of speed.
|
// All in the name of speed.
|
||||||
//
|
//
|
||||||
readToken_dot() {
|
readToken_dot() {
|
||||||
let next = this.input.charCodeAt(this.state.pos + 1);
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||||
if (next >= 48 && next <= 57) {
|
if (next >= 48 && next <= 57) {
|
||||||
return this.readNumber(true);
|
return this.readNumber(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
let next2 = this.input.charCodeAt(this.state.pos + 2);
|
const next2 = this.input.charCodeAt(this.state.pos + 2);
|
||||||
if (next === 46 && next2 === 46) { // 46 = dot '.'
|
if (next === 46 && next2 === 46) { // 46 = dot '.'
|
||||||
this.state.pos += 3;
|
this.state.pos += 3;
|
||||||
return this.finishToken(tt.ellipsis);
|
return this.finishToken(tt.ellipsis);
|
||||||
@ -291,7 +292,7 @@ export default class Tokenizer {
|
|||||||
return this.readRegexp();
|
return this.readRegexp();
|
||||||
}
|
}
|
||||||
|
|
||||||
let next = this.input.charCodeAt(this.state.pos + 1);
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||||
if (next === 61) {
|
if (next === 61) {
|
||||||
return this.finishOp(tt.assign, 2);
|
return this.finishOp(tt.assign, 2);
|
||||||
} else {
|
} else {
|
||||||
@ -319,7 +320,7 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readToken_pipe_amp(code) { // '|&'
|
readToken_pipe_amp(code) { // '|&'
|
||||||
let next = this.input.charCodeAt(this.state.pos + 1);
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||||
if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2);
|
if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2);
|
||||||
if (next === 61) return this.finishOp(tt.assign, 2);
|
if (next === 61) return this.finishOp(tt.assign, 2);
|
||||||
if (code === 124 && next === 125 && this.hasPlugin("flow")) return this.finishOp(tt.braceBarR, 2);
|
if (code === 124 && next === 125 && this.hasPlugin("flow")) return this.finishOp(tt.braceBarR, 2);
|
||||||
@ -327,7 +328,7 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readToken_caret() { // '^'
|
readToken_caret() { // '^'
|
||||||
let next = this.input.charCodeAt(this.state.pos + 1);
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||||
if (next === 61) {
|
if (next === 61) {
|
||||||
return this.finishOp(tt.assign, 2);
|
return this.finishOp(tt.assign, 2);
|
||||||
} else {
|
} else {
|
||||||
@ -336,7 +337,7 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readToken_plus_min(code) { // '+-'
|
readToken_plus_min(code) { // '+-'
|
||||||
let next = this.input.charCodeAt(this.state.pos + 1);
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||||
|
|
||||||
if (next === code) {
|
if (next === code) {
|
||||||
if (next === 45 && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) {
|
if (next === 45 && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) {
|
||||||
@ -356,7 +357,7 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readToken_lt_gt(code) { // '<>'
|
readToken_lt_gt(code) { // '<>'
|
||||||
let next = this.input.charCodeAt(this.state.pos + 1);
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||||
let size = 1;
|
let size = 1;
|
||||||
|
|
||||||
if (next === code) {
|
if (next === code) {
|
||||||
@ -382,7 +383,7 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
readToken_eq_excl(code) { // '=!'
|
readToken_eq_excl(code) { // '=!'
|
||||||
let next = this.input.charCodeAt(this.state.pos + 1);
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||||
if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
|
if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
|
||||||
if (code === 61 && next === 62) { // '=>'
|
if (code === 61 && next === 62) { // '=>'
|
||||||
this.state.pos += 2;
|
this.state.pos += 2;
|
||||||
@ -433,7 +434,7 @@ export default class Tokenizer {
|
|||||||
return this.finishToken(tt.backQuote);
|
return this.finishToken(tt.backQuote);
|
||||||
|
|
||||||
case 48: // '0'
|
case 48: // '0'
|
||||||
let next = this.input.charCodeAt(this.state.pos + 1);
|
const next = this.input.charCodeAt(this.state.pos + 1);
|
||||||
if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number
|
if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number
|
||||||
if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number
|
if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number
|
||||||
if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
|
if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
|
||||||
@ -480,16 +481,17 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
finishOp(type, size) {
|
finishOp(type, size) {
|
||||||
let str = this.input.slice(this.state.pos, this.state.pos + size);
|
const str = this.input.slice(this.state.pos, this.state.pos + size);
|
||||||
this.state.pos += size;
|
this.state.pos += size;
|
||||||
return this.finishToken(type, str);
|
return this.finishToken(type, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
readRegexp() {
|
readRegexp() {
|
||||||
let escaped, inClass, start = this.state.pos;
|
const start = this.state.pos;
|
||||||
|
let escaped, inClass;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (this.state.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
|
if (this.state.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
|
||||||
let ch = this.input.charAt(this.state.pos);
|
const ch = this.input.charAt(this.state.pos);
|
||||||
if (lineBreak.test(ch)) {
|
if (lineBreak.test(ch)) {
|
||||||
this.raise(start, "Unterminated regular expression");
|
this.raise(start, "Unterminated regular expression");
|
||||||
}
|
}
|
||||||
@ -507,13 +509,13 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
++this.state.pos;
|
++this.state.pos;
|
||||||
}
|
}
|
||||||
let content = this.input.slice(start, this.state.pos);
|
const content = this.input.slice(start, this.state.pos);
|
||||||
++this.state.pos;
|
++this.state.pos;
|
||||||
// Need to use `readWord1` because '\uXXXX' sequences are allowed
|
// Need to use `readWord1` because '\uXXXX' sequences are allowed
|
||||||
// here (don't ask).
|
// here (don't ask).
|
||||||
let mods = this.readWord1();
|
const mods = this.readWord1();
|
||||||
if (mods) {
|
if (mods) {
|
||||||
let validFlags = /^[gmsiyu]*$/;
|
const validFlags = /^[gmsiyu]*$/;
|
||||||
if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
|
if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
|
||||||
}
|
}
|
||||||
return this.finishToken(tt.regexp, {
|
return this.finishToken(tt.regexp, {
|
||||||
@ -527,9 +529,12 @@ export default class Tokenizer {
|
|||||||
// will return `null` unless the integer has exactly `len` digits.
|
// will return `null` unless the integer has exactly `len` digits.
|
||||||
|
|
||||||
readInt(radix, len) {
|
readInt(radix, len) {
|
||||||
let start = this.state.pos, total = 0;
|
const start = this.state.pos;
|
||||||
|
let total = 0;
|
||||||
|
|
||||||
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
|
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
|
||||||
let code = this.input.charCodeAt(this.state.pos), val;
|
const code = this.input.charCodeAt(this.state.pos);
|
||||||
|
let val;
|
||||||
if (code >= 97) {
|
if (code >= 97) {
|
||||||
val = code - 97 + 10; // a
|
val = code - 97 + 10; // a
|
||||||
} else if (code >= 65) {
|
} else if (code >= 65) {
|
||||||
@ -550,7 +555,7 @@ export default class Tokenizer {
|
|||||||
|
|
||||||
readRadixNumber(radix) {
|
readRadixNumber(radix) {
|
||||||
this.state.pos += 2; // 0x
|
this.state.pos += 2; // 0x
|
||||||
let val = this.readInt(radix);
|
const val = this.readInt(radix);
|
||||||
if (val == null) this.raise(this.state.start + 2, "Expected number in radix " + radix);
|
if (val == null) this.raise(this.state.start + 2, "Expected number in radix " + radix);
|
||||||
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
|
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
|
||||||
return this.finishToken(tt.num, val);
|
return this.finishToken(tt.num, val);
|
||||||
@ -559,7 +564,10 @@ export default class Tokenizer {
|
|||||||
// Read an integer, octal integer, or floating-point number.
|
// Read an integer, octal integer, or floating-point number.
|
||||||
|
|
||||||
readNumber(startsWithDot) {
|
readNumber(startsWithDot) {
|
||||||
let start = this.state.pos, isFloat = false, octal = this.input.charCodeAt(this.state.pos) === 48;
|
const start = this.state.pos;
|
||||||
|
const octal = this.input.charCodeAt(this.state.pos) === 48;
|
||||||
|
let isFloat = false;
|
||||||
|
|
||||||
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
|
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
|
||||||
let next = this.input.charCodeAt(this.state.pos);
|
let next = this.input.charCodeAt(this.state.pos);
|
||||||
if (next === 46) { // '.'
|
if (next === 46) { // '.'
|
||||||
@ -576,7 +584,8 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
|
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.state.pos, "Identifier directly after number");
|
||||||
|
|
||||||
let str = this.input.slice(start, this.state.pos), val;
|
const str = this.input.slice(start, this.state.pos);
|
||||||
|
let val;
|
||||||
if (isFloat) {
|
if (isFloat) {
|
||||||
val = parseFloat(str);
|
val = parseFloat(str);
|
||||||
} else if (!octal || str.length === 1) {
|
} else if (!octal || str.length === 1) {
|
||||||
@ -592,10 +601,11 @@ export default class Tokenizer {
|
|||||||
// Read a string value, interpreting backslash-escapes.
|
// Read a string value, interpreting backslash-escapes.
|
||||||
|
|
||||||
readCodePoint() {
|
readCodePoint() {
|
||||||
let ch = this.input.charCodeAt(this.state.pos), code;
|
const ch = this.input.charCodeAt(this.state.pos);
|
||||||
|
let code;
|
||||||
|
|
||||||
if (ch === 123) {
|
if (ch === 123) {
|
||||||
let codePos = ++this.state.pos;
|
const codePos = ++this.state.pos;
|
||||||
code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos);
|
code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos);
|
||||||
++this.state.pos;
|
++this.state.pos;
|
||||||
if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds");
|
if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds");
|
||||||
@ -609,7 +619,7 @@ export default class Tokenizer {
|
|||||||
let out = "", chunkStart = ++this.state.pos;
|
let out = "", chunkStart = ++this.state.pos;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated string constant");
|
if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated string constant");
|
||||||
let ch = this.input.charCodeAt(this.state.pos);
|
const ch = this.input.charCodeAt(this.state.pos);
|
||||||
if (ch === quote) break;
|
if (ch === quote) break;
|
||||||
if (ch === 92) { // '\'
|
if (ch === 92) { // '\'
|
||||||
out += this.input.slice(chunkStart, this.state.pos);
|
out += this.input.slice(chunkStart, this.state.pos);
|
||||||
@ -630,7 +640,7 @@ export default class Tokenizer {
|
|||||||
let out = "", chunkStart = this.state.pos;
|
let out = "", chunkStart = this.state.pos;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated template");
|
if (this.state.pos >= this.input.length) this.raise(this.state.start, "Unterminated template");
|
||||||
let ch = this.input.charCodeAt(this.state.pos);
|
const ch = this.input.charCodeAt(this.state.pos);
|
||||||
if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { // '`', '${'
|
if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { // '`', '${'
|
||||||
if (this.state.pos === this.state.start && this.match(tt.template)) {
|
if (this.state.pos === this.state.start && this.match(tt.template)) {
|
||||||
if (ch === 36) {
|
if (ch === 36) {
|
||||||
@ -673,7 +683,7 @@ export default class Tokenizer {
|
|||||||
// Used to read escaped characters
|
// Used to read escaped characters
|
||||||
|
|
||||||
readEscapedChar(inTemplate) {
|
readEscapedChar(inTemplate) {
|
||||||
let ch = this.input.charCodeAt(++this.state.pos);
|
const ch = this.input.charCodeAt(++this.state.pos);
|
||||||
++this.state.pos;
|
++this.state.pos;
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 110: return "\n"; // 'n' -> '\n'
|
case 110: return "\n"; // 'n' -> '\n'
|
||||||
@ -716,8 +726,8 @@ export default class Tokenizer {
|
|||||||
// Used to read character escape sequences ('\x', '\u', '\U').
|
// Used to read character escape sequences ('\x', '\u', '\U').
|
||||||
|
|
||||||
readHexChar(len) {
|
readHexChar(len) {
|
||||||
let codePos = this.state.pos;
|
const codePos = this.state.pos;
|
||||||
let n = this.readInt(16, len);
|
const n = this.readInt(16, len);
|
||||||
if (n === null) this.raise(codePos, "Bad character escape sequence");
|
if (n === null) this.raise(codePos, "Bad character escape sequence");
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
@ -732,21 +742,21 @@ export default class Tokenizer {
|
|||||||
this.state.containsEsc = false;
|
this.state.containsEsc = false;
|
||||||
let word = "", first = true, chunkStart = this.state.pos;
|
let word = "", first = true, chunkStart = this.state.pos;
|
||||||
while (this.state.pos < this.input.length) {
|
while (this.state.pos < this.input.length) {
|
||||||
let ch = this.fullCharCodeAtPos();
|
const ch = this.fullCharCodeAtPos();
|
||||||
if (isIdentifierChar(ch)) {
|
if (isIdentifierChar(ch)) {
|
||||||
this.state.pos += ch <= 0xffff ? 1 : 2;
|
this.state.pos += ch <= 0xffff ? 1 : 2;
|
||||||
} else if (ch === 92) { // "\"
|
} else if (ch === 92) { // "\"
|
||||||
this.state.containsEsc = true;
|
this.state.containsEsc = true;
|
||||||
|
|
||||||
word += this.input.slice(chunkStart, this.state.pos);
|
word += this.input.slice(chunkStart, this.state.pos);
|
||||||
let escStart = this.state.pos;
|
const escStart = this.state.pos;
|
||||||
|
|
||||||
if (this.input.charCodeAt(++this.state.pos) !== 117) { // "u"
|
if (this.input.charCodeAt(++this.state.pos) !== 117) { // "u"
|
||||||
this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX");
|
this.raise(this.state.pos, "Expecting Unicode escape sequence \\uXXXX");
|
||||||
}
|
}
|
||||||
|
|
||||||
++this.state.pos;
|
++this.state.pos;
|
||||||
let esc = this.readCodePoint();
|
const esc = this.readCodePoint();
|
||||||
if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) {
|
if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) {
|
||||||
this.raise(escStart, "Invalid Unicode escape");
|
this.raise(escStart, "Invalid Unicode escape");
|
||||||
}
|
}
|
||||||
@ -765,7 +775,7 @@ export default class Tokenizer {
|
|||||||
// words when necessary.
|
// words when necessary.
|
||||||
|
|
||||||
readWord() {
|
readWord() {
|
||||||
let word = this.readWord1();
|
const word = this.readWord1();
|
||||||
let type = tt.name;
|
let type = tt.name;
|
||||||
if (!this.state.containsEsc && this.isKeyword(word)) {
|
if (!this.state.containsEsc && this.isKeyword(word)) {
|
||||||
type = keywordTypes[word];
|
type = keywordTypes[word];
|
||||||
@ -775,7 +785,7 @@ export default class Tokenizer {
|
|||||||
|
|
||||||
braceIsBlock(prevType) {
|
braceIsBlock(prevType) {
|
||||||
if (prevType === tt.colon) {
|
if (prevType === tt.colon) {
|
||||||
let parent = this.curContext();
|
const parent = this.curContext();
|
||||||
if (parent === ct.braceStatement || parent === ct.braceExpression) {
|
if (parent === ct.braceStatement || parent === ct.braceExpression) {
|
||||||
return !parent.isExpr;
|
return !parent.isExpr;
|
||||||
}
|
}
|
||||||
@ -797,7 +807,9 @@ export default class Tokenizer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateContext(prevType) {
|
updateContext(prevType) {
|
||||||
let update, type = this.state.type;
|
const type = this.state.type;
|
||||||
|
let update;
|
||||||
|
|
||||||
if (type.keyword && prevType === tt.dot) {
|
if (type.keyword && prevType === tt.dot) {
|
||||||
this.state.exprAllowed = false;
|
this.state.exprAllowed = false;
|
||||||
} else if (update = type.updateContext) {
|
} else if (update = type.updateContext) {
|
||||||
|
|||||||
@ -140,8 +140,8 @@ export default class State {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clone(skipArrays?) {
|
clone(skipArrays?) {
|
||||||
let state = new State;
|
const state = new State;
|
||||||
for (let key in this) {
|
for (const key in this) {
|
||||||
let val = this[key];
|
let val = this[key];
|
||||||
|
|
||||||
if ((!skipArrays || key === "context") && Array.isArray(val)) {
|
if ((!skipArrays || key === "context") && Array.isArray(val)) {
|
||||||
|
|||||||
@ -16,6 +16,13 @@
|
|||||||
// to know when parsing a label, in order to allow or disallow
|
// to know when parsing a label, in order to allow or disallow
|
||||||
// continue jumps to that label.
|
// continue jumps to that label.
|
||||||
|
|
||||||
|
const beforeExpr = true;
|
||||||
|
const startsExpr = true;
|
||||||
|
const isLoop = true;
|
||||||
|
const isAssign = true;
|
||||||
|
const prefix = true;
|
||||||
|
const postfix = true;
|
||||||
|
|
||||||
export class TokenType {
|
export class TokenType {
|
||||||
constructor(label, conf = {}) {
|
constructor(label, conf = {}) {
|
||||||
this.label = label;
|
this.label = label;
|
||||||
@ -32,38 +39,47 @@ export class TokenType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function binop(name, prec) {
|
class KeywordTokenType extends TokenType {
|
||||||
return new TokenType(name, {beforeExpr: true, binop: prec});
|
constructor(name, options = {}) {
|
||||||
|
options.keyword = name;
|
||||||
|
|
||||||
|
super(name, options);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class BinopTokenType extends TokenType {
|
||||||
|
constructor(name, prec) {
|
||||||
|
super(name, { beforeExpr, binop: prec });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true};
|
|
||||||
|
|
||||||
export const types = {
|
export const types = {
|
||||||
num: new TokenType("num", startsExpr),
|
num: new TokenType("num", { startsExpr }),
|
||||||
regexp: new TokenType("regexp", startsExpr),
|
regexp: new TokenType("regexp", { startsExpr }),
|
||||||
string: new TokenType("string", startsExpr),
|
string: new TokenType("string", { startsExpr }),
|
||||||
name: new TokenType("name", startsExpr),
|
name: new TokenType("name", { startsExpr }),
|
||||||
eof: new TokenType("eof"),
|
eof: new TokenType("eof"),
|
||||||
|
|
||||||
// Punctuation token types.
|
// Punctuation token types.
|
||||||
bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
|
bracketL: new TokenType("[", { beforeExpr, startsExpr }),
|
||||||
bracketR: new TokenType("]"),
|
bracketR: new TokenType("]"),
|
||||||
braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
|
braceL: new TokenType("{", { beforeExpr, startsExpr }),
|
||||||
braceBarL: new TokenType("{|", {beforeExpr: true, startsExpr: true}),
|
braceBarL: new TokenType("{|", { beforeExpr, startsExpr }),
|
||||||
braceR: new TokenType("}"),
|
braceR: new TokenType("}"),
|
||||||
braceBarR: new TokenType("|}"),
|
braceBarR: new TokenType("|}"),
|
||||||
parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
|
parenL: new TokenType("(", { beforeExpr, startsExpr }),
|
||||||
parenR: new TokenType(")"),
|
parenR: new TokenType(")"),
|
||||||
comma: new TokenType(",", beforeExpr),
|
comma: new TokenType(",", { beforeExpr }),
|
||||||
semi: new TokenType(";", beforeExpr),
|
semi: new TokenType(";", { beforeExpr }),
|
||||||
colon: new TokenType(":", beforeExpr),
|
colon: new TokenType(":", { beforeExpr }),
|
||||||
doubleColon: new TokenType("::", beforeExpr),
|
doubleColon: new TokenType("::", { beforeExpr }),
|
||||||
dot: new TokenType("."),
|
dot: new TokenType("."),
|
||||||
question: new TokenType("?", beforeExpr),
|
question: new TokenType("?", { beforeExpr }),
|
||||||
arrow: new TokenType("=>", beforeExpr),
|
arrow: new TokenType("=>", { beforeExpr }),
|
||||||
template: new TokenType("template"),
|
template: new TokenType("template"),
|
||||||
ellipsis: new TokenType("...", beforeExpr),
|
ellipsis: new TokenType("...", { beforeExpr }),
|
||||||
backQuote: new TokenType("`", startsExpr),
|
backQuote: new TokenType("`", { startsExpr }),
|
||||||
dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
|
dollarBraceL: new TokenType("${", { beforeExpr, startsExpr }),
|
||||||
at: new TokenType("@"),
|
at: new TokenType("@"),
|
||||||
|
|
||||||
// Operators. These carry several kinds of properties to help the
|
// Operators. These carry several kinds of properties to help the
|
||||||
@ -80,69 +96,66 @@ export const types = {
|
|||||||
// binary operators with a very low precedence, that should result
|
// binary operators with a very low precedence, that should result
|
||||||
// in AssignmentExpression nodes.
|
// in AssignmentExpression nodes.
|
||||||
|
|
||||||
eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
|
eq: new TokenType("=", { beforeExpr, isAssign }),
|
||||||
assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
|
assign: new TokenType("_=", { beforeExpr, isAssign }),
|
||||||
incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
|
incDec: new TokenType("++/--", { prefix, postfix, startsExpr }),
|
||||||
prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
|
prefix: new TokenType("prefix", { beforeExpr, prefix, startsExpr }),
|
||||||
logicalOR: binop("||", 1),
|
logicalOR: new BinopTokenType("||", 1),
|
||||||
logicalAND: binop("&&", 2),
|
logicalAND: new BinopTokenType("&&", 2),
|
||||||
bitwiseOR: binop("|", 3),
|
bitwiseOR: new BinopTokenType("|", 3),
|
||||||
bitwiseXOR: binop("^", 4),
|
bitwiseXOR: new BinopTokenType("^", 4),
|
||||||
bitwiseAND: binop("&", 5),
|
bitwiseAND: new BinopTokenType("&", 5),
|
||||||
equality: binop("==/!=", 6),
|
equality: new BinopTokenType("==/!=", 6),
|
||||||
relational: binop("</>", 7),
|
relational: new BinopTokenType("</>", 7),
|
||||||
bitShift: binop("<</>>", 8),
|
bitShift: new BinopTokenType("<</>>", 8),
|
||||||
plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
|
plusMin: new TokenType("+/-", { beforeExpr, binop: 9, prefix, startsExpr }),
|
||||||
modulo: binop("%", 10),
|
modulo: new BinopTokenType("%", 10),
|
||||||
star: binop("*", 10),
|
star: new BinopTokenType("*", 10),
|
||||||
slash: binop("/", 10),
|
slash: new BinopTokenType("/", 10),
|
||||||
exponent: new TokenType("**", {beforeExpr: true, binop: 11, rightAssociative: true})
|
exponent: new TokenType("**", { beforeExpr, binop: 11, rightAssociative: true })
|
||||||
|
};
|
||||||
|
|
||||||
|
export const keywords = {
|
||||||
|
"break": new KeywordTokenType("break"),
|
||||||
|
"case": new KeywordTokenType("case", { beforeExpr }),
|
||||||
|
"catch": new KeywordTokenType("catch"),
|
||||||
|
"continue": new KeywordTokenType("continue"),
|
||||||
|
"debugger": new KeywordTokenType("debugger"),
|
||||||
|
"default": new KeywordTokenType("default", { beforeExpr }),
|
||||||
|
"do": new KeywordTokenType("do", { isLoop, beforeExpr }),
|
||||||
|
"else": new KeywordTokenType("else", { beforeExpr }),
|
||||||
|
"finally": new KeywordTokenType("finally"),
|
||||||
|
"for": new KeywordTokenType("for", { isLoop }),
|
||||||
|
"function": new KeywordTokenType("function", { startsExpr }),
|
||||||
|
"if": new KeywordTokenType("if"),
|
||||||
|
"return": new KeywordTokenType("return", { beforeExpr }),
|
||||||
|
"switch": new KeywordTokenType("switch"),
|
||||||
|
"throw": new KeywordTokenType("throw", { beforeExpr }),
|
||||||
|
"try": new KeywordTokenType("try"),
|
||||||
|
"var": new KeywordTokenType("var"),
|
||||||
|
"let": new KeywordTokenType("let"),
|
||||||
|
"const": new KeywordTokenType("const"),
|
||||||
|
"while": new KeywordTokenType("while", { isLoop }),
|
||||||
|
"with": new KeywordTokenType("with"),
|
||||||
|
"new": new KeywordTokenType("new", { beforeExpr, startsExpr }),
|
||||||
|
"this": new KeywordTokenType("this", { startsExpr }),
|
||||||
|
"super": new KeywordTokenType("super", { startsExpr }),
|
||||||
|
"class": new KeywordTokenType("class"),
|
||||||
|
"extends": new KeywordTokenType("extends", { beforeExpr }),
|
||||||
|
"export": new KeywordTokenType("export"),
|
||||||
|
"import": new KeywordTokenType("import"),
|
||||||
|
"yield": new KeywordTokenType("yield", { beforeExpr, startsExpr }),
|
||||||
|
"null": new KeywordTokenType("null", { startsExpr }),
|
||||||
|
"true": new KeywordTokenType("true", { startsExpr }),
|
||||||
|
"false": new KeywordTokenType("false", { startsExpr }),
|
||||||
|
"in": new KeywordTokenType("in", { beforeExpr, binop: 7 }),
|
||||||
|
"instanceof": new KeywordTokenType("instanceof", { beforeExpr, binop: 7 }),
|
||||||
|
"typeof": new KeywordTokenType("typeof", { beforeExpr, prefix, startsExpr }),
|
||||||
|
"void": new KeywordTokenType("void", { beforeExpr, prefix, startsExpr }),
|
||||||
|
"delete": new KeywordTokenType("delete", { beforeExpr, prefix, startsExpr })
|
||||||
};
|
};
|
||||||
|
|
||||||
// Map keyword names to token types.
|
// Map keyword names to token types.
|
||||||
|
Object.keys(keywords).forEach((name) => {
|
||||||
export const keywords = {};
|
types["_" + name] = keywords[name];
|
||||||
|
});
|
||||||
// Succinct definitions of keyword token types
|
|
||||||
function kw(name, options = {}) {
|
|
||||||
options.keyword = name;
|
|
||||||
keywords[name] = types["_" + name] = new TokenType(name, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
kw("break");
|
|
||||||
kw("case", beforeExpr);
|
|
||||||
kw("catch");
|
|
||||||
kw("continue");
|
|
||||||
kw("debugger");
|
|
||||||
kw("default", beforeExpr);
|
|
||||||
kw("do", {isLoop: true, beforeExpr: true});
|
|
||||||
kw("else", beforeExpr);
|
|
||||||
kw("finally");
|
|
||||||
kw("for", {isLoop: true});
|
|
||||||
kw("function", startsExpr);
|
|
||||||
kw("if");
|
|
||||||
kw("return", beforeExpr);
|
|
||||||
kw("switch");
|
|
||||||
kw("throw", beforeExpr);
|
|
||||||
kw("try");
|
|
||||||
kw("var");
|
|
||||||
kw("let");
|
|
||||||
kw("const");
|
|
||||||
kw("while", {isLoop: true});
|
|
||||||
kw("with");
|
|
||||||
kw("new", {beforeExpr: true, startsExpr: true});
|
|
||||||
kw("this", startsExpr);
|
|
||||||
kw("super", startsExpr);
|
|
||||||
kw("class");
|
|
||||||
kw("extends", beforeExpr);
|
|
||||||
kw("export");
|
|
||||||
kw("import");
|
|
||||||
kw("yield", {beforeExpr: true, startsExpr: true});
|
|
||||||
kw("null", startsExpr);
|
|
||||||
kw("true", startsExpr);
|
|
||||||
kw("false", startsExpr);
|
|
||||||
kw("in", {beforeExpr: true, binop: 7});
|
|
||||||
kw("instanceof", {beforeExpr: true, binop: 7});
|
|
||||||
kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true});
|
|
||||||
kw("void", {beforeExpr: true, prefix: true, startsExpr: true});
|
|
||||||
kw("delete", {beforeExpr: true, prefix: true, startsExpr: true});
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export class SourceLocation {
|
|||||||
export function getLineInfo(input, offset) {
|
export function getLineInfo(input, offset) {
|
||||||
for (let line = 1, cur = 0; ;) {
|
for (let line = 1, cur = 0; ;) {
|
||||||
lineBreakG.lastIndex = cur;
|
lineBreakG.lastIndex = cur;
|
||||||
let match = lineBreakG.exec(input);
|
const match = lineBreakG.exec(input);
|
||||||
if (match && match.index < offset) {
|
if (match && match.index < offset) {
|
||||||
++line;
|
++line;
|
||||||
cur = match.index + match[0].length;
|
cur = match.index + match[0].length;
|
||||||
|
|||||||
@ -1,97 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 8,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 8,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 8,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "BinaryExpression",
|
|
||||||
"start": 0,
|
|
||||||
"end": 7,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 7
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"left": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 0,
|
|
||||||
"end": 1,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"operator": "<==",
|
|
||||||
"right": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 6,
|
|
||||||
"end": 7,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 6
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 7
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
186
test/fixtures/core/uncategorised/466/expected.json
vendored
186
test/fixtures/core/uncategorised/466/expected.json
vendored
@ -1,186 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "CallExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 42,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"callee": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 13,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 29,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "UnaryExpression",
|
|
||||||
"start": 29,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "delete",
|
|
||||||
"prefix": true,
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 36,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "i"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 15,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 15,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"arguments": [],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
184
test/fixtures/core/uncategorised/467/expected.json
vendored
184
test/fixtures/core/uncategorised/467/expected.json
vendored
@ -1,184 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "CallExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 42,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"callee": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 13,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "WithStatement",
|
|
||||||
"start": 29,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"object": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 35,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "i"
|
|
||||||
},
|
|
||||||
"body": {
|
|
||||||
"type": "EmptyStatement",
|
|
||||||
"start": 37,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 15,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 15,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"arguments": [],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
186
test/fixtures/core/uncategorised/468/expected.json
vendored
186
test/fixtures/core/uncategorised/468/expected.json
vendored
@ -1,186 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 32,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 36,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 36,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
"init": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 43,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 10,
|
|
||||||
"rawValue": 10,
|
|
||||||
"raw": "10"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
186
test/fixtures/core/uncategorised/469/expected.json
vendored
186
test/fixtures/core/uncategorised/469/expected.json
vendored
@ -1,186 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 32,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 36,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 36,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
},
|
|
||||||
"init": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 48,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 10,
|
|
||||||
"rawValue": 10,
|
|
||||||
"raw": "10"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
201
test/fixtures/core/uncategorised/470/expected.json
vendored
201
test/fixtures/core/uncategorised/470/expected.json
vendored
@ -1,201 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "TryStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"block": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 36,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
},
|
|
||||||
"handler": {
|
|
||||||
"type": "CatchClause",
|
|
||||||
"start": 40,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"param": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 47,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 53,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"guardedHandlers": [],
|
|
||||||
"finalizer": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
201
test/fixtures/core/uncategorised/471/expected.json
vendored
201
test/fixtures/core/uncategorised/471/expected.json
vendored
@ -1,201 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "TryStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 61,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 61
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"block": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 36,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
},
|
|
||||||
"handler": {
|
|
||||||
"type": "CatchClause",
|
|
||||||
"start": 40,
|
|
||||||
"end": 61,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 61
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"param": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 47,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
},
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 58,
|
|
||||||
"end": 61,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 61
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"guardedHandlers": [],
|
|
||||||
"finalizer": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
184
test/fixtures/core/uncategorised/472/expected.json
vendored
184
test/fixtures/core/uncategorised/472/expected.json
vendored
@ -1,184 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 42,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "AssignmentExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "=",
|
|
||||||
"left": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 32,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
"right": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 39,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 10,
|
|
||||||
"rawValue": 10,
|
|
||||||
"raw": "10"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
184
test/fixtures/core/uncategorised/473/expected.json
vendored
184
test/fixtures/core/uncategorised/473/expected.json
vendored
@ -1,184 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "AssignmentExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "=",
|
|
||||||
"left": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 32,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
},
|
|
||||||
"right": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 44,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 10,
|
|
||||||
"rawValue": 10,
|
|
||||||
"raw": "10"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
167
test/fixtures/core/uncategorised/474/expected.json
vendored
167
test/fixtures/core/uncategorised/474/expected.json
vendored
@ -1,167 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "UpdateExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "++",
|
|
||||||
"prefix": true,
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 34,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
167
test/fixtures/core/uncategorised/475/expected.json
vendored
167
test/fixtures/core/uncategorised/475/expected.json
vendored
@ -1,167 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "UpdateExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "--",
|
|
||||||
"prefix": true,
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 34,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
167
test/fixtures/core/uncategorised/476/expected.json
vendored
167
test/fixtures/core/uncategorised/476/expected.json
vendored
@ -1,167 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "UpdateExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "++",
|
|
||||||
"prefix": true,
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 34,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
167
test/fixtures/core/uncategorised/477/expected.json
vendored
167
test/fixtures/core/uncategorised/477/expected.json
vendored
@ -1,167 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "UpdateExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "--",
|
|
||||||
"prefix": true,
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 34,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
167
test/fixtures/core/uncategorised/478/expected.json
vendored
167
test/fixtures/core/uncategorised/478/expected.json
vendored
@ -1,167 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "UpdateExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "++",
|
|
||||||
"prefix": false,
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 32,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
167
test/fixtures/core/uncategorised/479/expected.json
vendored
167
test/fixtures/core/uncategorised/479/expected.json
vendored
@ -1,167 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "UpdateExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "--",
|
|
||||||
"prefix": false,
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 32,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
167
test/fixtures/core/uncategorised/480/expected.json
vendored
167
test/fixtures/core/uncategorised/480/expected.json
vendored
@ -1,167 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "UpdateExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "++",
|
|
||||||
"prefix": false,
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 32,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
167
test/fixtures/core/uncategorised/481/expected.json
vendored
167
test/fixtures/core/uncategorised/481/expected.json
vendored
@ -1,167 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "UpdateExpression",
|
|
||||||
"start": 32,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "--",
|
|
||||||
"prefix": false,
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 32,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
170
test/fixtures/core/uncategorised/482/expected.json
vendored
170
test/fixtures/core/uncategorised/482/expected.json
vendored
@ -1,170 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 32,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 41,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 48,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
170
test/fixtures/core/uncategorised/483/expected.json
vendored
170
test/fixtures/core/uncategorised/483/expected.json
vendored
@ -1,170 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 32,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 41,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 53,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
117
test/fixtures/core/uncategorised/484/expected.json
vendored
117
test/fixtures/core/uncategorised/484/expected.json
vendored
@ -1,117 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 16,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 17,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "'use strict'"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
117
test/fixtures/core/uncategorised/485/expected.json
vendored
117
test/fixtures/core/uncategorised/485/expected.json
vendored
@ -1,117 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 18,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 21,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 22,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 22,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "'use strict'"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
204
test/fixtures/core/uncategorised/486/expected.json
vendored
204
test/fixtures/core/uncategorised/486/expected.json
vendored
@ -1,204 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 55,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 55
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "CallExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"callee": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 42,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 49,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"arguments": [],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
204
test/fixtures/core/uncategorised/487/expected.json
vendored
204
test/fixtures/core/uncategorised/487/expected.json
vendored
@ -1,204 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 62,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 62
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 62,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 62
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 62,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 62
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 62,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 62
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 60,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 60
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "CallExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 59,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 59
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"callee": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 42,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 54,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"arguments": [],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
149
test/fixtures/core/uncategorised/488/expected.json
vendored
149
test/fixtures/core/uncategorised/488/expected.json
vendored
@ -1,149 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "CallExpression",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"callee": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 10,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "'use strict'"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
},
|
|
||||||
"arguments": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
149
test/fixtures/core/uncategorised/489/expected.json
vendored
149
test/fixtures/core/uncategorised/489/expected.json
vendored
@ -1,149 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "CallExpression",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"callee": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 10,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 22,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 23,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 23,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "'use strict'"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
},
|
|
||||||
"arguments": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
240
test/fixtures/core/uncategorised/490/expected.json
vendored
240
test/fixtures/core/uncategorised/490/expected.json
vendored
@ -1,240 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 61,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 61
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 59,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 59
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 35,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 35,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "s"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 38,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 47,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 54,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
149
test/fixtures/core/uncategorised/491/expected.json
vendored
149
test/fixtures/core/uncategorised/491/expected.json
vendored
@ -1,149 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "CallExpression",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"callee": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 10,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "package"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 20,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 21,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 21,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "'use strict'"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
},
|
|
||||||
"arguments": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
295
test/fixtures/core/uncategorised/492/expected.json
vendored
295
test/fixtures/core/uncategorised/492/expected.json
vendored
@ -1,295 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 61,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 61
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 59,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 59
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 35,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 35,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "i"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 38,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 10,
|
|
||||||
"rawValue": 10,
|
|
||||||
"raw": "10"
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 42,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 46,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "s"
|
|
||||||
},
|
|
||||||
"kind": "set",
|
|
||||||
"value": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 47,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 48,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 54,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
242
test/fixtures/core/uncategorised/493/expected.json
vendored
242
test/fixtures/core/uncategorised/493/expected.json
vendored
@ -1,242 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 35,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 39,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "s"
|
|
||||||
},
|
|
||||||
"kind": "set",
|
|
||||||
"value": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 40,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 41,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 47,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
257
test/fixtures/core/uncategorised/494/expected.json
vendored
257
test/fixtures/core/uncategorised/494/expected.json
vendored
@ -1,257 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 64,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 64
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 64,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 64
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 64,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 64
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 64,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 64
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 62,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 62
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 60,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 60
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 35,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 35,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "s"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 38,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 47,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "s"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 49,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 55,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 55
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
134
test/fixtures/core/uncategorised/495/expected.json
vendored
134
test/fixtures/core/uncategorised/495/expected.json
vendored
@ -1,134 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 21,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 22,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 22,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "'use strict'"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
134
test/fixtures/core/uncategorised/496/expected.json
vendored
134
test/fixtures/core/uncategorised/496/expected.json
vendored
@ -1,134 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 26,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 27,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 27,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "'use strict'"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
187
test/fixtures/core/uncategorised/497/expected.json
vendored
187
test/fixtures/core/uncategorised/497/expected.json
vendored
@ -1,187 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 58,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 58
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 42,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "inner"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 48,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 54,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
187
test/fixtures/core/uncategorised/498/expected.json
vendored
187
test/fixtures/core/uncategorised/498/expected.json
vendored
@ -1,187 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 63,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 63
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 61,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 61
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 42,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "inner"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 48,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 59,
|
|
||||||
"end": 61,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 59
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 61
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
150
test/fixtures/core/uncategorised/499/expected.json
vendored
150
test/fixtures/core/uncategorised/499/expected.json
vendored
@ -1,150 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 33,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 33,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"\\1\"",
|
|
||||||
"value": "\\1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
152
test/fixtures/core/uncategorised/500/expected.json
vendored
152
test/fixtures/core/uncategorised/500/expected.json
vendored
@ -1,152 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 33,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 33,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 17,
|
|
||||||
"rawValue": 17,
|
|
||||||
"raw": "021"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
209
test/fixtures/core/uncategorised/501/expected.json
vendored
209
test/fixtures/core/uncategorised/501/expected.json
vendored
@ -1,209 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 33,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 34,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 36,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "StringLiteral",
|
|
||||||
"start": 36,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "\u0001",
|
|
||||||
"rawValue": "\u0001",
|
|
||||||
"raw": "\"\\1\""
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 42,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
209
test/fixtures/core/uncategorised/502/expected.json
vendored
209
test/fixtures/core/uncategorised/502/expected.json
vendored
@ -1,209 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 33,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 34,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 36,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 36,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 17,
|
|
||||||
"rawValue": 17,
|
|
||||||
"raw": "021"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 41,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
203
test/fixtures/core/uncategorised/503/expected.json
vendored
203
test/fixtures/core/uncategorised/503/expected.json
vendored
@ -1,203 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 76,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 76
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 76,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 76
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 76,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 76
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 76,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 76
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 74,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 74
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 42,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "inner"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 50,
|
|
||||||
"end": 74,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 74
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 52,
|
|
||||||
"end": 72,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 72
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 52,
|
|
||||||
"end": 71,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 71
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"octal directive\\1\"",
|
|
||||||
"value": "octal directive\\1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
169
test/fixtures/core/uncategorised/504/expected.json
vendored
169
test/fixtures/core/uncategorised/504/expected.json
vendored
@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 37,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 37,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "implements"
|
|
||||||
},
|
|
||||||
"init": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
169
test/fixtures/core/uncategorised/505/expected.json
vendored
169
test/fixtures/core/uncategorised/505/expected.json
vendored
@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 37,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 37,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "interface"
|
|
||||||
},
|
|
||||||
"init": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
169
test/fixtures/core/uncategorised/506/expected.json
vendored
169
test/fixtures/core/uncategorised/506/expected.json
vendored
@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 37,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 37,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "package"
|
|
||||||
},
|
|
||||||
"init": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
169
test/fixtures/core/uncategorised/507/expected.json
vendored
169
test/fixtures/core/uncategorised/507/expected.json
vendored
@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 37,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 37,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "private"
|
|
||||||
},
|
|
||||||
"init": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
169
test/fixtures/core/uncategorised/508/expected.json
vendored
169
test/fixtures/core/uncategorised/508/expected.json
vendored
@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 37,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 37,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "protected"
|
|
||||||
},
|
|
||||||
"init": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
169
test/fixtures/core/uncategorised/509/expected.json
vendored
169
test/fixtures/core/uncategorised/509/expected.json
vendored
@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 37,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 37,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "public"
|
|
||||||
},
|
|
||||||
"init": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
169
test/fixtures/core/uncategorised/510/expected.json
vendored
169
test/fixtures/core/uncategorised/510/expected.json
vendored
@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 46,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 33,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 37,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 37,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "static"
|
|
||||||
},
|
|
||||||
"init": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
134
test/fixtures/core/uncategorised/511/expected.json
vendored
134
test/fixtures/core/uncategorised/511/expected.json
vendored
@ -1,134 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 21,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "static"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 23,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 25,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 25,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "\"use strict\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
117
test/fixtures/core/uncategorised/512/expected.json
vendored
117
test/fixtures/core/uncategorised/512/expected.json
vendored
@ -1,117 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 15,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "static"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 18,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 20,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 20,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "\"use strict\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
118
test/fixtures/core/uncategorised/513/expected.json
vendored
118
test/fixtures/core/uncategorised/513/expected.json
vendored
@ -1,118 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 14,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 23,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "static"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
151
test/fixtures/core/uncategorised/514/expected.json
vendored
151
test/fixtures/core/uncategorised/514/expected.json
vendored
@ -1,151 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 11,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 14,
|
|
||||||
"end": 15,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
134
test/fixtures/core/uncategorised/515/expected.json
vendored
134
test/fixtures/core/uncategorised/515/expected.json
vendored
@ -1,134 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 11,
|
|
||||||
"end": 15,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 19,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 19,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "\"use strict\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
134
test/fixtures/core/uncategorised/516/expected.json
vendored
134
test/fixtures/core/uncategorised/516/expected.json
vendored
@ -1,134 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 11,
|
|
||||||
"end": 18,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "package"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 20,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 22,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 22,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "\"use strict\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
218
test/fixtures/core/uncategorised/517/expected.json
vendored
218
test/fixtures/core/uncategorised/517/expected.json
vendored
@ -1,218 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 13,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 29,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 38,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 40,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 43,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 46,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "EmptyStatement",
|
|
||||||
"start": 49,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 15,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 15,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
169
test/fixtures/core/uncategorised/518/expected.json
vendored
169
test/fixtures/core/uncategorised/518/expected.json
vendored
@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 10,
|
|
||||||
"end": 11,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 12,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 16,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 18,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 20,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 20,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
221
test/fixtures/core/uncategorised/519/expected.json
vendored
221
test/fixtures/core/uncategorised/519/expected.json
vendored
@ -1,221 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 13,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 29,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 30,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 39,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 41,
|
|
||||||
"end": 42,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 44,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 47,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 15,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 15,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
150
test/fixtures/core/uncategorised/520/expected.json
vendored
150
test/fixtures/core/uncategorised/520/expected.json
vendored
@ -1,150 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 10,
|
|
||||||
"end": 11,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 12,
|
|
||||||
"end": 16,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 18,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 20,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 20,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "\"use strict\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
150
test/fixtures/core/uncategorised/521/expected.json
vendored
150
test/fixtures/core/uncategorised/521/expected.json
vendored
@ -1,150 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 39,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 10,
|
|
||||||
"end": 11,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 12,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "package"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 21,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 23,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 23,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "\"use strict\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
270
test/fixtures/core/uncategorised/522/expected.json
vendored
270
test/fixtures/core/uncategorised/522/expected.json
vendored
@ -1,270 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 69,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 69
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 69,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 69
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 13,
|
|
||||||
"end": 42,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 22,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "foo"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 27,
|
|
||||||
"end": 42,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 28,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 28,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 42,
|
|
||||||
"end": 69,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 69
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 51,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "bar"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 56,
|
|
||||||
"end": 69,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 69
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 57,
|
|
||||||
"end": 68,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 68
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 61,
|
|
||||||
"end": 68,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 61
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 68
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 61,
|
|
||||||
"end": 62,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 61
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 62
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "v"
|
|
||||||
},
|
|
||||||
"init": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 65,
|
|
||||||
"end": 68,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 65
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 68
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 13,
|
|
||||||
"rawValue": 13,
|
|
||||||
"raw": "015"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 8,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 8,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 8,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"declarations": [
|
|
||||||
{
|
|
||||||
"type": "VariableDeclarator",
|
|
||||||
"start": 6,
|
|
||||||
"end": 7,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 6
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 7
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 6,
|
|
||||||
"end": 7,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 6
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 7
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"init": null
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"kind": "var"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
149
test/fixtures/es2015/uncategorised/167/expected.json
vendored
149
test/fixtures/es2015/uncategorised/167/expected.json
vendored
@ -1,149 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "RestElement",
|
|
||||||
"start": 11,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argument": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 14,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 16,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 19,
|
|
||||||
"end": 20,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 23,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"comments": []
|
|
||||||
}
|
|
||||||
420
test/fixtures/es2015/uncategorised/168/expected.json
vendored
420
test/fixtures/es2015/uncategorised/168/expected.json
vendored
@ -1,420 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 11,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 13,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 13,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 16,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 18,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": true,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 18,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "w"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 18,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "w"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 21,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": true,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 21,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 21,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 26,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 26,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 29,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 30,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "y"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 33,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "z"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "RestElement",
|
|
||||||
"start": 39,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argument": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 42,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 43,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 46,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 49,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "c"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 52,
|
|
||||||
"end": 54,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"comments": []
|
|
||||||
}
|
|
||||||
165
test/fixtures/es2015/uncategorised/171/expected.json
vendored
165
test/fixtures/es2015/uncategorised/171/expected.json
vendored
@ -1,165 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 26,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 10,
|
|
||||||
"end": 11,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "RestElement",
|
|
||||||
"start": 12,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argument": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 15,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 17,
|
|
||||||
"end": 18,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 20,
|
|
||||||
"end": 21,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 24,
|
|
||||||
"end": 26,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": []
|
|
||||||
},
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"comments": []
|
|
||||||
}
|
|
||||||
436
test/fixtures/es2015/uncategorised/172/expected.json
vendored
436
test/fixtures/es2015/uncategorised/172/expected.json
vendored
@ -1,436 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 55,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 55
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 10,
|
|
||||||
"end": 11,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 12,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 14,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 14,
|
|
||||||
"end": 15,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 17,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 19,
|
|
||||||
"end": 20,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": true,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 19,
|
|
||||||
"end": 20,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "w"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 19,
|
|
||||||
"end": 20,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "w"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 22,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": true,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 22,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 22,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 27,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 27,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 30,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 31,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "y"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 34,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "z"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "RestElement",
|
|
||||||
"start": 40,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argument": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 43,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 44,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 47,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 50,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "c"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 53,
|
|
||||||
"end": 55,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 55
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": []
|
|
||||||
},
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"comments": []
|
|
||||||
}
|
|
||||||
202
test/fixtures/es2015/uncategorised/174/expected.json
vendored
202
test/fixtures/es2015/uncategorised/174/expected.json
vendored
@ -1,202 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 21,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 3,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 3
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": true,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 3,
|
|
||||||
"end": 4,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 3
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 4
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 4,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 4
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "RestElement",
|
|
||||||
"start": 5,
|
|
||||||
"end": 16,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 5
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argument": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 8,
|
|
||||||
"end": 16,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 10,
|
|
||||||
"end": 11,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 13,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"comments": []
|
|
||||||
}
|
|
||||||
473
test/fixtures/es2015/uncategorised/175/expected.json
vendored
473
test/fixtures/es2015/uncategorised/175/expected.json
vendored
@ -1,473 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 51,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 51
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 3,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 3
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": true,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 3,
|
|
||||||
"end": 4,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 3
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 4
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 4,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 4
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 5,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 5
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 7,
|
|
||||||
"end": 18,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 7
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 7,
|
|
||||||
"end": 8,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 7
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 10,
|
|
||||||
"end": 18,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 12,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": true,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 12,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "w"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 12,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "w"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 15,
|
|
||||||
"end": 16,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": true,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 16,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 16,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 20,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 20,
|
|
||||||
"end": 21,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 20
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 23,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 24,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "y"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 27,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "z"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "RestElement",
|
|
||||||
"start": 33,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argument": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 36,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 37,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 40,
|
|
||||||
"end": 41,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 41
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 43,
|
|
||||||
"end": 44,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "c"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 46,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 46
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"comments": []
|
|
||||||
}
|
|
||||||
149
test/fixtures/es2015/uncategorised/180/expected.json
vendored
149
test/fixtures/es2015/uncategorised/180/expected.json
vendored
@ -1,149 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 0,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "RestElement",
|
|
||||||
"start": 1,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argument": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 4,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 4
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 5,
|
|
||||||
"end": 6,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 5
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 6
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 8,
|
|
||||||
"end": 9,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 15,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"comments": []
|
|
||||||
}
|
|
||||||
149
test/fixtures/es2015/uncategorised/181/expected.json
vendored
149
test/fixtures/es2015/uncategorised/181/expected.json
vendored
@ -1,149 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 0,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 1,
|
|
||||||
"end": 2,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "RestElement",
|
|
||||||
"start": 4,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 4
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argument": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 7,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 7
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 8,
|
|
||||||
"end": 9,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 8
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 15,
|
|
||||||
"end": 17,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"comments": []
|
|
||||||
}
|
|
||||||
295
test/fixtures/es2015/uncategorised/227/expected.json
vendored
295
test/fixtures/es2015/uncategorised/227/expected.json
vendored
@ -1,295 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 59,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 59
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 59,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 59
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 59,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 59
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 14,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "hello"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 17,
|
|
||||||
"end": 59,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 17
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 59
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 32,
|
|
||||||
"end": 57,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 57
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 55,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 55
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 35,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 35,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "i"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 38,
|
|
||||||
"end": 40,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 10,
|
|
||||||
"rawValue": 10,
|
|
||||||
"raw": "10"
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 42,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": true,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 42,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "s"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 43,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 44,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 44
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 50,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 18,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 18,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
258
test/fixtures/es2015/uncategorised/228/expected.json
vendored
258
test/fixtures/es2015/uncategorised/228/expected.json
vendored
@ -1,258 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 0,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 9,
|
|
||||||
"end": 10,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 13,
|
|
||||||
"end": 49,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 49
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 29,
|
|
||||||
"end": 47,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 30,
|
|
||||||
"end": 45,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 32,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": true,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 32,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 33,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 34,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 37,
|
|
||||||
"end": 38,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 38
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 40,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"extra": {
|
|
||||||
"parenthesized": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 15,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 15,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
169
test/fixtures/es2015/uncategorised/242/expected.json
vendored
169
test/fixtures/es2015/uncategorised/242/expected.json
vendored
@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 14,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 14,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "AssignmentPattern",
|
|
||||||
"start": 15,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"left": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
"right": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 22,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 10,
|
|
||||||
"rawValue": 10,
|
|
||||||
"raw": "10"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 29,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
136
test/fixtures/es2015/uncategorised/243/expected.json
vendored
136
test/fixtures/es2015/uncategorised/243/expected.json
vendored
@ -1,136 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 14,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 14,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 14,
|
|
||||||
"end": 18,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 22,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
136
test/fixtures/es2015/uncategorised/244/expected.json
vendored
136
test/fixtures/es2015/uncategorised/244/expected.json
vendored
@ -1,136 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 14,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 14,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 14,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 27,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
152
test/fixtures/es2015/uncategorised/245/expected.json
vendored
152
test/fixtures/es2015/uncategorised/245/expected.json
vendored
@ -1,152 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 14,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 14,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 21,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 27,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
152
test/fixtures/es2015/uncategorised/246/expected.json
vendored
152
test/fixtures/es2015/uncategorised/246/expected.json
vendored
@ -1,152 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 14,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 14,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arguments"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 26,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 32,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
185
test/fixtures/es2015/uncategorised/247/expected.json
vendored
185
test/fixtures/es2015/uncategorised/247/expected.json
vendored
@ -1,185 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 14,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 14,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "AssignmentPattern",
|
|
||||||
"start": 21,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"left": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 21,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"right": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 25,
|
|
||||||
"end": 27,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 10,
|
|
||||||
"rawValue": 10,
|
|
||||||
"raw": "10"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 32,
|
|
||||||
"end": 34,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
136
test/fixtures/es2015/uncategorised/249/expected.json
vendored
136
test/fixtures/es2015/uncategorised/249/expected.json
vendored
@ -1,136 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 14,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 14,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 16,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 16
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 21,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 21
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 0,
|
|
||||||
"rawValue": 0,
|
|
||||||
"raw": "00"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
203
test/fixtures/es2015/uncategorised/280/expected.json
vendored
203
test/fixtures/es2015/uncategorised/280/expected.json
vendored
@ -1,203 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 14,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 23,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 25,
|
|
||||||
"end": 26,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 28,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 30,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": true,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 30,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 30,
|
|
||||||
"end": 31,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 31
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 34,
|
|
||||||
"end": 36,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 34
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 36
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
376
test/fixtures/es2015/uncategorised/281/expected.json
vendored
376
test/fixtures/es2015/uncategorised/281/expected.json
vendored
@ -1,376 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "FunctionDeclaration",
|
|
||||||
"start": 14,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 23,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "x"
|
|
||||||
},
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 25,
|
|
||||||
"end": 37,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 37
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 27,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 27,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 27
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 30,
|
|
||||||
"end": 35,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 35
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 32,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": true,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 32,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 32,
|
|
||||||
"end": 33,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 33
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 39,
|
|
||||||
"end": 53,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 39
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 53
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 40,
|
|
||||||
"end": 52,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 40
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 52
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 42,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 42,
|
|
||||||
"end": 43,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 42
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 43
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "b"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "ObjectPattern",
|
|
||||||
"start": 45,
|
|
||||||
"end": 50,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 45
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 50
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 47,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": false,
|
|
||||||
"shorthand": true,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 47,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 47,
|
|
||||||
"end": 48,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 47
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 48
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "a"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"kind": "init"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 54,
|
|
||||||
"end": 56,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 54
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 56
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [],
|
|
||||||
"directives": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
187
test/fixtures/es2015/uncategorised/289/expected.json
vendored
187
test/fixtures/es2015/uncategorised/289/expected.json
vendored
@ -1,187 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 32,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 32
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ObjectExpression",
|
|
||||||
"start": 1,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"type": "Property",
|
|
||||||
"start": 3,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 3
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"method": true,
|
|
||||||
"shorthand": false,
|
|
||||||
"computed": false,
|
|
||||||
"key": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 3,
|
|
||||||
"end": 4,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 3
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 4
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "t"
|
|
||||||
},
|
|
||||||
"kind": "init",
|
|
||||||
"value": {
|
|
||||||
"type": "FunctionExpression",
|
|
||||||
"start": 4,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 4
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 5,
|
|
||||||
"end": 9,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 5
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 9
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 11,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 11
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 13,
|
|
||||||
"end": 26,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 13,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "\"use strict\""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parenthesizedExpression": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
136
test/fixtures/es2015/uncategorised/296/expected.json
vendored
136
test/fixtures/es2015/uncategorised/296/expected.json
vendored
@ -1,136 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 26,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 26,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 14,
|
|
||||||
"end": 26,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 14,
|
|
||||||
"end": 26,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": true,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 15,
|
|
||||||
"end": 19,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 19
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "NumericLiteral",
|
|
||||||
"start": 24,
|
|
||||||
"end": 26,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "\"use strict\"",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
167
test/fixtures/es2015/uncategorised/297/expected.json
vendored
167
test/fixtures/es2015/uncategorised/297/expected.json
vendored
@ -1,167 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 0,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "ArrowFunctionExpression",
|
|
||||||
"start": 0,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": null,
|
|
||||||
"generator": false,
|
|
||||||
"expression": false,
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 1,
|
|
||||||
"end": 5,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 1
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 5
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"type": "BlockStatement",
|
|
||||||
"start": 10,
|
|
||||||
"end": 30,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 10
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 30
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 12,
|
|
||||||
"end": 25,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 12,
|
|
||||||
"end": 24,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 24
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": "use strict",
|
|
||||||
"rawValue": "use strict",
|
|
||||||
"raw": "\"use strict\""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 26,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "Literal",
|
|
||||||
"start": 26,
|
|
||||||
"end": 28,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 28
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": 42,
|
|
||||||
"rawValue": 42,
|
|
||||||
"raw": "42"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
162
test/fixtures/es2015/uncategorised/332/expected.json
vendored
162
test/fixtures/es2015/uncategorised/332/expected.json
vendored
@ -1,162 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "File",
|
|
||||||
"start": 0,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"program": {
|
|
||||||
"type": "Program",
|
|
||||||
"start": 0,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sourceType": "script",
|
|
||||||
"body": [
|
|
||||||
{
|
|
||||||
"type": "ExpressionStatement",
|
|
||||||
"start": 14,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"expression": {
|
|
||||||
"type": "AssignmentExpression",
|
|
||||||
"start": 14,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"operator": "=",
|
|
||||||
"left": {
|
|
||||||
"type": "ArrayPattern",
|
|
||||||
"start": 14,
|
|
||||||
"end": 23,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 14
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 23
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"type": "RestElement",
|
|
||||||
"start": 15,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 15
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"argument": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 18,
|
|
||||||
"end": 22,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 18
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 22
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "eval"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"right": {
|
|
||||||
"type": "Identifier",
|
|
||||||
"start": 26,
|
|
||||||
"end": 29,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 26
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 29
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name": "arr"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"directives": [
|
|
||||||
{
|
|
||||||
"type": "Directive",
|
|
||||||
"start": 0,
|
|
||||||
"end": 13,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 13
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "DirectiveLiteral",
|
|
||||||
"start": 0,
|
|
||||||
"end": 12,
|
|
||||||
"loc": {
|
|
||||||
"start": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 0
|
|
||||||
},
|
|
||||||
"end": {
|
|
||||||
"line": 1,
|
|
||||||
"column": 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"raw": "'use strict'",
|
|
||||||
"value": "use strict"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user