remove range property from nodes, clean up babylon codebase
This commit is contained in:
parent
af03a301ae
commit
e7fec51feb
@ -74,7 +74,7 @@ pp.processComment = function (node) {
|
||||
|
||||
if (lastChild) {
|
||||
if (lastChild.leadingComments) {
|
||||
if (last(lastChild.leadingComments).range[1] <= node.range[0]) {
|
||||
if (last(lastChild.leadingComments).end <= node.start) {
|
||||
node.leadingComments = lastChild.leadingComments;
|
||||
lastChild.leadingComments = null;
|
||||
} else {
|
||||
@ -82,7 +82,7 @@ pp.processComment = function (node) {
|
||||
// so this takes back the leading comment.
|
||||
// See Also: https://github.com/eslint/espree/issues/158
|
||||
for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
|
||||
if (lastChild.leadingComments[i].range[1] <= node.range[0]) {
|
||||
if (lastChild.leadingComments[i].end <= node.start) {
|
||||
node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
//
|
||||
// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
|
||||
|
||||
import { types as tt } from "./tokentype";
|
||||
import { types as tt } from "./tokenizer/types";
|
||||
import { Parser } from "./state";
|
||||
import { reservedWords } from "./identifier";
|
||||
import { reservedWords } from "./util/identifier";
|
||||
|
||||
const pp = Parser.prototype;
|
||||
|
||||
@ -723,10 +723,12 @@ pp.parseFunctionBody = function (node, allowExpression) {
|
||||
if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) {
|
||||
let nameHash = Object.create(null), oldStrict = this.strict;
|
||||
this.strict = true;
|
||||
if (node.id)
|
||||
if (node.id) {
|
||||
this.checkLVal(node.id, true);
|
||||
for (let i = 0; i < node.params.length; i++)
|
||||
this.checkLVal(node.params[i], true, nameHash);
|
||||
}
|
||||
for (let param of (node.params: Array)) {
|
||||
this.checkLVal(param, true, nameHash);
|
||||
}
|
||||
this.strict = oldStrict;
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { Parser, plugins } from "./state";
|
||||
import { getOptions } from "./options";
|
||||
import "./parseutil";
|
||||
import "./statement";
|
||||
import "./lval";
|
||||
@ -7,9 +6,9 @@ import "./expression";
|
||||
import "./node";
|
||||
import "./location";
|
||||
import "./lookahead";
|
||||
import { types as tokTypes } from "./tokentype";
|
||||
import "./tokenize";
|
||||
import "./tokencontext";
|
||||
import { types as tokTypes } from "./tokenizer/types";
|
||||
import "./tokenizer";
|
||||
import "./tokenizer/context";
|
||||
import "./comments";
|
||||
import flowPlugin from "./plugins/flow";
|
||||
import jsxPlugin from "./plugins/jsx";
|
||||
@ -18,7 +17,7 @@ plugins.flow = flowPlugin;
|
||||
plugins.jsx = jsxPlugin;
|
||||
|
||||
export function parse(input, options) {
|
||||
return new Parser(getOptions(options), input).parse();
|
||||
return new Parser(options, input).parse();
|
||||
}
|
||||
|
||||
export { tokTypes };
|
||||
|
||||
@ -1,45 +1,5 @@
|
||||
import {Position, getLineInfo} from "./locutil";
|
||||
import { Parser } from "./state";
|
||||
import { lineBreakG } from "./whitespace";
|
||||
|
||||
// These are used when `options.locations` is on, for the
|
||||
// `startLoc` and `endLoc` properties.
|
||||
|
||||
export class Position {
|
||||
constructor(line, col) {
|
||||
this.line = line;
|
||||
this.column = col;
|
||||
}
|
||||
|
||||
offset(n) {
|
||||
return new Position(this.line, this.column + n);
|
||||
}
|
||||
}
|
||||
|
||||
export class SourceLocation {
|
||||
constructor(start, end) {
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
}
|
||||
}
|
||||
|
||||
// The `getLineInfo` function is mostly useful when the
|
||||
// `locations` option is off (for performance reasons) and you
|
||||
// want to find the line/column position for a given character
|
||||
// offset. `input` should be the code string that the offset refers
|
||||
// into.
|
||||
|
||||
export function getLineInfo(input, offset) {
|
||||
for (let line = 1, cur = 0; ;) {
|
||||
lineBreakG.lastIndex = cur;
|
||||
let match = lineBreakG.exec(input);
|
||||
if (match && match.index < offset) {
|
||||
++line;
|
||||
cur = match.index + match[0].length;
|
||||
} else {
|
||||
return new Position(line, offset - cur);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const pp = Parser.prototype;
|
||||
|
||||
@ -60,7 +20,5 @@ pp.raise = function (pos, message) {
|
||||
};
|
||||
|
||||
pp.curPosition = function () {
|
||||
if (this.options.locations) {
|
||||
return new Position(this.curLine, this.pos - this.lineStart);
|
||||
}
|
||||
return new Position(this.curLine, this.pos - this.lineStart);
|
||||
};
|
||||
|
||||
41
src/locutil.js
Normal file
41
src/locutil.js
Normal file
@ -0,0 +1,41 @@
|
||||
import { lineBreakG } from "./util/whitespace";
|
||||
|
||||
// These are used when `options.locations` is on, for the
|
||||
// `startLoc` and `endLoc` properties.
|
||||
|
||||
export class Position {
|
||||
constructor(line, col) {
|
||||
this.line = line;
|
||||
this.column = col;
|
||||
}
|
||||
|
||||
offset(n) {
|
||||
return new Position(this.line, this.column + n);
|
||||
}
|
||||
}
|
||||
|
||||
export class SourceLocation {
|
||||
constructor(start, end) {
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
}
|
||||
}
|
||||
|
||||
// The `getLineInfo` function is mostly useful when the
|
||||
// `locations` option is off (for performance reasons) and you
|
||||
// want to find the line/column position for a given character
|
||||
// offset. `input` should be the code string that the offset refers
|
||||
// into.
|
||||
|
||||
export function getLineInfo(input, offset) {
|
||||
for (let line = 1, cur = 0; ;) {
|
||||
lineBreakG.lastIndex = cur;
|
||||
let match = lineBreakG.exec(input);
|
||||
if (match && match.index < offset) {
|
||||
++line;
|
||||
cur = match.index + match[0].length;
|
||||
} else {
|
||||
return new Position(line, offset - cur);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -30,8 +30,7 @@ var STATE_KEYS = [
|
||||
|
||||
pp.getState = function () {
|
||||
var state = {};
|
||||
for (var i = 0; i < STATE_KEYS.length; i++) {
|
||||
var key = STATE_KEYS[i];
|
||||
for (var key of (STATE_KEYS: Array)) {
|
||||
state[key] = this[key];
|
||||
}
|
||||
state.comments = this.comments.slice();
|
||||
|
||||
69
src/lval.js
69
src/lval.js
@ -1,6 +1,6 @@
|
||||
import { types as tt } from "./tokentype";
|
||||
import { types as tt } from "./tokenizer/types";
|
||||
import { Parser } from "./state";
|
||||
import { reservedWords } from "./identifier";
|
||||
import { reservedWords } from "./util/identifier";
|
||||
|
||||
const pp = Parser.prototype;
|
||||
|
||||
@ -10,41 +10,40 @@ const pp = Parser.prototype;
|
||||
pp.toAssignable = function (node, isBinding) {
|
||||
if (node) {
|
||||
switch (node.type) {
|
||||
case "Identifier":
|
||||
case "ObjectPattern":
|
||||
case "ArrayPattern":
|
||||
case "AssignmentPattern":
|
||||
break;
|
||||
case "Identifier":
|
||||
case "ObjectPattern":
|
||||
case "ArrayPattern":
|
||||
case "AssignmentPattern":
|
||||
break;
|
||||
|
||||
case "ObjectExpression":
|
||||
node.type = "ObjectPattern";
|
||||
for (let i = 0; i < node.properties.length; i++) {
|
||||
let prop = node.properties[i];
|
||||
if (prop.type === "SpreadProperty") continue;
|
||||
if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter");
|
||||
this.toAssignable(prop.value, isBinding);
|
||||
}
|
||||
break;
|
||||
case "ObjectExpression":
|
||||
node.type = "ObjectPattern";
|
||||
for (let prop of (node.properties: Array)) {
|
||||
if (prop.type === "SpreadProperty") continue;
|
||||
if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter");
|
||||
this.toAssignable(prop.value, isBinding);
|
||||
}
|
||||
break;
|
||||
|
||||
case "ArrayExpression":
|
||||
node.type = "ArrayPattern";
|
||||
this.toAssignableList(node.elements, isBinding);
|
||||
break;
|
||||
case "ArrayExpression":
|
||||
node.type = "ArrayPattern";
|
||||
this.toAssignableList(node.elements, isBinding);
|
||||
break;
|
||||
|
||||
case "AssignmentExpression":
|
||||
if (node.operator === "=") {
|
||||
node.type = "AssignmentPattern";
|
||||
delete node.operator;
|
||||
} else {
|
||||
this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
|
||||
}
|
||||
break;
|
||||
case "AssignmentExpression":
|
||||
if (node.operator === "=") {
|
||||
node.type = "AssignmentPattern";
|
||||
delete node.operator;
|
||||
} else {
|
||||
this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
|
||||
}
|
||||
break;
|
||||
|
||||
case "MemberExpression":
|
||||
if (!isBinding) break;
|
||||
case "MemberExpression":
|
||||
if (!isBinding) break;
|
||||
|
||||
default:
|
||||
this.raise(node.start, "Assigning to rvalue");
|
||||
default:
|
||||
this.raise(node.start, "Assigning to rvalue");
|
||||
}
|
||||
}
|
||||
return node;
|
||||
@ -181,16 +180,14 @@ pp.checkLVal = function (expr, isBinding, checkClashes) {
|
||||
break;
|
||||
|
||||
case "ObjectPattern":
|
||||
for (let i = 0; i < expr.properties.length; i++) {
|
||||
var prop = expr.properties[i];
|
||||
for (let prop of (expr.properties: Array)) {
|
||||
if (prop.type === "Property") prop = prop.value;
|
||||
this.checkLVal(prop, isBinding, checkClashes);
|
||||
}
|
||||
break;
|
||||
|
||||
case "ArrayPattern":
|
||||
for (let i = 0; i < expr.elements.length; i++) {
|
||||
let elem = expr.elements[i];
|
||||
for (let elem of (expr.elements: Array)) {
|
||||
if (elem) this.checkLVal(elem, isBinding, checkClashes);
|
||||
}
|
||||
break;
|
||||
|
||||
13
src/node.js
13
src/node.js
@ -1,5 +1,5 @@
|
||||
import { Parser } from "./state";
|
||||
import { SourceLocation } from "./location";
|
||||
import { SourceLocation } from "./locutil";
|
||||
|
||||
// Start an AST node, attaching a start offset.
|
||||
|
||||
@ -12,13 +12,7 @@ export class Node {
|
||||
this.end = 0;
|
||||
|
||||
if (parser) {
|
||||
if (parser.options.locations) {
|
||||
this.loc = new SourceLocation(loc);
|
||||
}
|
||||
|
||||
if (parser.options.ranges) {
|
||||
this.range = [pos, 0];
|
||||
}
|
||||
this.loc = new SourceLocation(loc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,8 +34,7 @@ pp.startNodeAt = function (pos, loc) {
|
||||
function finishNodeAt(node, type, pos, loc) {
|
||||
node.type = type;
|
||||
node.end = pos;
|
||||
if (this.options.locations) node.loc.end = loc;
|
||||
if (this.options.ranges) node.range[1] = pos;
|
||||
node.loc.end = loc;
|
||||
this.processComment(node);
|
||||
return node;
|
||||
}
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import { has } from "./util";
|
||||
|
||||
// A second optional argument can be given to further configure
|
||||
// the parser process. These options are recognized:
|
||||
|
||||
@ -17,20 +15,6 @@ export const defaultOptions = {
|
||||
// When enabled, import/export statements are not constrained to
|
||||
// appearing at the top of the program.
|
||||
allowImportExportEverywhere: false,
|
||||
// When `locations` is on, `loc` properties holding objects with
|
||||
// `start` and `end` properties in `{line, column}` form (with
|
||||
// line being 1-based and column 0-based) will be attached to the
|
||||
// nodes.
|
||||
locations: false,
|
||||
// Nodes have their start and end characters offsets recorded in
|
||||
// `start` and `end` properties (directly on the node, rather than
|
||||
// the `loc` object, which holds line/column data. To also add a
|
||||
// [semi-standardized][range] `range` property holding a `[start,
|
||||
// end]` array with the same numbers, set the `ranges` option to
|
||||
// `true`.
|
||||
//
|
||||
// [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
|
||||
ranges: false,
|
||||
plugins: {},
|
||||
// Babel-specific options
|
||||
features: {},
|
||||
@ -41,8 +25,8 @@ export const defaultOptions = {
|
||||
|
||||
export function getOptions(opts) {
|
||||
let options = {};
|
||||
for (let opt in defaultOptions) {
|
||||
options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt];
|
||||
for (let key in defaultOptions) {
|
||||
options[key] = opts && key in opts ? opts[key] : defaultOptions[key];
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { types as tt } from "./tokentype";
|
||||
import { types as tt } from "./tokenizer/types";
|
||||
import { Parser } from "./state";
|
||||
import { lineBreak } from "./whitespace";
|
||||
import { lineBreak } from "./util/whitespace";
|
||||
|
||||
const pp = Parser.prototype;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { types as tt } from "../tokentype";
|
||||
import { types as tt } from "../tokenizer/types";
|
||||
import { Parser } from "../state";
|
||||
|
||||
var pp = Parser.prototype;
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import XHTMLEntities from "./xhtml";
|
||||
import { TokenType, types as tt } from "../../tokentype";
|
||||
import { TokContext, types as tc } from "../../tokencontext";
|
||||
import { TokenType, types as tt } from "../../tokenizer/types";
|
||||
import { TokContext, types as tc } from "../../tokenizer/context";
|
||||
import { Parser } from "../../state";
|
||||
import { isIdentifierChar, isIdentifierStart } from "../../identifier";
|
||||
import { isNewLine } from "../../whitespace";
|
||||
import { isIdentifierChar, isIdentifierStart } from "../../util/identifier";
|
||||
import { isNewLine } from "../../util/whitespace";
|
||||
|
||||
const HEX_NUMBER = /^[\da-fA-F]+$/;
|
||||
const DECIMAL_NUMBER = /^\d+$/;
|
||||
@ -87,10 +87,8 @@ pp.jsxReadNewLine = function(normalizeCRLF) {
|
||||
} else {
|
||||
out = String.fromCharCode(ch);
|
||||
}
|
||||
if (this.options.locations) {
|
||||
++this.curLine;
|
||||
this.lineStart = this.pos;
|
||||
}
|
||||
++this.curLine;
|
||||
this.lineStart = this.pos;
|
||||
|
||||
return out;
|
||||
};
|
||||
|
||||
155
src/state.js
155
src/state.js
@ -1,98 +1,69 @@
|
||||
import { reservedWords, keywords } from "./identifier";
|
||||
import { types as tt } from "./tokentype";
|
||||
import { lineBreak } from "./whitespace";
|
||||
|
||||
export function Parser(options, input, startPos) {
|
||||
this.options = options;
|
||||
this.isKeyword = keywords[6];
|
||||
this.isReservedWord = reservedWords[6];
|
||||
this.input = input;
|
||||
this.loadPlugins(this.options.plugins);
|
||||
|
||||
// Set up token state
|
||||
|
||||
// The current position of the tokenizer in the input.
|
||||
if (startPos) {
|
||||
this.pos = startPos;
|
||||
this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos));
|
||||
this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
|
||||
} else {
|
||||
this.pos = this.lineStart = 0;
|
||||
this.curLine = 1;
|
||||
}
|
||||
|
||||
// Properties of the current token:
|
||||
// Its type
|
||||
this.type = tt.eof;
|
||||
// For tokens that include more information than their type, the value
|
||||
this.value = null;
|
||||
// Its start and end offset
|
||||
this.start = this.end = this.pos;
|
||||
// And, if locations are used, the {line, column} object
|
||||
// corresponding to those offsets
|
||||
this.startLoc = this.endLoc = this.curPosition();
|
||||
|
||||
// Position information for the previous token
|
||||
this.lastTokEndLoc = this.lastTokStartLoc = null;
|
||||
this.lastTokStart = this.lastTokEnd = this.pos;
|
||||
|
||||
// The context stack is used to superficially track syntactic
|
||||
// context to predict whether a regular expression is allowed in a
|
||||
// given position.
|
||||
this.context = this.initialContext();
|
||||
this.exprAllowed = true;
|
||||
|
||||
// Figure out if it's a module code.
|
||||
this.inModule = this.options.sourceType === "module";
|
||||
this.strict = this.options.strictMode === false ? false : this.inModule;
|
||||
|
||||
// Used to signify the start of a potential arrow function
|
||||
this.potentialArrowAt = -1;
|
||||
|
||||
// Flags to track whether we are in a function, a generator.
|
||||
this.inFunction = this.inGenerator = false;
|
||||
// Labels in scope.
|
||||
this.labels = [];
|
||||
|
||||
// Leading decorators.
|
||||
this.decorators = [];
|
||||
|
||||
// Token store.
|
||||
this.tokens = [];
|
||||
|
||||
// Comment store.
|
||||
this.comments = [];
|
||||
|
||||
// Comment attachment store
|
||||
this.trailingComments = [];
|
||||
this.leadingComments = [];
|
||||
this.bottomRightStack = [];
|
||||
|
||||
// If enabled, skip leading hashbang line.
|
||||
if (this.pos === 0 && this.input[0] === "#" && this.input[1] === "!") {
|
||||
this.skipLineComment(2);
|
||||
}
|
||||
}
|
||||
|
||||
Parser.prototype.extend = function (name, f) {
|
||||
this[name] = f(this[name]);
|
||||
};
|
||||
import { reservedWords, isKeyword } from "./util/identifier";
|
||||
import { getOptions } from "./options";
|
||||
import Tokenizer from "./tokenizer";
|
||||
|
||||
// Registered plugins
|
||||
|
||||
export const plugins = {};
|
||||
|
||||
Parser.prototype.loadPlugins = function (plugins) {
|
||||
for (let name in plugins) {
|
||||
let plugin = exports.plugins[name];
|
||||
if (!plugin) throw new Error(`Plugin '${name}' not found`);
|
||||
plugin(this, plugins[name]);
|
||||
}
|
||||
};
|
||||
export class Parser extends Tokenizer {
|
||||
constructor(options, input) {
|
||||
super();
|
||||
|
||||
Parser.prototype.parse = function () {
|
||||
let file = this.startNode();
|
||||
let program = this.startNode();
|
||||
this.nextToken();
|
||||
return this.parseTopLevel(file, program);
|
||||
};
|
||||
this.options = getOptions(options);
|
||||
this.isKeyword = isKeyword;
|
||||
this.isReservedWord = reservedWords[6];
|
||||
this.input = input;
|
||||
this.loadPlugins(this.options.plugins);
|
||||
|
||||
// Figure out if it's a module code.
|
||||
this.inModule = this.options.sourceType === "module";
|
||||
this.strict = this.options.strictMode === false ? false : this.inModule;
|
||||
|
||||
// Used to signify the start of a potential arrow function
|
||||
this.potentialArrowAt = -1;
|
||||
|
||||
// Flags to track whether we are in a function, a generator.
|
||||
this.inFunction = this.inGenerator = false;
|
||||
// Labels in scope.
|
||||
this.labels = [];
|
||||
|
||||
// Leading decorators.
|
||||
this.decorators = [];
|
||||
|
||||
// Token store.
|
||||
this.tokens = [];
|
||||
|
||||
// Comment store.
|
||||
this.comments = [];
|
||||
|
||||
// Comment attachment store
|
||||
this.trailingComments = [];
|
||||
this.leadingComments = [];
|
||||
this.bottomRightStack = [];
|
||||
|
||||
// If enabled, skip leading hashbang line.
|
||||
if (this.pos === 0 && this.input[0] === "#" && this.input[1] === "!") {
|
||||
this.skipLineComment(2);
|
||||
}
|
||||
}
|
||||
|
||||
extend(name, f) {
|
||||
this[name] = f(this[name]);
|
||||
}
|
||||
|
||||
loadPlugins(plugins) {
|
||||
for (let name in plugins) {
|
||||
let plugin = exports.plugins[name];
|
||||
if (!plugin) throw new Error(`Plugin '${name}' not found`);
|
||||
plugin(this, plugins[name]);
|
||||
}
|
||||
}
|
||||
|
||||
parse() {
|
||||
let file = this.startNode();
|
||||
let program = this.startNode();
|
||||
this.nextToken();
|
||||
return this.parseTopLevel(file, program);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { types as tt } from "./tokentype";
|
||||
import { types as tt } from "./tokenizer/types";
|
||||
import { Parser } from "./state";
|
||||
import { lineBreak } from "./whitespace";
|
||||
import { lineBreak } from "./util/whitespace";
|
||||
|
||||
const pp = Parser.prototype;
|
||||
|
||||
@ -368,8 +368,8 @@ pp.parseEmptyStatement = function (node) {
|
||||
};
|
||||
|
||||
pp.parseLabeledStatement = function (node, maybeName, expr) {
|
||||
for (let i = 0; i < this.labels.length; ++i){
|
||||
if (this.labels[i].name === maybeName) {
|
||||
for (let label of (this.labels: Array)){
|
||||
if (label.name === maybeName) {
|
||||
this.raise(expr.start, `Label '${maybeName}' is already declared`);
|
||||
}
|
||||
}
|
||||
|
||||
746
src/tokenize.js
746
src/tokenize.js
@ -1,746 +0,0 @@
|
||||
import { isIdentifierStart, isIdentifierChar } from "./identifier";
|
||||
import { types as tt, keywords as keywordTypes } from "./tokentype";
|
||||
import { Parser } from "./state";
|
||||
import { SourceLocation } from "./location";
|
||||
import { lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace } from "./whitespace";
|
||||
|
||||
// Object type used to represent tokens. Note that normally, tokens
|
||||
// simply exist as properties on the parser object. This is only
|
||||
// used for the onToken callback and the external tokenizer.
|
||||
|
||||
export class Token {
|
||||
constructor(p) {
|
||||
this.type = p.type;
|
||||
this.value = p.value;
|
||||
this.start = p.start;
|
||||
this.end = p.end;
|
||||
|
||||
if (p.options.locations) {
|
||||
this.loc = new SourceLocation(p.startLoc, p.endLoc);
|
||||
}
|
||||
|
||||
if (p.options.ranges) {
|
||||
this.range = [p.start, p.end];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ## Tokenizer
|
||||
|
||||
const pp = Parser.prototype;
|
||||
|
||||
// Are we running under Rhino?
|
||||
/* global Packages */
|
||||
const isRhino = typeof Packages === "object" && Object.prototype.toString.call(Packages) === "[object JavaPackage]";
|
||||
|
||||
// Move to the next token
|
||||
|
||||
pp.next = function () {
|
||||
if (!this.isLookahead)
|
||||
this.tokens.push(new Token(this));
|
||||
|
||||
this.lastTokEnd = this.end;
|
||||
this.lastTokStart = this.start;
|
||||
this.lastTokEndLoc = this.endLoc;
|
||||
this.lastTokStartLoc = this.startLoc;
|
||||
this.nextToken();
|
||||
};
|
||||
|
||||
pp.getToken = function () {
|
||||
this.next();
|
||||
return new Token(this);
|
||||
};
|
||||
|
||||
// Toggle strict mode. Re-reads the next number or string to please
|
||||
// pedantic tests (`"use strict"; 010;` should fail).
|
||||
|
||||
pp.setStrict = function (strict) {
|
||||
this.strict = strict;
|
||||
if (this.type !== tt.num && this.type !== tt.string) return;
|
||||
this.pos = this.start;
|
||||
if (this.options.locations) {
|
||||
while (this.pos < this.lineStart) {
|
||||
this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
|
||||
--this.curLine;
|
||||
}
|
||||
}
|
||||
this.nextToken();
|
||||
};
|
||||
|
||||
pp.curContext = function () {
|
||||
return this.context[this.context.length - 1];
|
||||
};
|
||||
|
||||
// Read a single token, updating the parser object's token-related
|
||||
// properties.
|
||||
|
||||
pp.nextToken = function () {
|
||||
let curContext = this.curContext();
|
||||
if (!curContext || !curContext.preserveSpace) this.skipSpace();
|
||||
|
||||
this.start = this.pos;
|
||||
if (this.options.locations) this.startLoc = this.curPosition();
|
||||
if (this.pos >= this.input.length) return this.finishToken(tt.eof);
|
||||
|
||||
if (curContext.override) {
|
||||
return curContext.override(this);
|
||||
} else {
|
||||
return this.readToken(this.fullCharCodeAtPos());
|
||||
}
|
||||
};
|
||||
|
||||
pp.readToken = function (code) {
|
||||
// Identifier or keyword. '\uXXXX' sequences are allowed in
|
||||
// identifiers, so '\' also dispatches to that.
|
||||
if (isIdentifierStart(code, true) || code === 92 /* '\' */)
|
||||
return this.readWord();
|
||||
|
||||
return this.getTokenFromCode(code);
|
||||
};
|
||||
|
||||
pp.fullCharCodeAtPos = function () {
|
||||
let code = this.input.charCodeAt(this.pos);
|
||||
if (code <= 0xd7ff || code >= 0xe000) return code;
|
||||
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
return (code << 10) + next - 0x35fdc00;
|
||||
};
|
||||
|
||||
function pushComment(block, text, start, end, startLoc, endLoc) {
|
||||
var comment = {
|
||||
type: block ? "CommentBlock" : "CommentLine",
|
||||
value: text,
|
||||
start: start,
|
||||
end: end,
|
||||
loc: new SourceLocation(startLoc, endLoc),
|
||||
range: [start, end]
|
||||
};
|
||||
|
||||
this.tokens.push(comment);
|
||||
this.comments.push(comment);
|
||||
this.addComment(comment);
|
||||
}
|
||||
|
||||
pp.skipBlockComment = function () {
|
||||
let startLoc = this.curPosition();
|
||||
let start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
|
||||
if (end === -1) this.raise(this.pos - 2, "Unterminated comment");
|
||||
|
||||
this.pos = end + 2;
|
||||
if (this.options.locations) {
|
||||
lineBreakG.lastIndex = start;
|
||||
let match;
|
||||
while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
|
||||
++this.curLine;
|
||||
this.lineStart = match.index + match[0].length;
|
||||
}
|
||||
}
|
||||
|
||||
pushComment.call(this, true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition());
|
||||
};
|
||||
|
||||
pp.skipLineComment = function (startSkip) {
|
||||
let start = this.pos;
|
||||
let startLoc = this.curPosition();
|
||||
let ch = this.input.charCodeAt(this.pos += startSkip);
|
||||
while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
|
||||
++this.pos;
|
||||
ch = this.input.charCodeAt(this.pos);
|
||||
}
|
||||
|
||||
pushComment.call(this, false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition());
|
||||
};
|
||||
|
||||
// Called at the start of the parse and after every token. Skips
|
||||
// whitespace and comments, and.
|
||||
|
||||
pp.skipSpace = function() {
|
||||
loop: while (this.pos < this.input.length) {
|
||||
let ch = this.input.charCodeAt(this.pos);
|
||||
switch (ch) {
|
||||
case 32: case 160: // ' '
|
||||
++this.pos;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
if (this.input.charCodeAt(this.pos + 1) === 10) {
|
||||
++this.pos;
|
||||
}
|
||||
|
||||
case 10: case 8232: case 8233:
|
||||
++this.pos;
|
||||
if (this.options.locations) {
|
||||
++this.curLine;
|
||||
this.lineStart = this.pos;
|
||||
}
|
||||
break;
|
||||
|
||||
case 47: // '/'
|
||||
switch (this.input.charCodeAt(this.pos + 1)) {
|
||||
case 42: // '*'
|
||||
this.skipBlockComment();
|
||||
break;
|
||||
|
||||
case 47:
|
||||
this.skipLineComment(2);
|
||||
break;
|
||||
|
||||
default:
|
||||
break loop;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
|
||||
++this.pos;
|
||||
} else {
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Called at the end of every token. Sets `end`, `val`, and
|
||||
// maintains `context` and `exprAllowed`, and skips the space after
|
||||
// the token, so that the next one's `start` will point at the
|
||||
// right position.
|
||||
|
||||
pp.finishToken = function (type, val) {
|
||||
this.end = this.pos;
|
||||
if (this.options.locations) this.endLoc = this.curPosition();
|
||||
let prevType = this.type;
|
||||
this.type = type;
|
||||
this.value = val;
|
||||
|
||||
this.updateContext(prevType);
|
||||
};
|
||||
|
||||
// ### Token reading
|
||||
|
||||
// This is the function that is called to fetch the next token. It
|
||||
// is somewhat obscure, because it works in character codes rather
|
||||
// than characters, and because operator parsing has been inlined
|
||||
// into it.
|
||||
//
|
||||
// All in the name of speed.
|
||||
//
|
||||
pp.readToken_dot = function () {
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (next >= 48 && next <= 57) return this.readNumber(true);
|
||||
|
||||
let next2 = this.input.charCodeAt(this.pos + 2);
|
||||
if (next === 46 && next2 === 46) { // 46 = dot '.'
|
||||
this.pos += 3;
|
||||
return this.finishToken(tt.ellipsis);
|
||||
} else {
|
||||
++this.pos;
|
||||
return this.finishToken(tt.dot);
|
||||
}
|
||||
};
|
||||
|
||||
pp.readToken_slash = function () { // '/'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (this.exprAllowed) {
|
||||
++this.pos;
|
||||
return this.readRegexp();
|
||||
}
|
||||
if (next === 61) return this.finishOp(tt.assign, 2);
|
||||
return this.finishOp(tt.slash, 1);
|
||||
};
|
||||
|
||||
pp.readToken_mult_modulo = function (code) { // '%*'
|
||||
var type = code === 42 ? tt.star : tt.modulo;
|
||||
var width = 1;
|
||||
var next = this.input.charCodeAt(this.pos + 1);
|
||||
|
||||
if (next === 42 && this.options.features["es7.exponentiationOperator"]) { // '*'
|
||||
width++;
|
||||
next = this.input.charCodeAt(this.pos + 2);
|
||||
type = tt.exponent;
|
||||
}
|
||||
|
||||
if (next === 61) {
|
||||
width++;
|
||||
type = tt.assign;
|
||||
}
|
||||
|
||||
return this.finishOp(type, width);
|
||||
};
|
||||
|
||||
pp.readToken_pipe_amp = function (code) { // '|&'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2);
|
||||
if (next === 61) return this.finishOp(tt.assign, 2);
|
||||
return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1);
|
||||
};
|
||||
|
||||
pp.readToken_caret = function () { // '^'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (next === 61) {
|
||||
return this.finishOp(tt.assign, 2);
|
||||
} else {
|
||||
return this.finishOp(tt.bitwiseXOR, 1);
|
||||
}
|
||||
};
|
||||
|
||||
pp.readToken_plus_min = function (code) { // '+-'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
|
||||
if (next === code) {
|
||||
if (next === 45 && this.input.charCodeAt(this.pos + 2) === 62 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
|
||||
// A `-->` line comment
|
||||
this.skipLineComment(3);
|
||||
this.skipSpace();
|
||||
return this.nextToken();
|
||||
}
|
||||
return this.finishOp(tt.incDec, 2);
|
||||
}
|
||||
|
||||
if (next === 61) {
|
||||
return this.finishOp(tt.assign, 2);
|
||||
} else {
|
||||
return this.finishOp(tt.plusMin, 1);
|
||||
}
|
||||
};
|
||||
|
||||
pp.readToken_lt_gt = function (code) { // '<>'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
let size = 1;
|
||||
|
||||
if (next === code) {
|
||||
size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
|
||||
if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1);
|
||||
return this.finishOp(tt.bitShift, size);
|
||||
}
|
||||
|
||||
if (next === 33 && code === 60 && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
|
||||
if (this.inModule) this.unexpected();
|
||||
// `<!--`, an XML-style comment that should be interpreted as a line comment
|
||||
this.skipLineComment(4);
|
||||
this.skipSpace();
|
||||
return this.nextToken();
|
||||
}
|
||||
|
||||
if (next === 61) {
|
||||
size = this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2;
|
||||
}
|
||||
|
||||
return this.finishOp(tt.relational, size);
|
||||
};
|
||||
|
||||
pp.readToken_eq_excl = function (code) { // '=!'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
|
||||
if (code === 61 && next === 62) { // '=>'
|
||||
this.pos += 2;
|
||||
return this.finishToken(tt.arrow);
|
||||
}
|
||||
return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1);
|
||||
};
|
||||
|
||||
pp.getTokenFromCode = function (code) {
|
||||
switch (code) {
|
||||
// The interpretation of a dot depends on whether it is followed
|
||||
// by a digit or another two dots.
|
||||
case 46: // '.'
|
||||
return this.readToken_dot();
|
||||
|
||||
// Punctuation tokens.
|
||||
case 40: ++this.pos; return this.finishToken(tt.parenL);
|
||||
case 41: ++this.pos; return this.finishToken(tt.parenR);
|
||||
case 59: ++this.pos; return this.finishToken(tt.semi);
|
||||
case 44: ++this.pos; return this.finishToken(tt.comma);
|
||||
case 91: ++this.pos; return this.finishToken(tt.bracketL);
|
||||
case 93: ++this.pos; return this.finishToken(tt.bracketR);
|
||||
case 123: ++this.pos; return this.finishToken(tt.braceL);
|
||||
case 125: ++this.pos; return this.finishToken(tt.braceR);
|
||||
|
||||
case 58:
|
||||
if (this.options.features["es7.functionBind"] && this.input.charCodeAt(this.pos + 1) === 58) {
|
||||
return this.finishOp(tt.doubleColon, 2);
|
||||
} else {
|
||||
++this.pos;
|
||||
return this.finishToken(tt.colon);
|
||||
}
|
||||
|
||||
case 63: ++this.pos; return this.finishToken(tt.question);
|
||||
case 64: ++this.pos; return this.finishToken(tt.at);
|
||||
|
||||
case 96: // '`'
|
||||
++this.pos;
|
||||
return this.finishToken(tt.backQuote);
|
||||
|
||||
case 48: // '0'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
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 === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
|
||||
// Anything else beginning with a digit is an integer, octal
|
||||
// number, or float.
|
||||
case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
|
||||
return this.readNumber(false);
|
||||
|
||||
// Quotes produce strings.
|
||||
case 34: case 39: // '"', "'"
|
||||
return this.readString(code);
|
||||
|
||||
// Operators are parsed inline in tiny state machines. '=' (61) is
|
||||
// often referred to. `finishOp` simply skips the amount of
|
||||
// characters it is given as second argument, and returns a token
|
||||
// of the type given by its first argument.
|
||||
|
||||
case 47: // '/'
|
||||
return this.readToken_slash();
|
||||
|
||||
case 37: case 42: // '%*'
|
||||
return this.readToken_mult_modulo(code);
|
||||
|
||||
case 124: case 38: // '|&'
|
||||
return this.readToken_pipe_amp(code);
|
||||
|
||||
case 94: // '^'
|
||||
return this.readToken_caret();
|
||||
|
||||
case 43: case 45: // '+-'
|
||||
return this.readToken_plus_min(code);
|
||||
|
||||
case 60: case 62: // '<>'
|
||||
return this.readToken_lt_gt(code);
|
||||
|
||||
case 61: case 33: // '=!'
|
||||
return this.readToken_eq_excl(code);
|
||||
|
||||
case 126: // '~'
|
||||
return this.finishOp(tt.prefix, 1);
|
||||
}
|
||||
|
||||
this.raise(this.pos, `Unexpected character '${codePointToString(code)}'`);
|
||||
};
|
||||
|
||||
pp.finishOp = function (type, size) {
|
||||
let str = this.input.slice(this.pos, this.pos + size);
|
||||
this.pos += size;
|
||||
return this.finishToken(type, str);
|
||||
};
|
||||
|
||||
// Parse a regular expression. Some context-awareness is necessary,
|
||||
// since a '/' inside a '[]' set does not end the expression.
|
||||
|
||||
function tryCreateRegexp(src, flags, throwErrorStart) {
|
||||
try {
|
||||
return new RegExp(src, flags);
|
||||
} catch (e) {
|
||||
if (throwErrorStart !== undefined) {
|
||||
if (e instanceof SyntaxError) this.raise(throwErrorStart, "Error parsing regular expression: " + e.message);
|
||||
this.raise(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u");
|
||||
|
||||
pp.readRegexp = function() {
|
||||
let escaped, inClass, start = this.pos;
|
||||
for (;;) {
|
||||
if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
|
||||
let ch = this.input.charAt(this.pos);
|
||||
if (lineBreak.test(ch)) this.raise(start, "Unterminated regular expression");
|
||||
if (escaped) {
|
||||
escaped = false;
|
||||
} else {
|
||||
if (ch === "[") inClass = true;
|
||||
else if (ch === "]" && inClass) inClass = false;
|
||||
else if (ch === "/" && !inClass) break;
|
||||
escaped = ch === "\\";
|
||||
}
|
||||
++this.pos;
|
||||
}
|
||||
let content = this.input.slice(start, this.pos);
|
||||
++this.pos;
|
||||
// Need to use `readWord1` because '\uXXXX' sequences are allowed
|
||||
// here (don't ask).
|
||||
let mods = this.readWord1();
|
||||
let tmp = content;
|
||||
if (mods) {
|
||||
let validFlags = /^[gmsiyu]*$/;
|
||||
if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
|
||||
if (mods.indexOf("u") >= 0 && !regexpUnicodeSupport) {
|
||||
// Replace each astral symbol and every Unicode escape sequence that
|
||||
// possibly represents an astral symbol or a paired surrogate with a
|
||||
// single ASCII symbol to avoid throwing on regular expressions that
|
||||
// are only valid in combination with the `/u` flag.
|
||||
// Note: replacing with the ASCII symbol `x` might cause false
|
||||
// negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
|
||||
// perfectly valid pattern that is equivalent to `[a-b]`, but it would
|
||||
// be replaced by `[x-b]` which throws an error.
|
||||
tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, (match, code, offset) => {
|
||||
code = Number("0x" + code);
|
||||
if (code > 0x10FFFF) this.raise(start + offset + 3, "Code point out of bounds");
|
||||
return "x";
|
||||
});
|
||||
tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x");
|
||||
}
|
||||
}
|
||||
// Detect invalid regular expressions.
|
||||
let value = null;
|
||||
// Rhino's regular expression parser is flaky and throws uncatchable exceptions,
|
||||
// so don't do detection if we are running under Rhino
|
||||
if (!isRhino) {
|
||||
tryCreateRegexp.call(this, tmp, undefined, start);
|
||||
// Get a regular expression object for this pattern-flag pair, or `null` in
|
||||
// case the current environment doesn't support the flags it uses.
|
||||
value = tryCreateRegexp.call(this, content, mods);
|
||||
}
|
||||
return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value});
|
||||
};
|
||||
|
||||
// Read an integer in the given radix. Return null if zero digits
|
||||
// were read, the integer value otherwise. When `len` is given, this
|
||||
// will return `null` unless the integer has exactly `len` digits.
|
||||
|
||||
pp.readInt = function (radix, len) {
|
||||
let start = this.pos, total = 0;
|
||||
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
|
||||
let code = this.input.charCodeAt(this.pos), val;
|
||||
if (code >= 97) val = code - 97 + 10; // a
|
||||
else if (code >= 65) val = code - 65 + 10; // A
|
||||
else if (code >= 48 && code <= 57) val = code - 48; // 0-9
|
||||
else val = Infinity;
|
||||
if (val >= radix) break;
|
||||
++this.pos;
|
||||
total = total * radix + val;
|
||||
}
|
||||
if (this.pos === start || len != null && this.pos - start !== len) return null;
|
||||
|
||||
return total;
|
||||
};
|
||||
|
||||
pp.readRadixNumber = function (radix) {
|
||||
this.pos += 2; // 0x
|
||||
let val = this.readInt(radix);
|
||||
if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix);
|
||||
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
|
||||
return this.finishToken(tt.num, val);
|
||||
};
|
||||
|
||||
// Read an integer, octal integer, or floating-point number.
|
||||
|
||||
pp.readNumber = function (startsWithDot) {
|
||||
let start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48;
|
||||
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
|
||||
let next = this.input.charCodeAt(this.pos);
|
||||
if (next === 46) { // '.'
|
||||
++this.pos;
|
||||
this.readInt(10);
|
||||
isFloat = true;
|
||||
next = this.input.charCodeAt(this.pos);
|
||||
}
|
||||
if (next === 69 || next === 101) { // 'eE'
|
||||
next = this.input.charCodeAt(++this.pos);
|
||||
if (next === 43 || next === 45) ++this.pos; // '+-'
|
||||
if (this.readInt(10) === null) this.raise(start, "Invalid number");
|
||||
isFloat = true;
|
||||
}
|
||||
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
|
||||
|
||||
let str = this.input.slice(start, this.pos), val;
|
||||
if (isFloat) val = parseFloat(str);
|
||||
else if (!octal || str.length === 1) val = parseInt(str, 10);
|
||||
else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number");
|
||||
else val = parseInt(str, 8);
|
||||
return this.finishToken(tt.num, val);
|
||||
};
|
||||
|
||||
// Read a string value, interpreting backslash-escapes.
|
||||
|
||||
pp.readCodePoint = function () {
|
||||
let ch = this.input.charCodeAt(this.pos), code;
|
||||
|
||||
if (ch === 123) {
|
||||
let codePos = ++this.pos;
|
||||
code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
|
||||
++this.pos;
|
||||
if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds");
|
||||
} else {
|
||||
code = this.readHexChar(4);
|
||||
}
|
||||
return code;
|
||||
};
|
||||
|
||||
function codePointToString(code) {
|
||||
// UTF-16 Decoding
|
||||
if (code <= 0xFFFF) return String.fromCharCode(code);
|
||||
return String.fromCharCode(((code - 0x10000) >> 10) + 0xD800,
|
||||
((code - 0x10000) & 1023) + 0xDC00);
|
||||
}
|
||||
|
||||
pp.readString = function (quote) {
|
||||
let out = "", chunkStart = ++this.pos;
|
||||
for (;;) {
|
||||
if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant");
|
||||
let ch = this.input.charCodeAt(this.pos);
|
||||
if (ch === quote) break;
|
||||
if (ch === 92) { // '\'
|
||||
out += this.input.slice(chunkStart, this.pos);
|
||||
out += this.readEscapedChar(false);
|
||||
chunkStart = this.pos;
|
||||
} else {
|
||||
if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant");
|
||||
++this.pos;
|
||||
}
|
||||
}
|
||||
out += this.input.slice(chunkStart, this.pos++);
|
||||
return this.finishToken(tt.string, out);
|
||||
};
|
||||
|
||||
// Reads template string tokens.
|
||||
|
||||
pp.readTmplToken = function () {
|
||||
let out = "", chunkStart = this.pos;
|
||||
for (;;) {
|
||||
if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template");
|
||||
let ch = this.input.charCodeAt(this.pos);
|
||||
if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${'
|
||||
if (this.pos === this.start && this.type === tt.template) {
|
||||
if (ch === 36) {
|
||||
this.pos += 2;
|
||||
return this.finishToken(tt.dollarBraceL);
|
||||
} else {
|
||||
++this.pos;
|
||||
return this.finishToken(tt.backQuote);
|
||||
}
|
||||
}
|
||||
out += this.input.slice(chunkStart, this.pos);
|
||||
return this.finishToken(tt.template, out);
|
||||
}
|
||||
if (ch === 92) { // '\'
|
||||
out += this.input.slice(chunkStart, this.pos);
|
||||
out += this.readEscapedChar(true);
|
||||
chunkStart = this.pos;
|
||||
} else if (isNewLine(ch)) {
|
||||
out += this.input.slice(chunkStart, this.pos);
|
||||
++this.pos;
|
||||
switch (ch) {
|
||||
case 13:
|
||||
if (this.input.charCodeAt(this.pos) === 10) ++this.pos;
|
||||
case 10:
|
||||
out += "\n";
|
||||
break;
|
||||
default:
|
||||
out += String.fromCharCode(ch);
|
||||
break;
|
||||
}
|
||||
if (this.options.locations) {
|
||||
++this.curLine;
|
||||
this.lineStart = this.pos;
|
||||
}
|
||||
chunkStart = this.pos;
|
||||
} else {
|
||||
++this.pos;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Used to read escaped characters
|
||||
|
||||
pp.readEscapedChar = function (inTemplate) {
|
||||
let ch = this.input.charCodeAt(++this.pos);
|
||||
++this.pos;
|
||||
switch (ch) {
|
||||
case 110: return "\n"; // 'n' -> '\n'
|
||||
case 114: return "\r"; // 'r' -> '\r'
|
||||
case 120: return String.fromCharCode(this.readHexChar(2)); // 'x'
|
||||
case 117: return codePointToString(this.readCodePoint()); // 'u'
|
||||
case 116: return "\t"; // 't' -> '\t'
|
||||
case 98: return "\b"; // 'b' -> '\b'
|
||||
case 118: return "\u000b"; // 'v' -> '\u000b'
|
||||
case 102: return "\f"; // 'f' -> '\f'
|
||||
case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n'
|
||||
case 10: // ' \n'
|
||||
if (this.options.locations) {
|
||||
this.lineStart = this.pos;
|
||||
++this.curLine;
|
||||
}
|
||||
return "";
|
||||
default:
|
||||
if (ch >= 48 && ch <= 55) {
|
||||
let octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
|
||||
let octal = parseInt(octalStr, 8);
|
||||
if (octal > 255) {
|
||||
octalStr = octalStr.slice(0, -1);
|
||||
octal = parseInt(octalStr, 8);
|
||||
}
|
||||
if (octal > 0 && (this.strict || inTemplate)) {
|
||||
this.raise(this.pos - 2, "Octal literal in strict mode");
|
||||
}
|
||||
this.pos += octalStr.length - 1;
|
||||
return String.fromCharCode(octal);
|
||||
}
|
||||
return String.fromCharCode(ch);
|
||||
}
|
||||
};
|
||||
|
||||
// Used to read character escape sequences ('\x', '\u', '\U').
|
||||
|
||||
pp.readHexChar = function (len) {
|
||||
let codePos = this.pos;
|
||||
let n = this.readInt(16, len);
|
||||
if (n === null) this.raise(codePos, "Bad character escape sequence");
|
||||
return n;
|
||||
};
|
||||
|
||||
// Used to signal to callers of `readWord1` whether the word
|
||||
// contained any escape sequences. This is needed because words with
|
||||
// escape sequences must not be interpreted as keywords.
|
||||
|
||||
var containsEsc;
|
||||
|
||||
// Read an identifier, and return it as a string. Sets `containsEsc`
|
||||
// to whether the word contained a '\u' escape.
|
||||
//
|
||||
// Incrementally adds only escaped chars, adding other chunks as-is
|
||||
// as a micro-optimization.
|
||||
|
||||
pp.readWord1 = function () {
|
||||
containsEsc = false;
|
||||
let word = "", first = true, chunkStart = this.pos;
|
||||
while (this.pos < this.input.length) {
|
||||
let ch = this.fullCharCodeAtPos();
|
||||
if (isIdentifierChar(ch, true)) {
|
||||
this.pos += ch <= 0xffff ? 1 : 2;
|
||||
} else if (ch === 92) { // "\"
|
||||
containsEsc = true;
|
||||
|
||||
word += this.input.slice(chunkStart, this.pos);
|
||||
let escStart = this.pos;
|
||||
|
||||
if (this.input.charCodeAt(++this.pos) !== 117) { // "u"
|
||||
this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX");
|
||||
}
|
||||
|
||||
++this.pos;
|
||||
let esc = this.readCodePoint();
|
||||
if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) {
|
||||
this.raise(escStart, "Invalid Unicode escape");
|
||||
}
|
||||
|
||||
word += codePointToString(esc);
|
||||
chunkStart = this.pos;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
return word + this.input.slice(chunkStart, this.pos);
|
||||
};
|
||||
|
||||
// Read an identifier or keyword token. Will check for reserved
|
||||
// words when necessary.
|
||||
|
||||
pp.readWord = function () {
|
||||
let word = this.readWord1();
|
||||
let type = tt.name;
|
||||
if (!containsEsc && this.isKeyword(word))
|
||||
type = keywordTypes[word];
|
||||
return this.finishToken(type, word);
|
||||
};
|
||||
6
src/tokencontext.js → src/tokenizer/context.js
Executable file → Normal file
6
src/tokencontext.js → src/tokenizer/context.js
Executable file → Normal file
@ -2,9 +2,9 @@
|
||||
// given point in the program is loosely based on sweet.js' approach.
|
||||
// See https://github.com/mozilla/sweet.js/wiki/design
|
||||
|
||||
import { Parser } from "./state";
|
||||
import { types as tt } from "./tokentype";
|
||||
import { lineBreak } from "./whitespace";
|
||||
import { Parser } from "../state";
|
||||
import { types as tt } from "./types";
|
||||
import { lineBreak } from "../util/whitespace";
|
||||
|
||||
export class TokContext {
|
||||
constructor(token, isExpr, preserveSpace, override) {
|
||||
756
src/tokenizer/index.js
Normal file
756
src/tokenizer/index.js
Normal file
@ -0,0 +1,756 @@
|
||||
import { isIdentifierStart, isIdentifierChar } from "../util/identifier";
|
||||
import { types as tt, keywords as keywordTypes } from "./types";
|
||||
import { SourceLocation } from "../locutil";
|
||||
import { lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace } from "../util/whitespace";
|
||||
|
||||
// Object type used to represent tokens. Note that normally, tokens
|
||||
// simply exist as properties on the parser object. This is only
|
||||
// used for the onToken callback and the external tokenizer.
|
||||
|
||||
export class Token {
|
||||
constructor(p) {
|
||||
this.type = p.type;
|
||||
this.value = p.value;
|
||||
this.start = p.start;
|
||||
this.end = p.end;
|
||||
|
||||
this.loc = new SourceLocation(p.startLoc, p.endLoc);
|
||||
}
|
||||
}
|
||||
|
||||
// ## Tokenizer
|
||||
|
||||
// Are we running under Rhino?
|
||||
/* global Packages */
|
||||
const isRhino = typeof Packages === "object" && Object.prototype.toString.call(Packages) === "[object JavaPackage]";
|
||||
|
||||
// Parse a regular expression. Some context-awareness is necessary,
|
||||
// since a '/' inside a '[]' set does not end the expression.
|
||||
|
||||
function tryCreateRegexp(src, flags, throwErrorStart) {
|
||||
try {
|
||||
return new RegExp(src, flags);
|
||||
} catch (e) {
|
||||
if (throwErrorStart !== undefined) {
|
||||
if (e instanceof SyntaxError) this.raise(throwErrorStart, "Error parsing regular expression: " + e.message);
|
||||
this.raise(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var regexpUnicodeSupport = !!tryCreateRegexp("\uffff", "u");
|
||||
|
||||
function codePointToString(code) {
|
||||
// UTF-16 Decoding
|
||||
if (code <= 0xFFFF) return String.fromCharCode(code);
|
||||
return String.fromCharCode(((code - 0x10000) >> 10) + 0xD800, ((code - 0x10000) & 1023) + 0xDC00);
|
||||
}
|
||||
|
||||
// Used to signal to callers of `readWord1` whether the word
|
||||
// contained any escape sequences. This is needed because words with
|
||||
// escape sequences must not be interpreted as keywords.
|
||||
|
||||
var containsEsc;
|
||||
|
||||
export default class Tokenizer {
|
||||
constructor() {
|
||||
// The current position of the tokenizer in the input.
|
||||
this.pos = this.lineStart = 0;
|
||||
this.curLine = 1;
|
||||
|
||||
// Properties of the current token:
|
||||
// Its type
|
||||
this.type = tt.eof;
|
||||
// For tokens that include more information than their type, the value
|
||||
this.value = null;
|
||||
// Its start and end offset
|
||||
this.start = this.end = this.pos;
|
||||
// And, if locations are used, the {line, column} object
|
||||
// corresponding to those offsets
|
||||
this.startLoc = this.endLoc = this.curPosition();
|
||||
|
||||
// Position information for the previous token
|
||||
this.lastTokEndLoc = this.lastTokStartLoc = null;
|
||||
this.lastTokStart = this.lastTokEnd = this.pos;
|
||||
|
||||
// The context stack is used to superficially track syntactic
|
||||
// context to predict whether a regular expression is allowed in a
|
||||
// given position.
|
||||
this.context = this.initialContext();
|
||||
this.exprAllowed = true;
|
||||
}
|
||||
|
||||
// Move to the next token
|
||||
|
||||
next() {
|
||||
if (!this.isLookahead) {
|
||||
this.tokens.push(new Token(this));
|
||||
}
|
||||
|
||||
this.lastTokEnd = this.end;
|
||||
this.lastTokStart = this.start;
|
||||
this.lastTokEndLoc = this.endLoc;
|
||||
this.lastTokStartLoc = this.startLoc;
|
||||
this.nextToken();
|
||||
};
|
||||
|
||||
getToken() {
|
||||
this.next();
|
||||
return new Token(this);
|
||||
}
|
||||
|
||||
// Toggle strict mode. Re-reads the next number or string to please
|
||||
// pedantic tests (`"use strict"; 010;` should fail).
|
||||
|
||||
setStrict(strict) {
|
||||
this.strict = strict;
|
||||
if (this.type !== tt.num && this.type !== tt.string) return;
|
||||
this.pos = this.start;
|
||||
while (this.pos < this.lineStart) {
|
||||
this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
|
||||
--this.curLine;
|
||||
}
|
||||
this.nextToken();
|
||||
}
|
||||
|
||||
curContext() {
|
||||
return this.context[this.context.length - 1];
|
||||
}
|
||||
|
||||
// Read a single token, updating the parser object's token-related
|
||||
// properties.
|
||||
|
||||
nextToken() {
|
||||
let curContext = this.curContext();
|
||||
if (!curContext || !curContext.preserveSpace) this.skipSpace();
|
||||
|
||||
this.start = this.pos;
|
||||
this.startLoc = this.curPosition();
|
||||
if (this.pos >= this.input.length) return this.finishToken(tt.eof);
|
||||
|
||||
if (curContext.override) {
|
||||
return curContext.override(this);
|
||||
} else {
|
||||
return this.readToken(this.fullCharCodeAtPos());
|
||||
}
|
||||
}
|
||||
|
||||
readToken(code) {
|
||||
// Identifier or keyword. '\uXXXX' sequences are allowed in
|
||||
// identifiers, so '\' also dispatches to that.
|
||||
if (isIdentifierStart(code, true) || code === 92 /* '\' */)
|
||||
return this.readWord();
|
||||
|
||||
return this.getTokenFromCode(code);
|
||||
}
|
||||
|
||||
fullCharCodeAtPos() {
|
||||
let code = this.input.charCodeAt(this.pos);
|
||||
if (code <= 0xd7ff || code >= 0xe000) return code;
|
||||
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
return (code << 10) + next - 0x35fdc00;
|
||||
}
|
||||
|
||||
pushComment(block, text, start, end, startLoc, endLoc) {
|
||||
var comment = {
|
||||
type: block ? "CommentBlock" : "CommentLine",
|
||||
value: text,
|
||||
start: start,
|
||||
end: end,
|
||||
loc: new SourceLocation(startLoc, endLoc),
|
||||
range: [start, end]
|
||||
};
|
||||
|
||||
this.tokens.push(comment);
|
||||
this.comments.push(comment);
|
||||
this.addComment(comment);
|
||||
}
|
||||
|
||||
skipBlockComment() {
|
||||
let startLoc = this.curPosition();
|
||||
let start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
|
||||
if (end === -1) this.raise(this.pos - 2, "Unterminated comment");
|
||||
|
||||
this.pos = end + 2;
|
||||
lineBreakG.lastIndex = start;
|
||||
let match;
|
||||
while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
|
||||
++this.curLine;
|
||||
this.lineStart = match.index + match[0].length;
|
||||
}
|
||||
|
||||
this.pushComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition());
|
||||
}
|
||||
|
||||
skipLineComment(startSkip) {
|
||||
let start = this.pos;
|
||||
let startLoc = this.curPosition();
|
||||
let ch = this.input.charCodeAt(this.pos += startSkip);
|
||||
while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
|
||||
++this.pos;
|
||||
ch = this.input.charCodeAt(this.pos);
|
||||
}
|
||||
|
||||
this.pushComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition());
|
||||
}
|
||||
|
||||
// Called at the start of the parse and after every token. Skips
|
||||
// whitespace and comments, and.
|
||||
|
||||
skipSpace() {
|
||||
loop: while (this.pos < this.input.length) {
|
||||
let ch = this.input.charCodeAt(this.pos);
|
||||
switch (ch) {
|
||||
case 32: case 160: // ' '
|
||||
++this.pos;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
if (this.input.charCodeAt(this.pos + 1) === 10) {
|
||||
++this.pos;
|
||||
}
|
||||
|
||||
case 10: case 8232: case 8233:
|
||||
++this.pos;
|
||||
++this.curLine;
|
||||
this.lineStart = this.pos;
|
||||
break;
|
||||
|
||||
case 47: // '/'
|
||||
switch (this.input.charCodeAt(this.pos + 1)) {
|
||||
case 42: // '*'
|
||||
this.skipBlockComment();
|
||||
break;
|
||||
|
||||
case 47:
|
||||
this.skipLineComment(2);
|
||||
break;
|
||||
|
||||
default:
|
||||
break loop;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
|
||||
++this.pos;
|
||||
} else {
|
||||
break loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called at the end of every token. Sets `end`, `val`, and
|
||||
// maintains `context` and `exprAllowed`, and skips the space after
|
||||
// the token, so that the next one's `start` will point at the
|
||||
// right position.
|
||||
|
||||
finishToken(type, val) {
|
||||
this.end = this.pos;
|
||||
this.endLoc = this.curPosition();
|
||||
let prevType = this.type;
|
||||
this.type = type;
|
||||
this.value = val;
|
||||
|
||||
this.updateContext(prevType);
|
||||
}
|
||||
|
||||
// ### Token reading
|
||||
|
||||
// This is the function that is called to fetch the next token. It
|
||||
// is somewhat obscure, because it works in character codes rather
|
||||
// than characters, and because operator parsing has been inlined
|
||||
// into it.
|
||||
//
|
||||
// All in the name of speed.
|
||||
//
|
||||
readToken_dot() {
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (next >= 48 && next <= 57) return this.readNumber(true);
|
||||
|
||||
let next2 = this.input.charCodeAt(this.pos + 2);
|
||||
if (next === 46 && next2 === 46) { // 46 = dot '.'
|
||||
this.pos += 3;
|
||||
return this.finishToken(tt.ellipsis);
|
||||
} else {
|
||||
++this.pos;
|
||||
return this.finishToken(tt.dot);
|
||||
}
|
||||
}
|
||||
|
||||
readToken_slash() { // '/'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (this.exprAllowed) {
|
||||
++this.pos;
|
||||
return this.readRegexp();
|
||||
}
|
||||
if (next === 61) return this.finishOp(tt.assign, 2);
|
||||
return this.finishOp(tt.slash, 1);
|
||||
}
|
||||
|
||||
readToken_mult_modulo(code) { // '%*'
|
||||
var type = code === 42 ? tt.star : tt.modulo;
|
||||
var width = 1;
|
||||
var next = this.input.charCodeAt(this.pos + 1);
|
||||
|
||||
if (next === 42 && this.options.features["es7.exponentiationOperator"]) { // '*'
|
||||
width++;
|
||||
next = this.input.charCodeAt(this.pos + 2);
|
||||
type = tt.exponent;
|
||||
}
|
||||
|
||||
if (next === 61) {
|
||||
width++;
|
||||
type = tt.assign;
|
||||
}
|
||||
|
||||
return this.finishOp(type, width);
|
||||
}
|
||||
|
||||
readToken_pipe_amp(code) { // '|&'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2);
|
||||
if (next === 61) return this.finishOp(tt.assign, 2);
|
||||
return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1);
|
||||
}
|
||||
|
||||
readToken_caret() { // '^'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (next === 61) {
|
||||
return this.finishOp(tt.assign, 2);
|
||||
} else {
|
||||
return this.finishOp(tt.bitwiseXOR, 1);
|
||||
}
|
||||
}
|
||||
|
||||
readToken_plus_min(code) { // '+-'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
|
||||
if (next === code) {
|
||||
if (next === 45 && this.input.charCodeAt(this.pos + 2) === 62 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
|
||||
// A `-->` line comment
|
||||
this.skipLineComment(3);
|
||||
this.skipSpace();
|
||||
return this.nextToken();
|
||||
}
|
||||
return this.finishOp(tt.incDec, 2);
|
||||
}
|
||||
|
||||
if (next === 61) {
|
||||
return this.finishOp(tt.assign, 2);
|
||||
} else {
|
||||
return this.finishOp(tt.plusMin, 1);
|
||||
}
|
||||
}
|
||||
|
||||
readToken_lt_gt(code) { // '<>'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
let size = 1;
|
||||
|
||||
if (next === code) {
|
||||
size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
|
||||
if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1);
|
||||
return this.finishOp(tt.bitShift, size);
|
||||
}
|
||||
|
||||
if (next === 33 && code === 60 && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
|
||||
if (this.inModule) this.unexpected();
|
||||
// `<!--`, an XML-style comment that should be interpreted as a line comment
|
||||
this.skipLineComment(4);
|
||||
this.skipSpace();
|
||||
return this.nextToken();
|
||||
}
|
||||
|
||||
if (next === 61) {
|
||||
size = this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2;
|
||||
}
|
||||
|
||||
return this.finishOp(tt.relational, size);
|
||||
}
|
||||
|
||||
readToken_eq_excl(code) { // '=!'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
|
||||
if (code === 61 && next === 62) { // '=>'
|
||||
this.pos += 2;
|
||||
return this.finishToken(tt.arrow);
|
||||
}
|
||||
return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1);
|
||||
}
|
||||
|
||||
getTokenFromCode(code) {
|
||||
switch (code) {
|
||||
// The interpretation of a dot depends on whether it is followed
|
||||
// by a digit or another two dots.
|
||||
case 46: // '.'
|
||||
return this.readToken_dot();
|
||||
|
||||
// Punctuation tokens.
|
||||
case 40: ++this.pos; return this.finishToken(tt.parenL);
|
||||
case 41: ++this.pos; return this.finishToken(tt.parenR);
|
||||
case 59: ++this.pos; return this.finishToken(tt.semi);
|
||||
case 44: ++this.pos; return this.finishToken(tt.comma);
|
||||
case 91: ++this.pos; return this.finishToken(tt.bracketL);
|
||||
case 93: ++this.pos; return this.finishToken(tt.bracketR);
|
||||
case 123: ++this.pos; return this.finishToken(tt.braceL);
|
||||
case 125: ++this.pos; return this.finishToken(tt.braceR);
|
||||
|
||||
case 58:
|
||||
if (this.options.features["es7.functionBind"] && this.input.charCodeAt(this.pos + 1) === 58) {
|
||||
return this.finishOp(tt.doubleColon, 2);
|
||||
} else {
|
||||
++this.pos;
|
||||
return this.finishToken(tt.colon);
|
||||
}
|
||||
|
||||
case 63: ++this.pos; return this.finishToken(tt.question);
|
||||
case 64: ++this.pos; return this.finishToken(tt.at);
|
||||
|
||||
case 96: // '`'
|
||||
++this.pos;
|
||||
return this.finishToken(tt.backQuote);
|
||||
|
||||
case 48: // '0'
|
||||
let next = this.input.charCodeAt(this.pos + 1);
|
||||
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 === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
|
||||
// Anything else beginning with a digit is an integer, octal
|
||||
// number, or float.
|
||||
case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
|
||||
return this.readNumber(false);
|
||||
|
||||
// Quotes produce strings.
|
||||
case 34: case 39: // '"', "'"
|
||||
return this.readString(code);
|
||||
|
||||
// Operators are parsed inline in tiny state machines. '=' (61) is
|
||||
// often referred to. `finishOp` simply skips the amount of
|
||||
// characters it is given as second argument, and returns a token
|
||||
// of the type given by its first argument.
|
||||
|
||||
case 47: // '/'
|
||||
return this.readToken_slash();
|
||||
|
||||
case 37: case 42: // '%*'
|
||||
return this.readToken_mult_modulo(code);
|
||||
|
||||
case 124: case 38: // '|&'
|
||||
return this.readToken_pipe_amp(code);
|
||||
|
||||
case 94: // '^'
|
||||
return this.readToken_caret();
|
||||
|
||||
case 43: case 45: // '+-'
|
||||
return this.readToken_plus_min(code);
|
||||
|
||||
case 60: case 62: // '<>'
|
||||
return this.readToken_lt_gt(code);
|
||||
|
||||
case 61: case 33: // '=!'
|
||||
return this.readToken_eq_excl(code);
|
||||
|
||||
case 126: // '~'
|
||||
return this.finishOp(tt.prefix, 1);
|
||||
}
|
||||
|
||||
this.raise(this.pos, `Unexpected character '${codePointToString(code)}'`);
|
||||
}
|
||||
|
||||
finishOp(type, size) {
|
||||
let str = this.input.slice(this.pos, this.pos + size);
|
||||
this.pos += size;
|
||||
return this.finishToken(type, str);
|
||||
}
|
||||
|
||||
readRegexp() {
|
||||
let escaped, inClass, start = this.pos;
|
||||
for (;;) {
|
||||
if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
|
||||
let ch = this.input.charAt(this.pos);
|
||||
if (lineBreak.test(ch)) this.raise(start, "Unterminated regular expression");
|
||||
if (escaped) {
|
||||
escaped = false;
|
||||
} else {
|
||||
if (ch === "[") inClass = true;
|
||||
else if (ch === "]" && inClass) inClass = false;
|
||||
else if (ch === "/" && !inClass) break;
|
||||
escaped = ch === "\\";
|
||||
}
|
||||
++this.pos;
|
||||
}
|
||||
let content = this.input.slice(start, this.pos);
|
||||
++this.pos;
|
||||
// Need to use `readWord1` because '\uXXXX' sequences are allowed
|
||||
// here (don't ask).
|
||||
let mods = this.readWord1();
|
||||
let tmp = content;
|
||||
if (mods) {
|
||||
let validFlags = /^[gmsiyu]*$/;
|
||||
if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
|
||||
if (mods.indexOf("u") >= 0 && !regexpUnicodeSupport) {
|
||||
// Replace each astral symbol and every Unicode escape sequence that
|
||||
// possibly represents an astral symbol or a paired surrogate with a
|
||||
// single ASCII symbol to avoid throwing on regular expressions that
|
||||
// are only valid in combination with the `/u` flag.
|
||||
// Note: replacing with the ASCII symbol `x` might cause false
|
||||
// negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
|
||||
// perfectly valid pattern that is equivalent to `[a-b]`, but it would
|
||||
// be replaced by `[x-b]` which throws an error.
|
||||
tmp = tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g, (match, code, offset) => {
|
||||
code = Number("0x" + code);
|
||||
if (code > 0x10FFFF) this.raise(start + offset + 3, "Code point out of bounds");
|
||||
return "x";
|
||||
});
|
||||
tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x");
|
||||
}
|
||||
}
|
||||
// Detect invalid regular expressions.
|
||||
let value = null;
|
||||
// Rhino's regular expression parser is flaky and throws uncatchable exceptions,
|
||||
// so don't do detection if we are running under Rhino
|
||||
if (!isRhino) {
|
||||
tryCreateRegexp.call(this, tmp, undefined, start);
|
||||
// Get a regular expression object for this pattern-flag pair, or `null` in
|
||||
// case the current environment doesn't support the flags it uses.
|
||||
value = tryCreateRegexp.call(this, content, mods);
|
||||
}
|
||||
return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value});
|
||||
}
|
||||
|
||||
// Read an integer in the given radix. Return null if zero digits
|
||||
// were read, the integer value otherwise. When `len` is given, this
|
||||
// will return `null` unless the integer has exactly `len` digits.
|
||||
|
||||
readInt(radix, len) {
|
||||
let start = this.pos, total = 0;
|
||||
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
|
||||
let code = this.input.charCodeAt(this.pos), val;
|
||||
if (code >= 97) val = code - 97 + 10; // a
|
||||
else if (code >= 65) val = code - 65 + 10; // A
|
||||
else if (code >= 48 && code <= 57) val = code - 48; // 0-9
|
||||
else val = Infinity;
|
||||
if (val >= radix) break;
|
||||
++this.pos;
|
||||
total = total * radix + val;
|
||||
}
|
||||
if (this.pos === start || len != null && this.pos - start !== len) return null;
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
readRadixNumber(radix) {
|
||||
this.pos += 2; // 0x
|
||||
let val = this.readInt(radix);
|
||||
if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix);
|
||||
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
|
||||
return this.finishToken(tt.num, val);
|
||||
}
|
||||
|
||||
// Read an integer, octal integer, or floating-point number.
|
||||
|
||||
readNumber(startsWithDot) {
|
||||
let start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48;
|
||||
if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
|
||||
let next = this.input.charCodeAt(this.pos);
|
||||
if (next === 46) { // '.'
|
||||
++this.pos;
|
||||
this.readInt(10);
|
||||
isFloat = true;
|
||||
next = this.input.charCodeAt(this.pos);
|
||||
}
|
||||
if (next === 69 || next === 101) { // 'eE'
|
||||
next = this.input.charCodeAt(++this.pos);
|
||||
if (next === 43 || next === 45) ++this.pos; // '+-'
|
||||
if (this.readInt(10) === null) this.raise(start, "Invalid number");
|
||||
isFloat = true;
|
||||
}
|
||||
if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
|
||||
|
||||
let str = this.input.slice(start, this.pos), val;
|
||||
if (isFloat) val = parseFloat(str);
|
||||
else if (!octal || str.length === 1) val = parseInt(str, 10);
|
||||
else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number");
|
||||
else val = parseInt(str, 8);
|
||||
return this.finishToken(tt.num, val);
|
||||
}
|
||||
|
||||
// Read a string value, interpreting backslash-escapes.
|
||||
|
||||
readCodePoint() {
|
||||
let ch = this.input.charCodeAt(this.pos), code;
|
||||
|
||||
if (ch === 123) {
|
||||
let codePos = ++this.pos;
|
||||
code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
|
||||
++this.pos;
|
||||
if (code > 0x10FFFF) this.raise(codePos, "Code point out of bounds");
|
||||
} else {
|
||||
code = this.readHexChar(4);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
readString(quote) {
|
||||
let out = "", chunkStart = ++this.pos;
|
||||
for (;;) {
|
||||
if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant");
|
||||
let ch = this.input.charCodeAt(this.pos);
|
||||
if (ch === quote) break;
|
||||
if (ch === 92) { // '\'
|
||||
out += this.input.slice(chunkStart, this.pos);
|
||||
out += this.readEscapedChar(false);
|
||||
chunkStart = this.pos;
|
||||
} else {
|
||||
if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant");
|
||||
++this.pos;
|
||||
}
|
||||
}
|
||||
out += this.input.slice(chunkStart, this.pos++);
|
||||
return this.finishToken(tt.string, out);
|
||||
}
|
||||
|
||||
// Reads template string tokens.
|
||||
|
||||
readTmplToken() {
|
||||
let out = "", chunkStart = this.pos;
|
||||
for (;;) {
|
||||
if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template");
|
||||
let ch = this.input.charCodeAt(this.pos);
|
||||
if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${'
|
||||
if (this.pos === this.start && this.type === tt.template) {
|
||||
if (ch === 36) {
|
||||
this.pos += 2;
|
||||
return this.finishToken(tt.dollarBraceL);
|
||||
} else {
|
||||
++this.pos;
|
||||
return this.finishToken(tt.backQuote);
|
||||
}
|
||||
}
|
||||
out += this.input.slice(chunkStart, this.pos);
|
||||
return this.finishToken(tt.template, out);
|
||||
}
|
||||
if (ch === 92) { // '\'
|
||||
out += this.input.slice(chunkStart, this.pos);
|
||||
out += this.readEscapedChar(true);
|
||||
chunkStart = this.pos;
|
||||
} else if (isNewLine(ch)) {
|
||||
out += this.input.slice(chunkStart, this.pos);
|
||||
++this.pos;
|
||||
switch (ch) {
|
||||
case 13:
|
||||
if (this.input.charCodeAt(this.pos) === 10) ++this.pos;
|
||||
case 10:
|
||||
out += "\n";
|
||||
break;
|
||||
default:
|
||||
out += String.fromCharCode(ch);
|
||||
break;
|
||||
}
|
||||
++this.curLine;
|
||||
this.lineStart = this.pos;
|
||||
chunkStart = this.pos;
|
||||
} else {
|
||||
++this.pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Used to read escaped characters
|
||||
|
||||
readEscapedChar(inTemplate) {
|
||||
let ch = this.input.charCodeAt(++this.pos);
|
||||
++this.pos;
|
||||
switch (ch) {
|
||||
case 110: return "\n"; // 'n' -> '\n'
|
||||
case 114: return "\r"; // 'r' -> '\r'
|
||||
case 120: return String.fromCharCode(this.readHexChar(2)); // 'x'
|
||||
case 117: return codePointToString(this.readCodePoint()); // 'u'
|
||||
case 116: return "\t"; // 't' -> '\t'
|
||||
case 98: return "\b"; // 'b' -> '\b'
|
||||
case 118: return "\u000b"; // 'v' -> '\u000b'
|
||||
case 102: return "\f"; // 'f' -> '\f'
|
||||
case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n'
|
||||
case 10: // ' \n'
|
||||
this.lineStart = this.pos;
|
||||
++this.curLine;
|
||||
return "";
|
||||
default:
|
||||
if (ch >= 48 && ch <= 55) {
|
||||
let octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0];
|
||||
let octal = parseInt(octalStr, 8);
|
||||
if (octal > 255) {
|
||||
octalStr = octalStr.slice(0, -1);
|
||||
octal = parseInt(octalStr, 8);
|
||||
}
|
||||
if (octal > 0 && (this.strict || inTemplate)) {
|
||||
this.raise(this.pos - 2, "Octal literal in strict mode");
|
||||
}
|
||||
this.pos += octalStr.length - 1;
|
||||
return String.fromCharCode(octal);
|
||||
}
|
||||
return String.fromCharCode(ch);
|
||||
}
|
||||
}
|
||||
|
||||
// Used to read character escape sequences ('\x', '\u', '\U').
|
||||
|
||||
readHexChar(len) {
|
||||
let codePos = this.pos;
|
||||
let n = this.readInt(16, len);
|
||||
if (n === null) this.raise(codePos, "Bad character escape sequence");
|
||||
return n;
|
||||
}
|
||||
|
||||
// Read an identifier, and return it as a string. Sets `containsEsc`
|
||||
// to whether the word contained a '\u' escape.
|
||||
//
|
||||
// Incrementally adds only escaped chars, adding other chunks as-is
|
||||
// as a micro-optimization.
|
||||
|
||||
readWord1() {
|
||||
containsEsc = false;
|
||||
let word = "", first = true, chunkStart = this.pos;
|
||||
while (this.pos < this.input.length) {
|
||||
let ch = this.fullCharCodeAtPos();
|
||||
if (isIdentifierChar(ch, true)) {
|
||||
this.pos += ch <= 0xffff ? 1 : 2;
|
||||
} else if (ch === 92) { // "\"
|
||||
containsEsc = true;
|
||||
|
||||
word += this.input.slice(chunkStart, this.pos);
|
||||
let escStart = this.pos;
|
||||
|
||||
if (this.input.charCodeAt(++this.pos) !== 117) { // "u"
|
||||
this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX");
|
||||
}
|
||||
|
||||
++this.pos;
|
||||
let esc = this.readCodePoint();
|
||||
if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) {
|
||||
this.raise(escStart, "Invalid Unicode escape");
|
||||
}
|
||||
|
||||
word += codePointToString(esc);
|
||||
chunkStart = this.pos;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
return word + this.input.slice(chunkStart, this.pos);
|
||||
}
|
||||
|
||||
// Read an identifier or keyword token. Will check for reserved
|
||||
// words when necessary.
|
||||
|
||||
readWord() {
|
||||
let word = this.readWord1();
|
||||
let type = tt.name;
|
||||
if (!containsEsc && this.isKeyword(word))
|
||||
type = keywordTypes[word];
|
||||
return this.finishToken(type, word);
|
||||
}
|
||||
}
|
||||
0
src/tokentype.js → src/tokenizer/types.js
Executable file → Normal file
0
src/tokentype.js → src/tokenizer/types.js
Executable file → Normal file
@ -1,5 +0,0 @@
|
||||
// Checks if an object has a property.
|
||||
|
||||
export function has(obj, propName) {
|
||||
return Object.prototype.hasOwnProperty.call(obj, propName);
|
||||
}
|
||||
9
src/identifier.js → src/util/identifier.js
Executable file → Normal file
9
src/identifier.js → src/util/identifier.js
Executable file → Normal file
@ -17,8 +17,6 @@ function makePredicate(words) {
|
||||
// Reserved word lists for various dialects of the language
|
||||
|
||||
export const reservedWords = {
|
||||
3: makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),
|
||||
5: makePredicate("class enum extends super const export import"),
|
||||
6: makePredicate("enum await"),
|
||||
strict: makePredicate("implements interface let package private protected public static yield"),
|
||||
strictBind: makePredicate("eval arguments")
|
||||
@ -26,12 +24,7 @@ export const reservedWords = {
|
||||
|
||||
// And the keywords
|
||||
|
||||
var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
|
||||
|
||||
export const keywords = {
|
||||
5: makePredicate(ecma5AndLessKeywords),
|
||||
6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super")
|
||||
};
|
||||
export const isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super");
|
||||
|
||||
// ## Character categories
|
||||
|
||||
1
src/whitespace.js → src/util/whitespace.js
Executable file → Normal file
1
src/whitespace.js → src/util/whitespace.js
Executable file → Normal file
@ -9,4 +9,3 @@ export function isNewLine(code) {
|
||||
}
|
||||
|
||||
export const nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
|
||||
|
||||
@ -1,53 +1,52 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 26,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 26,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "BlockStatement",
|
||||
"start": 0,
|
||||
"end": 26,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"name": "a",
|
||||
"range": [
|
||||
6,
|
||||
7
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"arguments": [],
|
||||
"range": [
|
||||
6,
|
||||
9
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 7
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
10
|
||||
],
|
||||
"start": 6,
|
||||
"end": 10,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -58,14 +57,44 @@
|
||||
"column": 8
|
||||
}
|
||||
},
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"start": 6,
|
||||
"end": 9,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
"end": 7,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"arguments": []
|
||||
},
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "comment",
|
||||
"range": [
|
||||
15,
|
||||
24
|
||||
],
|
||||
"start": 15,
|
||||
"end": 24,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -75,51 +104,24 @@
|
||||
"line": 3,
|
||||
"column": 13
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
24
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
0,
|
||||
26
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
26
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "comment",
|
||||
"range": [
|
||||
15,
|
||||
24
|
||||
],
|
||||
"start": 15,
|
||||
"end": 24,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -129,7 +131,11 @@
|
||||
"line": 3,
|
||||
"column": 13
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
24
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,71 +1,37 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 30,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 30,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "IfStatement",
|
||||
"test": {
|
||||
"type": "Identifier",
|
||||
"name": "a",
|
||||
"range": [
|
||||
25,
|
||||
26
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 15
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " bar ",
|
||||
"range": [
|
||||
14,
|
||||
23
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 13
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"consequent": {
|
||||
"type": "BlockStatement",
|
||||
"body": [],
|
||||
"range": [
|
||||
28,
|
||||
30
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 18
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 20
|
||||
}
|
||||
}
|
||||
},
|
||||
"alternate": null,
|
||||
"range": [
|
||||
10,
|
||||
30
|
||||
],
|
||||
"start": 10,
|
||||
"end": 30,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -76,14 +42,67 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"type": "Identifier",
|
||||
"start": 25,
|
||||
"end": 26,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 15
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"name": "a",
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " bar ",
|
||||
"start": 14,
|
||||
"end": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
23
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"consequent": {
|
||||
"type": "BlockStatement",
|
||||
"start": 28,
|
||||
"end": 30,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 18
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"body": []
|
||||
},
|
||||
"alternate": null,
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " foo ",
|
||||
"range": [
|
||||
0,
|
||||
9
|
||||
],
|
||||
"start": 0,
|
||||
"end": 9,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -93,35 +112,22 @@
|
||||
"line": 1,
|
||||
"column": 9
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
9
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
30
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 20
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " foo ",
|
||||
"range": [
|
||||
0,
|
||||
9
|
||||
],
|
||||
"start": 0,
|
||||
"end": 9,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -131,15 +137,17 @@
|
||||
"line": 1,
|
||||
"column": 9
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
9
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " bar ",
|
||||
"range": [
|
||||
14,
|
||||
23
|
||||
],
|
||||
"start": 14,
|
||||
"end": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -149,7 +157,11 @@
|
||||
"line": 2,
|
||||
"column": 13
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
23
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,149 +1,37 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 121,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 10,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 121,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 10,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
"type": "ExportDefaultDeclaration",
|
||||
"declaration": {
|
||||
"type": "ClassExpression",
|
||||
"id": null,
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"body": [
|
||||
{
|
||||
"type": "MethodDefinition",
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"name": "method1",
|
||||
"range": [
|
||||
103,
|
||||
110
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 8,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 8,
|
||||
"column": 11
|
||||
}
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "FunctionExpression",
|
||||
"id": null,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"body": [],
|
||||
"range": [
|
||||
112,
|
||||
119
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 8,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"range": [
|
||||
110,
|
||||
119
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 8,
|
||||
"column": 11
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"kind": "method",
|
||||
"computed": false,
|
||||
"range": [
|
||||
103,
|
||||
119
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 8,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": "*\n * this is method1.\n ",
|
||||
"range": [
|
||||
63,
|
||||
98
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"static": false
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
57,
|
||||
121
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 21
|
||||
},
|
||||
"end": {
|
||||
"line": 10,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
51,
|
||||
121
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 15
|
||||
},
|
||||
"end": {
|
||||
"line": 10,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
121
|
||||
],
|
||||
"start": 36,
|
||||
"end": 121,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -154,14 +42,140 @@
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"declaration": {
|
||||
"type": "ClassExpression",
|
||||
"start": 51,
|
||||
"end": 121,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 15
|
||||
},
|
||||
"end": {
|
||||
"line": 10,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": null,
|
||||
"superClass": null,
|
||||
"body": {
|
||||
"type": "ClassBody",
|
||||
"start": 57,
|
||||
"end": 121,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 21
|
||||
},
|
||||
"end": {
|
||||
"line": 10,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "MethodDefinition",
|
||||
"start": 103,
|
||||
"end": 119,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 8,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 103,
|
||||
"end": 110,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 8,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 8,
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"name": "method1",
|
||||
"leadingComments": null
|
||||
},
|
||||
"static": false,
|
||||
"kind": "method",
|
||||
"value": {
|
||||
"type": "FunctionExpression",
|
||||
"start": 110,
|
||||
"end": 119,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 8,
|
||||
"column": 11
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"id": null,
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 112,
|
||||
"end": 119,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 8,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"body": []
|
||||
}
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": "*\n * this is method1.\n ",
|
||||
"start": 63,
|
||||
"end": 98,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
63,
|
||||
98
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"leadingComments": null
|
||||
},
|
||||
"leadingComments": null
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": "*\n * this is anonymous class.\n ",
|
||||
"range": [
|
||||
0,
|
||||
35
|
||||
],
|
||||
"start": 0,
|
||||
"end": 35,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -171,35 +185,22 @@
|
||||
"line": 3,
|
||||
"column": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
35
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"sourceType": "module",
|
||||
"range": [
|
||||
0,
|
||||
121
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 10,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": "*\n * this is anonymous class.\n ",
|
||||
"range": [
|
||||
0,
|
||||
35
|
||||
],
|
||||
"start": 0,
|
||||
"end": 35,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -209,15 +210,17 @@
|
||||
"line": 3,
|
||||
"column": 3
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
35
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": "*\n * this is method1.\n ",
|
||||
"range": [
|
||||
63,
|
||||
98
|
||||
],
|
||||
"start": 63,
|
||||
"end": 98,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
@ -227,7 +230,11 @@
|
||||
"line": 7,
|
||||
"column": 7
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
63,
|
||||
98
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 60,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 60,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start": 0,
|
||||
"end": 60,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "a",
|
||||
"range": [
|
||||
9,
|
||||
10
|
||||
],
|
||||
"start": 9,
|
||||
"end": 10,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -21,54 +55,31 @@
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 13,
|
||||
"end": 60,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"name": "foo",
|
||||
"range": [
|
||||
36,
|
||||
39
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 7
|
||||
}
|
||||
}
|
||||
},
|
||||
"arguments": [],
|
||||
"range": [
|
||||
36,
|
||||
41
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 9
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
42
|
||||
],
|
||||
"start": 36,
|
||||
"end": 42,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -79,14 +90,46 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"start": 36,
|
||||
"end": 41,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start": 36,
|
||||
"end": 39,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
"name": "foo",
|
||||
"leadingComments": null
|
||||
},
|
||||
"arguments": [],
|
||||
"leadingComments": null
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " before ",
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"start": 19,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -96,17 +139,19 @@
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
]
|
||||
}
|
||||
],
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " after ",
|
||||
"range": [
|
||||
47,
|
||||
58
|
||||
],
|
||||
"start": 47,
|
||||
"end": 58,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -116,68 +161,25 @@
|
||||
"line": 4,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
47,
|
||||
58
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
13,
|
||||
60
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"range": [
|
||||
0,
|
||||
60
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
60
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " before ",
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"start": 19,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -187,15 +189,17 @@
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " after ",
|
||||
"range": [
|
||||
47,
|
||||
58
|
||||
],
|
||||
"start": 47,
|
||||
"end": 58,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -205,7 +209,11 @@
|
||||
"line": 4,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
47,
|
||||
58
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 63,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 63,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start": 0,
|
||||
"end": 63,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "a",
|
||||
"range": [
|
||||
9,
|
||||
10
|
||||
],
|
||||
"start": 9,
|
||||
"end": 10,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -21,18 +55,31 @@
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 13,
|
||||
"end": 63,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "DebuggerStatement",
|
||||
"range": [
|
||||
36,
|
||||
45
|
||||
],
|
||||
"start": 36,
|
||||
"end": 45,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -47,10 +94,8 @@
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " before ",
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"start": 19,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -60,17 +105,19 @@
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
]
|
||||
}
|
||||
],
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " after ",
|
||||
"range": [
|
||||
50,
|
||||
61
|
||||
],
|
||||
"start": 50,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -80,68 +127,25 @@
|
||||
"line": 4,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
50,
|
||||
61
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
13,
|
||||
63
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"range": [
|
||||
0,
|
||||
63
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
63
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " before ",
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"start": 19,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -151,15 +155,17 @@
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " after ",
|
||||
"range": [
|
||||
50,
|
||||
61
|
||||
],
|
||||
"start": 50,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -169,7 +175,11 @@
|
||||
"line": 4,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
50,
|
||||
61
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start": 0,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "a",
|
||||
"range": [
|
||||
9,
|
||||
10
|
||||
],
|
||||
"start": 9,
|
||||
"end": 10,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -21,19 +55,31 @@
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 13,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ReturnStatement",
|
||||
"argument": null,
|
||||
"range": [
|
||||
36,
|
||||
43
|
||||
],
|
||||
"start": 36,
|
||||
"end": 43,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -44,14 +90,13 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"argument": null,
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " before ",
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"start": 19,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -61,17 +106,19 @@
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
]
|
||||
}
|
||||
],
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " after ",
|
||||
"range": [
|
||||
48,
|
||||
59
|
||||
],
|
||||
"start": 48,
|
||||
"end": 59,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -81,68 +128,25 @@
|
||||
"line": 4,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
48,
|
||||
59
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
13,
|
||||
61
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"range": [
|
||||
0,
|
||||
61
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
61
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " before ",
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"start": 19,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -152,15 +156,17 @@
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " after ",
|
||||
"range": [
|
||||
48,
|
||||
59
|
||||
],
|
||||
"start": 48,
|
||||
"end": 59,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -170,7 +176,11 @@
|
||||
"line": 4,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
48,
|
||||
59
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 63,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 63,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start": 0,
|
||||
"end": 63,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "a",
|
||||
"range": [
|
||||
9,
|
||||
10
|
||||
],
|
||||
"start": 9,
|
||||
"end": 10,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -21,37 +55,31 @@
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 13,
|
||||
"end": 63,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "ThrowStatement",
|
||||
"argument": {
|
||||
"type": "Literal",
|
||||
"value": 55,
|
||||
"raw": "55",
|
||||
"range": [
|
||||
42,
|
||||
44
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 12
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
45
|
||||
],
|
||||
"start": 36,
|
||||
"end": 45,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -62,14 +90,31 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"argument": {
|
||||
"type": "Literal",
|
||||
"start": 42,
|
||||
"end": 44,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 10
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"value": 55,
|
||||
"rawValue": 55,
|
||||
"raw": "55",
|
||||
"leadingComments": null
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " before ",
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"start": 19,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -79,17 +124,19 @@
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
]
|
||||
}
|
||||
],
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " after ",
|
||||
"range": [
|
||||
50,
|
||||
61
|
||||
],
|
||||
"start": 50,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -99,68 +146,25 @@
|
||||
"line": 4,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
50,
|
||||
61
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
13,
|
||||
63
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"range": [
|
||||
0,
|
||||
63
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
63
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " before ",
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"start": 19,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -170,15 +174,17 @@
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " after ",
|
||||
"range": [
|
||||
50,
|
||||
61
|
||||
],
|
||||
"start": 50,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -188,7 +194,11 @@
|
||||
"line": 4,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
50,
|
||||
61
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 68,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 68
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 68,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 68
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start": 0,
|
||||
"end": 68,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 68
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "f",
|
||||
"range": [
|
||||
9,
|
||||
10
|
||||
],
|
||||
"start": 9,
|
||||
"end": 10,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -21,55 +55,31 @@
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "f"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 13,
|
||||
"end": 68,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 68
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "WhileStatement",
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"value": true,
|
||||
"raw": "true",
|
||||
"range": [
|
||||
37,
|
||||
41
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 37
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 41
|
||||
}
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"body": [],
|
||||
"range": [
|
||||
43,
|
||||
46
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 43
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 46
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
30,
|
||||
46
|
||||
],
|
||||
"start": 30,
|
||||
"end": 46,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -80,14 +90,49 @@
|
||||
"column": 46
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"start": 37,
|
||||
"end": 41,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 37
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"value": true,
|
||||
"rawValue": true,
|
||||
"raw": "true",
|
||||
"leadingComments": null
|
||||
},
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 43,
|
||||
"end": 46,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 43
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 46
|
||||
}
|
||||
},
|
||||
"body": [],
|
||||
"leadingComments": null,
|
||||
"trailingComments": null
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " infinite ",
|
||||
"range": [
|
||||
15,
|
||||
29
|
||||
],
|
||||
"start": 15,
|
||||
"end": 29,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -97,17 +142,19 @@
|
||||
"line": 1,
|
||||
"column": 29
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
29
|
||||
]
|
||||
}
|
||||
],
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " bar ",
|
||||
"range": [
|
||||
47,
|
||||
56
|
||||
],
|
||||
"start": 47,
|
||||
"end": 56,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -117,55 +164,18 @@
|
||||
"line": 1,
|
||||
"column": 56
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
47,
|
||||
56
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "each",
|
||||
"range": [
|
||||
61,
|
||||
65
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 61
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 65
|
||||
}
|
||||
}
|
||||
},
|
||||
"init": null,
|
||||
"range": [
|
||||
61,
|
||||
65
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 61
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 65
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"kind": "var",
|
||||
"range": [
|
||||
57,
|
||||
66
|
||||
],
|
||||
"start": 57,
|
||||
"end": 66,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -176,14 +186,49 @@
|
||||
"column": 66
|
||||
}
|
||||
},
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
"start": 61,
|
||||
"end": 65,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 61
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 65
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 61,
|
||||
"end": 65,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 61
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 65
|
||||
}
|
||||
},
|
||||
"name": "each",
|
||||
"leadingComments": null
|
||||
},
|
||||
"init": null,
|
||||
"leadingComments": null
|
||||
}
|
||||
],
|
||||
"kind": "var",
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " bar ",
|
||||
"range": [
|
||||
47,
|
||||
56
|
||||
],
|
||||
"start": 47,
|
||||
"end": 56,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -193,68 +238,25 @@
|
||||
"line": 1,
|
||||
"column": 56
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
47,
|
||||
56
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
13,
|
||||
68
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 68
|
||||
}
|
||||
}
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"range": [
|
||||
0,
|
||||
68
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 68
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
68
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 68
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " infinite ",
|
||||
"range": [
|
||||
15,
|
||||
29
|
||||
],
|
||||
"start": 15,
|
||||
"end": 29,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -264,15 +266,17 @@
|
||||
"line": 1,
|
||||
"column": 29
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
29
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CommentBlock",
|
||||
"value": " bar ",
|
||||
"range": [
|
||||
47,
|
||||
56
|
||||
],
|
||||
"start": 47,
|
||||
"end": 56,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -282,7 +286,11 @@
|
||||
"line": 1,
|
||||
"column": 56
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
47,
|
||||
56
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 141,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 141,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start": 0,
|
||||
"end": 141,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "bar",
|
||||
"range": [
|
||||
9,
|
||||
12
|
||||
],
|
||||
"start": 9,
|
||||
"end": 12,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -21,16 +55,16 @@
|
||||
"line": 1,
|
||||
"column": 12
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "bar"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
"name": "foo",
|
||||
"range": [
|
||||
13,
|
||||
16
|
||||
],
|
||||
"start": 13,
|
||||
"end": 16,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -40,21 +74,43 @@
|
||||
"line": 1,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "foo"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 18,
|
||||
"end": 141,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 18
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "SwitchStatement",
|
||||
"start": 24,
|
||||
"end": 139,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 8,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"discriminant": {
|
||||
"type": "Identifier",
|
||||
"name": "foo",
|
||||
"range": [
|
||||
31,
|
||||
34
|
||||
],
|
||||
"start": 31,
|
||||
"end": 34,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -64,35 +120,14 @@
|
||||
"line": 2,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "foo"
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"type": "SwitchCase",
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"value": 1,
|
||||
"raw": "1",
|
||||
"range": [
|
||||
66,
|
||||
67
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"consequent": [],
|
||||
"range": [
|
||||
61,
|
||||
68
|
||||
],
|
||||
"start": 61,
|
||||
"end": 68,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -103,14 +138,32 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"consequent": [],
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"start": 66,
|
||||
"end": 67,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"value": 1,
|
||||
"rawValue": 1,
|
||||
"raw": "1",
|
||||
"leadingComments": null
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " foo",
|
||||
"range": [
|
||||
46,
|
||||
52
|
||||
],
|
||||
"start": 46,
|
||||
"end": 52,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -120,17 +173,19 @@
|
||||
"line": 3,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
46,
|
||||
52
|
||||
]
|
||||
}
|
||||
],
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " falls through",
|
||||
"range": [
|
||||
81,
|
||||
97
|
||||
],
|
||||
"start": 81,
|
||||
"end": 97,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
@ -140,90 +195,18 @@
|
||||
"line": 5,
|
||||
"column": 28
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
81,
|
||||
97
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "SwitchCase",
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"value": 2,
|
||||
"raw": "2",
|
||||
"range": [
|
||||
111,
|
||||
112
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"name": "doIt",
|
||||
"range": [
|
||||
126,
|
||||
130
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"arguments": [],
|
||||
"range": [
|
||||
126,
|
||||
132
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 18
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
126,
|
||||
133
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 19
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
106,
|
||||
133
|
||||
],
|
||||
"start": 106,
|
||||
"end": 133,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
@ -234,14 +217,80 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start": 126,
|
||||
"end": 133,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"start": 126,
|
||||
"end": 132,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start": 126,
|
||||
"end": 130,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 7,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"name": "doIt"
|
||||
},
|
||||
"arguments": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"start": 111,
|
||||
"end": 112,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"value": 2,
|
||||
"rawValue": 2,
|
||||
"raw": "2",
|
||||
"leadingComments": null
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " falls through",
|
||||
"range": [
|
||||
81,
|
||||
97
|
||||
],
|
||||
"start": 81,
|
||||
"end": 97,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
@ -251,84 +300,27 @@
|
||||
"line": 5,
|
||||
"column": 28
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
81,
|
||||
97
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
24,
|
||||
139
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 8,
|
||||
"column": 5
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
18,
|
||||
141
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 18
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"range": [
|
||||
0,
|
||||
141
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
141
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " foo",
|
||||
"range": [
|
||||
46,
|
||||
52
|
||||
],
|
||||
"start": 46,
|
||||
"end": 52,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -338,15 +330,17 @@
|
||||
"line": 3,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
46,
|
||||
52
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " falls through",
|
||||
"range": [
|
||||
81,
|
||||
97
|
||||
],
|
||||
"start": 81,
|
||||
"end": 97,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
@ -356,7 +350,11 @@
|
||||
"line": 5,
|
||||
"column": 28
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
81,
|
||||
97
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 91,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 91,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "SwitchStatement",
|
||||
"start": 0,
|
||||
"end": 91,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"discriminant": {
|
||||
"type": "Identifier",
|
||||
"name": "foo",
|
||||
"range": [
|
||||
7,
|
||||
10
|
||||
],
|
||||
"start": 7,
|
||||
"end": 10,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -21,35 +55,14 @@
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "foo"
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"type": "SwitchCase",
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"value": 1,
|
||||
"raw": "1",
|
||||
"range": [
|
||||
34,
|
||||
35
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"consequent": [],
|
||||
"range": [
|
||||
29,
|
||||
36
|
||||
],
|
||||
"start": 29,
|
||||
"end": 36,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -60,14 +73,32 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"consequent": [],
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"start": 34,
|
||||
"end": 35,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"value": 1,
|
||||
"rawValue": 1,
|
||||
"raw": "1",
|
||||
"leadingComments": null
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " foo",
|
||||
"range": [
|
||||
18,
|
||||
24
|
||||
],
|
||||
"start": 18,
|
||||
"end": 24,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -77,17 +108,19 @@
|
||||
"line": 2,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
24
|
||||
]
|
||||
}
|
||||
],
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " falls through",
|
||||
"range": [
|
||||
45,
|
||||
61
|
||||
],
|
||||
"start": 45,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -97,90 +130,18 @@
|
||||
"line": 4,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
45,
|
||||
61
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "SwitchCase",
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"value": 2,
|
||||
"raw": "2",
|
||||
"range": [
|
||||
71,
|
||||
72
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"name": "doIt",
|
||||
"range": [
|
||||
82,
|
||||
86
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 12
|
||||
}
|
||||
}
|
||||
},
|
||||
"arguments": [],
|
||||
"range": [
|
||||
82,
|
||||
88
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
82,
|
||||
89
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 15
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
66,
|
||||
89
|
||||
],
|
||||
"start": 66,
|
||||
"end": 89,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
@ -191,14 +152,80 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start": 82,
|
||||
"end": 89,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"start": 82,
|
||||
"end": 88,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start": 82,
|
||||
"end": 86,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"name": "doIt"
|
||||
},
|
||||
"arguments": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"start": 71,
|
||||
"end": 72,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"value": 2,
|
||||
"rawValue": 2,
|
||||
"raw": "2",
|
||||
"leadingComments": null
|
||||
},
|
||||
"leadingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " falls through",
|
||||
"range": [
|
||||
45,
|
||||
61
|
||||
],
|
||||
"start": 45,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -208,51 +235,24 @@
|
||||
"line": 4,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
45,
|
||||
61
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
0,
|
||||
91
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
91
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " foo",
|
||||
"range": [
|
||||
18,
|
||||
24
|
||||
],
|
||||
"start": 18,
|
||||
"end": 24,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -262,15 +262,17 @@
|
||||
"line": 2,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
24
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": " falls through",
|
||||
"range": [
|
||||
45,
|
||||
61
|
||||
],
|
||||
"start": 45,
|
||||
"end": 61,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -280,7 +282,11 @@
|
||||
"line": 4,
|
||||
"column": 24
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
45,
|
||||
61
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 133,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 133,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "FunctionDeclaration",
|
||||
"start": 0,
|
||||
"end": 133,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"name": "bar",
|
||||
"range": [
|
||||
9,
|
||||
12
|
||||
],
|
||||
"start": 9,
|
||||
"end": 12,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -21,16 +55,16 @@
|
||||
"line": 1,
|
||||
"column": 12
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "bar"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
"name": "a",
|
||||
"range": [
|
||||
13,
|
||||
14
|
||||
],
|
||||
"start": 13,
|
||||
"end": 14,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -40,21 +74,43 @@
|
||||
"line": 1,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "a"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
"start": 16,
|
||||
"end": 133,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 16
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"body": [
|
||||
{
|
||||
"type": "SwitchStatement",
|
||||
"start": 22,
|
||||
"end": 131,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 8,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"discriminant": {
|
||||
"type": "Identifier",
|
||||
"name": "a",
|
||||
"range": [
|
||||
30,
|
||||
31
|
||||
],
|
||||
"start": 30,
|
||||
"end": 31,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -64,54 +120,14 @@
|
||||
"line": 2,
|
||||
"column": 13
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"type": "SwitchCase",
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"value": 2,
|
||||
"raw": "2",
|
||||
"range": [
|
||||
48,
|
||||
49
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "BreakStatement",
|
||||
"label": null,
|
||||
"range": [
|
||||
63,
|
||||
69
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 18
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
43,
|
||||
69
|
||||
],
|
||||
"start": 43,
|
||||
"end": 69,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
@ -121,53 +137,48 @@
|
||||
"line": 4,
|
||||
"column": 18
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "SwitchCase",
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"value": 1,
|
||||
"raw": "1",
|
||||
"range": [
|
||||
83,
|
||||
84
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "BreakStatement",
|
||||
"label": null,
|
||||
"range": [
|
||||
98,
|
||||
104
|
||||
],
|
||||
"start": 63,
|
||||
"end": 69,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"line": 4,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"line": 4,
|
||||
"column": 18
|
||||
}
|
||||
}
|
||||
},
|
||||
"label": null
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
78,
|
||||
104
|
||||
],
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"start": 48,
|
||||
"end": 49,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"value": 2,
|
||||
"rawValue": 2,
|
||||
"raw": "2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "SwitchCase",
|
||||
"start": 78,
|
||||
"end": 104,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
@ -178,14 +189,50 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "BreakStatement",
|
||||
"start": 98,
|
||||
"end": 104,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 6,
|
||||
"column": 12
|
||||
},
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"label": null,
|
||||
"leadingComments": null,
|
||||
"trailingComments": null
|
||||
}
|
||||
],
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"start": 83,
|
||||
"end": 84,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 5,
|
||||
"column": 13
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"value": 1,
|
||||
"rawValue": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "no default",
|
||||
"range": [
|
||||
113,
|
||||
125
|
||||
],
|
||||
"start": 113,
|
||||
"end": 125,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 7,
|
||||
@ -195,84 +242,27 @@
|
||||
"line": 7,
|
||||
"column": 20
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
113,
|
||||
125
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
22,
|
||||
131
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 4
|
||||
},
|
||||
"end": {
|
||||
"line": 8,
|
||||
"column": 5
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
16,
|
||||
133
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 16
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"range": [
|
||||
0,
|
||||
133
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
133
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 9,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "no default",
|
||||
"range": [
|
||||
113,
|
||||
125
|
||||
],
|
||||
"start": 113,
|
||||
"end": 125,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 7,
|
||||
@ -282,7 +272,11 @@
|
||||
"line": 7,
|
||||
"column": 20
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
113,
|
||||
125
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,17 +1,51 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start": 0,
|
||||
"end": 58,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
"end": 58,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
"type": "SwitchStatement",
|
||||
"start": 0,
|
||||
"end": 58,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"discriminant": {
|
||||
"type": "Identifier",
|
||||
"name": "a",
|
||||
"range": [
|
||||
8,
|
||||
9
|
||||
],
|
||||
"start": 8,
|
||||
"end": 9,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
@ -21,54 +55,14 @@
|
||||
"line": 1,
|
||||
"column": 9
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"type": "SwitchCase",
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"value": 1,
|
||||
"raw": "1",
|
||||
"range": [
|
||||
22,
|
||||
23
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 10
|
||||
}
|
||||
}
|
||||
},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "BreakStatement",
|
||||
"label": null,
|
||||
"range": [
|
||||
33,
|
||||
39
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 14
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
17,
|
||||
39
|
||||
],
|
||||
"start": 17,
|
||||
"end": 39,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
@ -79,14 +73,50 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"consequent": [
|
||||
{
|
||||
"type": "BreakStatement",
|
||||
"start": 33,
|
||||
"end": 39,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 3,
|
||||
"column": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"label": null,
|
||||
"leadingComments": null,
|
||||
"trailingComments": null
|
||||
}
|
||||
],
|
||||
"test": {
|
||||
"type": "Literal",
|
||||
"start": 22,
|
||||
"end": 23,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 2,
|
||||
"column": 9
|
||||
},
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"value": 1,
|
||||
"rawValue": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"trailingComments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "no default",
|
||||
"range": [
|
||||
44,
|
||||
56
|
||||
],
|
||||
"start": 44,
|
||||
"end": 56,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -96,51 +126,24 @@
|
||||
"line": 4,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
44,
|
||||
56
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"range": [
|
||||
0,
|
||||
58
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"sourceType": "script",
|
||||
"range": [
|
||||
0,
|
||||
58
|
||||
],
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 0
|
||||
},
|
||||
"end": {
|
||||
"line": 5,
|
||||
"column": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": [
|
||||
{
|
||||
"type": "CommentLine",
|
||||
"value": "no default",
|
||||
"range": [
|
||||
44,
|
||||
56
|
||||
],
|
||||
"start": 44,
|
||||
"end": 56,
|
||||
"loc": {
|
||||
"start": {
|
||||
"line": 4,
|
||||
@ -150,7 +153,11 @@
|
||||
"line": 4,
|
||||
"column": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
44,
|
||||
56
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
19
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
19
|
||||
],
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
19
|
||||
],
|
||||
"init": {
|
||||
"type": "VariableDeclaration",
|
||||
"start": 4,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
15
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
15
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 10,
|
||||
@ -105,10 +85,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"name": "x"
|
||||
},
|
||||
"init": {
|
||||
@ -125,10 +101,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"value": 0,
|
||||
"rawValue": 0,
|
||||
"raw": "0"
|
||||
@ -152,13 +124,10 @@
|
||||
"line": 1,
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
19
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
20
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
20
|
||||
],
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
20
|
||||
],
|
||||
"expression": {
|
||||
"type": "CallExpression",
|
||||
"start": 0,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
20
|
||||
],
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start": 0,
|
||||
@ -86,10 +70,6 @@
|
||||
"column": 1
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
1
|
||||
],
|
||||
"name": "f"
|
||||
},
|
||||
"arguments": [
|
||||
@ -107,10 +87,6 @@
|
||||
"column": 3
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
2,
|
||||
3
|
||||
],
|
||||
"name": "a"
|
||||
},
|
||||
{
|
||||
@ -127,10 +103,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
16
|
||||
],
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start": 5,
|
||||
@ -145,10 +117,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
10
|
||||
],
|
||||
"name": "async"
|
||||
},
|
||||
"arguments": [
|
||||
@ -166,10 +134,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
11,
|
||||
12
|
||||
],
|
||||
"value": 1,
|
||||
"rawValue": 1,
|
||||
"raw": "1"
|
||||
@ -188,10 +152,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"value": 2,
|
||||
"rawValue": 2,
|
||||
"raw": "2"
|
||||
@ -212,15 +172,12 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
19
|
||||
],
|
||||
"name": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
17
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
17
|
||||
],
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
17
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
17
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 6
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
6
|
||||
],
|
||||
"name": "ok"
|
||||
},
|
||||
"init": {
|
||||
@ -107,10 +87,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
17
|
||||
],
|
||||
"callee": {
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
@ -125,10 +101,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
14
|
||||
],
|
||||
"name": "async"
|
||||
},
|
||||
"arguments": [
|
||||
@ -146,10 +118,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
16
|
||||
],
|
||||
"name": "x"
|
||||
}
|
||||
]
|
||||
@ -159,5 +127,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
38
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
38
|
||||
],
|
||||
"sourceType": "script",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
38
|
||||
],
|
||||
"expression": {
|
||||
"type": "FunctionExpression",
|
||||
"start": 1,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
1,
|
||||
37
|
||||
],
|
||||
"id": null,
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
@ -91,10 +75,6 @@
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
37
|
||||
],
|
||||
"body": [
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
@ -110,10 +90,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
24
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -129,10 +105,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
23
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 18,
|
||||
@ -147,10 +119,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
23
|
||||
],
|
||||
"name": "async"
|
||||
},
|
||||
"init": null
|
||||
@ -172,10 +140,6 @@
|
||||
"column": 35
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
35
|
||||
],
|
||||
"expression": {
|
||||
"type": "AssignmentExpression",
|
||||
"start": 25,
|
||||
@ -190,10 +154,6 @@
|
||||
"column": 35
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
35
|
||||
],
|
||||
"operator": "=",
|
||||
"left": {
|
||||
"type": "Identifier",
|
||||
@ -209,10 +169,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
30
|
||||
],
|
||||
"name": "async"
|
||||
},
|
||||
"right": {
|
||||
@ -229,10 +185,6 @@
|
||||
"column": 35
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
33,
|
||||
35
|
||||
],
|
||||
"value": 10,
|
||||
"rawValue": 10,
|
||||
"raw": "10"
|
||||
@ -245,5 +197,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
37
test/fixtures/flow/array-types/1/expected.json
vendored
37
test/fixtures/flow/array-types/1/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
15
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
15
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
15
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
15
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
15
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
15
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "ArrayTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
15
|
||||
],
|
||||
"elementType": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -141,11 +113,7 @@
|
||||
"line": 1,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
13
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -156,5 +124,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
41
test/fixtures/flow/array-types/2/expected.json
vendored
41
test/fixtures/flow/array-types/2/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
16
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
16
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
16
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NullableTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
16
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "ArrayTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -142,10 +114,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
16
|
||||
],
|
||||
"elementType": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -159,11 +127,7 @@
|
||||
"line": 1,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
14
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -175,5 +139,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
41
test/fixtures/flow/array-types/3/expected.json
vendored
41
test/fixtures/flow/array-types/3/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
18
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
18
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
18
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
18
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
18
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
18
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "ArrayTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
18
|
||||
],
|
||||
"elementType": {
|
||||
"type": "NullableTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -142,10 +114,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
15
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"start": 9,
|
||||
@ -159,11 +127,7 @@
|
||||
"line": 1,
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
15
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -175,5 +139,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
41
test/fixtures/flow/array-types/4/expected.json
vendored
41
test/fixtures/flow/array-types/4/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
21
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
21
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
21
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
21
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
21
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
21
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
21
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"returnType": {
|
||||
@ -144,10 +116,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
13,
|
||||
21
|
||||
],
|
||||
"elementType": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"start": 13,
|
||||
@ -161,11 +129,7 @@
|
||||
"line": 1,
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
13,
|
||||
19
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeParameters": null
|
||||
@ -178,5 +142,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
41
test/fixtures/flow/array-types/5/expected.json
vendored
41
test/fixtures/flow/array-types/5/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
23
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
23
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
23
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
23
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
23
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
23
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "ArrayTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
23
|
||||
],
|
||||
"elementType": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -142,10 +114,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
20
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"returnType": {
|
||||
@ -161,11 +129,7 @@
|
||||
"line": 1,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
20
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeParameters": null
|
||||
}
|
||||
@ -178,5 +142,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
43
test/fixtures/flow/array-types/6/expected.json
vendored
43
test/fixtures/flow/array-types/6/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
17
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
17
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
17
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
17
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
17
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
17
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "ArrayTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
17
|
||||
],
|
||||
"elementType": {
|
||||
"type": "TypeofTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -142,10 +114,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
15
|
||||
],
|
||||
"argument": {
|
||||
"type": "GenericTypeAnnotation",
|
||||
"start": 14,
|
||||
@ -160,10 +128,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -179,10 +143,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"name": "A"
|
||||
}
|
||||
}
|
||||
@ -196,5 +156,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
18
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
18
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
18
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
7
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
15
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@ -107,10 +87,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
14
|
||||
],
|
||||
"name": "T",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -126,10 +102,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
14
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "GenericTypeAnnotation",
|
||||
"start": 11,
|
||||
@ -144,10 +116,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
11,
|
||||
14
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -163,10 +131,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
11,
|
||||
14
|
||||
],
|
||||
"name": "Foo"
|
||||
}
|
||||
}
|
||||
@ -189,13 +153,10 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
16,
|
||||
18
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
29
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
29
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
29
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
12
|
||||
],
|
||||
"name": "bar"
|
||||
},
|
||||
"generator": false,
|
||||
@ -91,10 +75,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
24
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@ -110,10 +90,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
13,
|
||||
23
|
||||
],
|
||||
"name": "T",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -129,10 +105,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
23
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NullableTypeAnnotation",
|
||||
"start": 16,
|
||||
@ -147,10 +119,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
16,
|
||||
23
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"start": 17,
|
||||
@ -164,11 +132,7 @@
|
||||
"line": 1,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
23
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -190,13 +154,10 @@
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
27,
|
||||
29
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
22
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
22
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
22
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
22
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
22
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
22
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "ObjectTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
22
|
||||
],
|
||||
"callProperties": [
|
||||
{
|
||||
"type": "ObjectTypeCallProperty",
|
||||
@ -143,10 +115,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
20
|
||||
],
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 10,
|
||||
@ -161,10 +129,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
20
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"typeParameters": null,
|
||||
@ -181,11 +145,7 @@
|
||||
"line": 1,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
20
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -201,5 +161,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
23
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
23
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
23
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
23
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
23
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
23
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "ObjectTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
23
|
||||
],
|
||||
"callProperties": [
|
||||
{
|
||||
"type": "ObjectTypeCallProperty",
|
||||
@ -143,10 +115,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
21
|
||||
],
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 10,
|
||||
@ -161,10 +129,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
20
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"typeParameters": null,
|
||||
@ -181,11 +145,7 @@
|
||||
"line": 1,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
20
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -201,5 +161,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
54
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
54
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
54
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
54
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
54
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
54
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "ObjectTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
54
|
||||
],
|
||||
"callProperties": [
|
||||
{
|
||||
"type": "ObjectTypeCallProperty",
|
||||
@ -143,10 +115,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
21
|
||||
],
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 10,
|
||||
@ -161,10 +129,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
20
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"typeParameters": null,
|
||||
@ -181,11 +145,7 @@
|
||||
"line": 1,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
20
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -203,10 +163,6 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
33,
|
||||
52
|
||||
],
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 33,
|
||||
@ -221,10 +177,6 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
33,
|
||||
52
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "FunctionTypeParam",
|
||||
@ -240,10 +192,6 @@
|
||||
"column": 43
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
34,
|
||||
43
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 34,
|
||||
@ -258,10 +206,6 @@
|
||||
"column": 35
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
34,
|
||||
35
|
||||
],
|
||||
"name": "x"
|
||||
},
|
||||
"optional": false,
|
||||
@ -278,11 +222,7 @@
|
||||
"line": 1,
|
||||
"column": 43
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
37,
|
||||
43
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -301,11 +241,7 @@
|
||||
"line": 1,
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
46,
|
||||
52
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -325,10 +261,6 @@
|
||||
"column": 32
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
22,
|
||||
32
|
||||
],
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 22,
|
||||
@ -343,10 +275,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
22,
|
||||
23
|
||||
],
|
||||
"name": "y"
|
||||
},
|
||||
"value": {
|
||||
@ -362,11 +290,7 @@
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
31
|
||||
]
|
||||
}
|
||||
},
|
||||
"optional": false
|
||||
}
|
||||
@ -381,5 +305,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
30
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
30
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
30
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
30
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
30
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
30
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "ObjectTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
30
|
||||
],
|
||||
"callProperties": [
|
||||
{
|
||||
"type": "ObjectTypeCallProperty",
|
||||
@ -143,10 +115,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
28
|
||||
],
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 10,
|
||||
@ -161,10 +129,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
27
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "FunctionTypeParam",
|
||||
@ -180,10 +144,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
18
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
@ -198,10 +158,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"name": "x"
|
||||
},
|
||||
"optional": false,
|
||||
@ -219,10 +175,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
18
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -238,10 +190,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
18
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
}
|
||||
@ -262,10 +210,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
13
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@ -281,10 +225,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
11,
|
||||
12
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
]
|
||||
@ -302,11 +242,7 @@
|
||||
"line": 1,
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
27
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -322,5 +258,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 10,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,10 +74,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
27
|
||||
],
|
||||
"callProperties": [
|
||||
{
|
||||
"type": "ObjectTypeCallProperty",
|
||||
@ -109,10 +89,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
25
|
||||
],
|
||||
"static": false,
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
@ -128,10 +104,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
24
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"typeParameters": null,
|
||||
@ -148,11 +120,7 @@
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
24
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -162,5 +130,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
19
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
19
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
19
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
16
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"body": {
|
||||
@ -88,13 +72,10 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
19
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
28
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
28
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
28
|
||||
],
|
||||
"id": {
|
||||
"type": "Literal",
|
||||
"start": 15,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
25
|
||||
],
|
||||
"value": "./a/b.js",
|
||||
"rawValue": "./a/b.js",
|
||||
"raw": "\"./a/b.js\""
|
||||
@ -90,13 +74,10 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
26,
|
||||
28
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 43
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
43
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 43
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
43
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 43
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
43
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
16
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"body": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 43
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
43
|
||||
],
|
||||
"body": [
|
||||
{
|
||||
"type": "DeclareVariable",
|
||||
@ -107,10 +87,6 @@
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
41
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 31,
|
||||
@ -125,10 +101,6 @@
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
31,
|
||||
40
|
||||
],
|
||||
"name": "x",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -144,10 +116,6 @@
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
32,
|
||||
40
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"start": 34,
|
||||
@ -161,11 +129,7 @@
|
||||
"line": 1,
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
34,
|
||||
40
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -174,5 +138,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
52
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
52
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
52
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
16
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"body": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
52
|
||||
],
|
||||
"body": [
|
||||
{
|
||||
"type": "DeclareFunction",
|
||||
@ -107,10 +87,6 @@
|
||||
"column": 50
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
50
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 36,
|
||||
@ -125,10 +101,6 @@
|
||||
"column": 49
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
49
|
||||
],
|
||||
"name": "foo",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -144,10 +116,6 @@
|
||||
"column": 49
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
39,
|
||||
49
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 39,
|
||||
@ -162,10 +130,6 @@
|
||||
"column": 49
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
39,
|
||||
49
|
||||
],
|
||||
"typeParameters": null,
|
||||
"params": [],
|
||||
"rest": null,
|
||||
@ -182,11 +146,7 @@
|
||||
"line": 1,
|
||||
"column": 49
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
43,
|
||||
49
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -196,5 +156,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 55
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
55
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 55
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
55
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 55
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
55
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
16
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"body": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 55
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
55
|
||||
],
|
||||
"body": [
|
||||
{
|
||||
"type": "DeclareClass",
|
||||
@ -107,10 +87,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
53
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 33,
|
||||
@ -125,10 +101,6 @@
|
||||
"column": 34
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
33,
|
||||
34
|
||||
],
|
||||
"name": "B"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -147,10 +119,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
35,
|
||||
53
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [
|
||||
{
|
||||
@ -167,10 +135,6 @@
|
||||
"column": 51
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
37,
|
||||
51
|
||||
],
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 37,
|
||||
@ -185,10 +149,6 @@
|
||||
"column": 50
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
37,
|
||||
50
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"typeParameters": null,
|
||||
@ -205,11 +165,7 @@
|
||||
"line": 1,
|
||||
"column": 50
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
44,
|
||||
50
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"key": {
|
||||
@ -226,10 +182,6 @@
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
37,
|
||||
40
|
||||
],
|
||||
"name": "foo"
|
||||
},
|
||||
"optional": false
|
||||
@ -242,5 +194,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
15
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
15
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
15
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
@ -68,13 +56,10 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
15
|
||||
],
|
||||
"name": "foo"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 59
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
59
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 59
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
59
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 59
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
59
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,10 +74,6 @@
|
||||
"column": 59
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
16,
|
||||
59
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [
|
||||
{
|
||||
@ -110,10 +90,6 @@
|
||||
"column": 39
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
39
|
||||
],
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 18,
|
||||
@ -128,10 +104,6 @@
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
38
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"typeParameters": null,
|
||||
@ -148,11 +120,7 @@
|
||||
"line": 1,
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
32,
|
||||
38
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"static": true,
|
||||
@ -170,10 +138,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
28
|
||||
],
|
||||
"name": "foo"
|
||||
},
|
||||
"optional": false
|
||||
@ -192,10 +156,6 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
57
|
||||
],
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 47,
|
||||
@ -210,10 +170,6 @@
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
47,
|
||||
48
|
||||
],
|
||||
"name": "x"
|
||||
},
|
||||
"value": {
|
||||
@ -229,11 +185,7 @@
|
||||
"line": 1,
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
51,
|
||||
57
|
||||
]
|
||||
}
|
||||
},
|
||||
"optional": false,
|
||||
"static": true
|
||||
@ -243,5 +195,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
53
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
53
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
53
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,10 +74,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
16,
|
||||
53
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [],
|
||||
"indexers": [
|
||||
@ -111,10 +91,6 @@
|
||||
"column": 51
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
51
|
||||
],
|
||||
"static": true,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -130,10 +106,6 @@
|
||||
"column": 34
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
27,
|
||||
34
|
||||
],
|
||||
"name": "indexer"
|
||||
},
|
||||
"key": {
|
||||
@ -149,11 +121,7 @@
|
||||
"line": 1,
|
||||
"column": 42
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
42
|
||||
]
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "StringTypeAnnotation",
|
||||
@ -168,16 +136,13 @@
|
||||
"line": 1,
|
||||
"column": 51
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
45,
|
||||
51
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
38
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
38
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
38
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,10 +74,6 @@
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
16,
|
||||
38
|
||||
],
|
||||
"callProperties": [
|
||||
{
|
||||
"type": "ObjectTypeCallProperty",
|
||||
@ -109,10 +89,6 @@
|
||||
"column": 36
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
36
|
||||
],
|
||||
"static": true,
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
@ -128,10 +104,6 @@
|
||||
"column": 36
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
36
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"typeParameters": null,
|
||||
@ -148,11 +120,7 @@
|
||||
"line": 1,
|
||||
"column": 36
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
30,
|
||||
36
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -162,5 +130,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
@ -68,13 +56,10 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
15
|
||||
],
|
||||
"name": "foo"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
28
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
28
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
28
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
28
|
||||
],
|
||||
"name": "foo",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
28
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 20,
|
||||
@ -105,10 +85,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
28
|
||||
],
|
||||
"typeParameters": null,
|
||||
"params": [],
|
||||
"rest": null,
|
||||
@ -125,16 +101,13 @@
|
||||
"line": 1,
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
28
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
29
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
29
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
29
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
28
|
||||
],
|
||||
"name": "foo",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
28
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 20,
|
||||
@ -105,10 +85,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
28
|
||||
],
|
||||
"typeParameters": null,
|
||||
"params": [],
|
||||
"rest": null,
|
||||
@ -125,16 +101,13 @@
|
||||
"line": 1,
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
28
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 32
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
32
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 32
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
32
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 32
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
32
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
31
|
||||
],
|
||||
"name": "foo",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
31
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 20,
|
||||
@ -105,10 +85,6 @@
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
31
|
||||
],
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterDeclaration",
|
||||
"start": 20,
|
||||
@ -123,10 +99,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
23
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@ -142,10 +114,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
22
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
]
|
||||
@ -165,16 +133,13 @@
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
27,
|
||||
31
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 49
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
49
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 49
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
49
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 49
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
49
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 17,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
48
|
||||
],
|
||||
"name": "foo",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
48
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 20,
|
||||
@ -105,10 +85,6 @@
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
48
|
||||
],
|
||||
"typeParameters": null,
|
||||
"params": [
|
||||
{
|
||||
@ -125,10 +101,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
30
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 21,
|
||||
@ -143,10 +115,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
22
|
||||
],
|
||||
"name": "x"
|
||||
},
|
||||
"optional": false,
|
||||
@ -163,11 +131,7 @@
|
||||
"line": 1,
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
30
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -184,10 +148,6 @@
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
32,
|
||||
41
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 32,
|
||||
@ -202,10 +162,6 @@
|
||||
"column": 33
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
32,
|
||||
33
|
||||
],
|
||||
"name": "y"
|
||||
},
|
||||
"optional": false,
|
||||
@ -222,11 +178,7 @@
|
||||
"line": 1,
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
35,
|
||||
41
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -244,16 +196,13 @@
|
||||
"line": 1,
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
44,
|
||||
48
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 74
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
74
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 74
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
74
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 74
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
74
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
26
|
||||
],
|
||||
"name": "IViewFactory"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,10 +74,6 @@
|
||||
"column": 74
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
27,
|
||||
74
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [
|
||||
{
|
||||
@ -110,10 +90,6 @@
|
||||
"column": 72
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
29,
|
||||
72
|
||||
],
|
||||
"value": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 29,
|
||||
@ -128,10 +104,6 @@
|
||||
"column": 71
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
29,
|
||||
71
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "FunctionTypeParam",
|
||||
@ -147,10 +119,6 @@
|
||||
"column": 51
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
51
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 40,
|
||||
@ -165,10 +133,6 @@
|
||||
"column": 44
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
44
|
||||
],
|
||||
"name": "view"
|
||||
},
|
||||
"optional": false,
|
||||
@ -186,10 +150,6 @@
|
||||
"column": 51
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
45,
|
||||
51
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -205,10 +165,6 @@
|
||||
"column": 51
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
45,
|
||||
51
|
||||
],
|
||||
"name": "Object"
|
||||
}
|
||||
}
|
||||
@ -227,10 +183,6 @@
|
||||
"column": 64
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
53,
|
||||
64
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 53,
|
||||
@ -245,10 +197,6 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
53,
|
||||
57
|
||||
],
|
||||
"name": "prop"
|
||||
},
|
||||
"optional": false,
|
||||
@ -265,11 +213,7 @@
|
||||
"line": 1,
|
||||
"column": 64
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
58,
|
||||
64
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -288,11 +232,7 @@
|
||||
"line": 1,
|
||||
"column": 71
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
67,
|
||||
71
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"key": {
|
||||
@ -309,10 +249,6 @@
|
||||
"column": 39
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
29,
|
||||
39
|
||||
],
|
||||
"name": "didAnimate"
|
||||
},
|
||||
"optional": false
|
||||
@ -322,5 +258,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
18
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
18
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
18
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,15 +74,12 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
16,
|
||||
18
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [],
|
||||
"indexers": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 45
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
45
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 45
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
45
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 45
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
45
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
15
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
18
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@ -107,10 +87,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
16,
|
||||
17
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
]
|
||||
@ -130,10 +106,6 @@
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
27,
|
||||
31
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 27,
|
||||
@ -148,10 +120,6 @@
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
27,
|
||||
28
|
||||
],
|
||||
"name": "B"
|
||||
},
|
||||
"typeParameters": {
|
||||
@ -168,10 +136,6 @@
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
28,
|
||||
31
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
@ -187,10 +151,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
29,
|
||||
30
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -206,10 +166,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
29,
|
||||
30
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
}
|
||||
@ -231,10 +187,6 @@
|
||||
"column": 45
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
32,
|
||||
45
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [
|
||||
{
|
||||
@ -251,10 +203,6 @@
|
||||
"column": 43
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
34,
|
||||
43
|
||||
],
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 34,
|
||||
@ -269,10 +217,6 @@
|
||||
"column": 35
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
34,
|
||||
35
|
||||
],
|
||||
"name": "x"
|
||||
},
|
||||
"value": {
|
||||
@ -288,11 +232,7 @@
|
||||
"line": 1,
|
||||
"column": 43
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
37,
|
||||
43
|
||||
]
|
||||
}
|
||||
},
|
||||
"optional": false
|
||||
}
|
||||
@ -301,5 +241,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
14
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
14
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
14
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 10,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,15 +74,12 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
14
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [],
|
||||
"indexers": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
24
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
24
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
24
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 10,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,10 +74,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
21
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 20,
|
||||
@ -108,10 +88,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
21
|
||||
],
|
||||
"name": "B"
|
||||
},
|
||||
"typeParameters": null
|
||||
@ -131,15 +107,12 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
22,
|
||||
24
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [],
|
||||
"indexers": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 36
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
36
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 36
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
36
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 36
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
36
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 10,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
11,
|
||||
14
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@ -107,10 +87,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
13
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
]
|
||||
@ -130,10 +106,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
23,
|
||||
27
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 23,
|
||||
@ -148,10 +120,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
23,
|
||||
24
|
||||
],
|
||||
"name": "B"
|
||||
},
|
||||
"typeParameters": {
|
||||
@ -168,10 +136,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
27
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
@ -187,10 +151,6 @@
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
26
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -206,10 +166,6 @@
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
26
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
}
|
||||
@ -230,10 +186,6 @@
|
||||
"column": 33
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
29,
|
||||
33
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 29,
|
||||
@ -248,10 +200,6 @@
|
||||
"column": 30
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
29,
|
||||
30
|
||||
],
|
||||
"name": "C"
|
||||
},
|
||||
"typeParameters": {
|
||||
@ -268,10 +216,6 @@
|
||||
"column": 33
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
30,
|
||||
33
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
@ -287,10 +231,6 @@
|
||||
"column": 32
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
31,
|
||||
32
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -306,10 +246,6 @@
|
||||
"column": 32
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
31,
|
||||
32
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
}
|
||||
@ -331,15 +267,12 @@
|
||||
"column": 36
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
34,
|
||||
36
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [],
|
||||
"indexers": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 34
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
34
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 34
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
34
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 34
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
34
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 10,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,10 +74,6 @@
|
||||
"column": 34
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
34
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [
|
||||
{
|
||||
@ -110,10 +90,6 @@
|
||||
"column": 32
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
32
|
||||
],
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 14,
|
||||
@ -128,10 +104,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
17
|
||||
],
|
||||
"name": "foo"
|
||||
},
|
||||
"value": {
|
||||
@ -148,10 +120,6 @@
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
31
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"returnType": {
|
||||
@ -167,11 +135,7 @@
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
31
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeParameters": null
|
||||
},
|
||||
@ -182,5 +146,6 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 65
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
65
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 65
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
65
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 65
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
65
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 10,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
20
|
||||
],
|
||||
"name": "Dictionary"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -90,10 +74,6 @@
|
||||
"column": 65
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
65
|
||||
],
|
||||
"callProperties": [],
|
||||
"properties": [
|
||||
{
|
||||
@ -110,10 +90,6 @@
|
||||
"column": 63
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
48,
|
||||
63
|
||||
],
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
"start": 48,
|
||||
@ -128,10 +104,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
48,
|
||||
54
|
||||
],
|
||||
"name": "length"
|
||||
},
|
||||
"value": {
|
||||
@ -147,11 +119,7 @@
|
||||
"line": 1,
|
||||
"column": 62
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
56,
|
||||
62
|
||||
]
|
||||
}
|
||||
},
|
||||
"optional": false
|
||||
}
|
||||
@ -171,10 +139,6 @@
|
||||
"column": 47
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
23,
|
||||
47
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 24,
|
||||
@ -189,10 +153,6 @@
|
||||
"column": 29
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
29
|
||||
],
|
||||
"name": "index"
|
||||
},
|
||||
"key": {
|
||||
@ -208,11 +168,7 @@
|
||||
"line": 1,
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
31,
|
||||
37
|
||||
]
|
||||
}
|
||||
},
|
||||
"value": {
|
||||
"type": "StringTypeAnnotation",
|
||||
@ -227,16 +183,13 @@
|
||||
"line": 1,
|
||||
"column": 46
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
46
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
9
|
||||
],
|
||||
"name": "Foo"
|
||||
},
|
||||
"superClass": null,
|
||||
@ -90,10 +74,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
24
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 21,
|
||||
@ -108,10 +88,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
24
|
||||
],
|
||||
"name": "Bar"
|
||||
},
|
||||
"typeParameters": null
|
||||
@ -131,13 +107,10 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
27
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
52
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
52
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
52
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
9
|
||||
],
|
||||
"name": "Foo"
|
||||
},
|
||||
"superClass": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
21
|
||||
],
|
||||
"name": "Bar"
|
||||
},
|
||||
"implements": [
|
||||
@ -109,10 +89,6 @@
|
||||
"column": 36
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
33,
|
||||
36
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 33,
|
||||
@ -127,10 +103,6 @@
|
||||
"column": 36
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
33,
|
||||
36
|
||||
],
|
||||
"name": "Bat"
|
||||
},
|
||||
"typeParameters": null
|
||||
@ -149,10 +121,6 @@
|
||||
"column": 49
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
38,
|
||||
49
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 38,
|
||||
@ -167,10 +135,6 @@
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
38,
|
||||
41
|
||||
],
|
||||
"name": "Man"
|
||||
},
|
||||
"typeParameters": {
|
||||
@ -187,10 +151,6 @@
|
||||
"column": 49
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
41,
|
||||
49
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "NumberTypeAnnotation",
|
||||
@ -205,11 +165,7 @@
|
||||
"line": 1,
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
42,
|
||||
48
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -229,13 +185,10 @@
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
50,
|
||||
52
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
48
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
48
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
48
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
9
|
||||
],
|
||||
"name": "Foo"
|
||||
},
|
||||
"superClass": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 45
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
45
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 24,
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
27
|
||||
],
|
||||
"name": "Bar"
|
||||
},
|
||||
"superClass": null,
|
||||
@ -128,10 +104,6 @@
|
||||
"column": 42
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
39,
|
||||
42
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 39,
|
||||
@ -146,10 +118,6 @@
|
||||
"column": 42
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
39,
|
||||
42
|
||||
],
|
||||
"name": "Bat"
|
||||
},
|
||||
"typeParameters": null
|
||||
@ -169,10 +137,6 @@
|
||||
"column": 45
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
43,
|
||||
45
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
},
|
||||
@ -190,13 +154,10 @@
|
||||
"column": 48
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
46,
|
||||
48
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 63
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
63
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 63
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
63
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 63
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
63
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 6,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
9
|
||||
],
|
||||
"name": "Foo"
|
||||
},
|
||||
"superClass": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 45
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
45
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 24,
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
27
|
||||
],
|
||||
"name": "Bar"
|
||||
},
|
||||
"superClass": null,
|
||||
@ -128,10 +104,6 @@
|
||||
"column": 42
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
39,
|
||||
42
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 39,
|
||||
@ -146,10 +118,6 @@
|
||||
"column": 42
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
39,
|
||||
42
|
||||
],
|
||||
"name": "Bat"
|
||||
},
|
||||
"typeParameters": null
|
||||
@ -169,10 +137,6 @@
|
||||
"column": 45
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
43,
|
||||
45
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
},
|
||||
@ -191,10 +155,6 @@
|
||||
"column": 60
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
57,
|
||||
60
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 57,
|
||||
@ -209,10 +169,6 @@
|
||||
"column": 60
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
57,
|
||||
60
|
||||
],
|
||||
"name": "Man"
|
||||
},
|
||||
"typeParameters": null
|
||||
@ -232,13 +188,10 @@
|
||||
"column": 63
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
61,
|
||||
63
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
10
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
10
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
10
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
10
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
10
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
10
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NumberLiteralTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
10
|
||||
],
|
||||
"value": 123,
|
||||
"rawValue": 123,
|
||||
"raw": "123"
|
||||
@ -140,5 +112,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
12
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
12
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
12
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
12
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
12
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
12
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NumberLiteralTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
12
|
||||
],
|
||||
"value": 123,
|
||||
"rawValue": 123,
|
||||
"raw": "123.0"
|
||||
@ -140,5 +112,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
11
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
11
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
11
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
11
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
11
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
11
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NumberLiteralTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
11
|
||||
],
|
||||
"value": 123,
|
||||
"rawValue": 123,
|
||||
"raw": "0x7B"
|
||||
@ -140,5 +112,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
16
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
16
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
16
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NumberLiteralTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
16
|
||||
],
|
||||
"value": 123,
|
||||
"rawValue": 123,
|
||||
"raw": "0b1111011"
|
||||
@ -140,5 +112,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
12
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
12
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
12
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
12
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
12
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
12
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NumberLiteralTypeAnnotation",
|
||||
"start": 7,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
12
|
||||
],
|
||||
"value": 123,
|
||||
"rawValue": 123,
|
||||
"raw": "0o173"
|
||||
@ -140,5 +112,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
11
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
11
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
11
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
11
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
11
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
11
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "GenericTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
11
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "QualifiedTypeIdentifier",
|
||||
@ -143,10 +115,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
11
|
||||
],
|
||||
"qualification": {
|
||||
"type": "Identifier",
|
||||
"start": 8,
|
||||
@ -161,10 +129,6 @@
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
9
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"id": {
|
||||
@ -181,10 +145,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"name": "B"
|
||||
}
|
||||
}
|
||||
@ -197,5 +157,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
13
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
13
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
13
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
13
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
13
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
13
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "GenericTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
13
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "QualifiedTypeIdentifier",
|
||||
@ -143,10 +115,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
13
|
||||
],
|
||||
"qualification": {
|
||||
"type": "QualifiedTypeIdentifier",
|
||||
"start": 8,
|
||||
@ -161,10 +129,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
11
|
||||
],
|
||||
"qualification": {
|
||||
"type": "Identifier",
|
||||
"start": 8,
|
||||
@ -179,10 +143,6 @@
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
9
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"id": {
|
||||
@ -199,10 +159,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"name": "B"
|
||||
}
|
||||
},
|
||||
@ -220,10 +176,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
13
|
||||
],
|
||||
"name": "C"
|
||||
}
|
||||
}
|
||||
@ -236,5 +188,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
14
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
14
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
14
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
14
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
14
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
14
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "GenericTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
14
|
||||
],
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterInstantiation",
|
||||
"start": 11,
|
||||
@ -142,10 +114,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
11,
|
||||
14
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
@ -161,10 +129,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
13
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -180,10 +144,6 @@
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
13
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
}
|
||||
@ -203,10 +163,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
11
|
||||
],
|
||||
"qualification": {
|
||||
"type": "Identifier",
|
||||
"start": 8,
|
||||
@ -221,10 +177,6 @@
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
9
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"id": {
|
||||
@ -241,10 +193,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
10,
|
||||
11
|
||||
],
|
||||
"name": "B"
|
||||
}
|
||||
}
|
||||
@ -257,5 +205,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
21
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
21
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
21
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
21
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
21
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
21
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "TypeofTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
21
|
||||
],
|
||||
"argument": {
|
||||
"type": "GenericTypeAnnotation",
|
||||
"start": 15,
|
||||
@ -142,10 +114,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
21
|
||||
],
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterInstantiation",
|
||||
"start": 18,
|
||||
@ -160,10 +128,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
21
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
@ -179,10 +143,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
20
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -198,10 +158,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
20
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
}
|
||||
@ -221,10 +177,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
18
|
||||
],
|
||||
"qualification": {
|
||||
"type": "Identifier",
|
||||
"start": 15,
|
||||
@ -239,10 +191,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
16
|
||||
],
|
||||
"name": "A"
|
||||
},
|
||||
"id": {
|
||||
@ -259,10 +207,6 @@
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
18
|
||||
],
|
||||
"name": "B"
|
||||
}
|
||||
}
|
||||
@ -276,5 +220,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
57
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
57
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
57
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
22
|
||||
],
|
||||
"name": "createElement"
|
||||
},
|
||||
"generator": false,
|
||||
@ -92,10 +76,6 @@
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
23,
|
||||
37
|
||||
],
|
||||
"name": "tagName",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -111,10 +91,6 @@
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
30,
|
||||
37
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "StringLiteralTypeAnnotation",
|
||||
"start": 32,
|
||||
@ -129,10 +105,6 @@
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
32,
|
||||
37
|
||||
],
|
||||
"value": "div",
|
||||
"rawValue": "div",
|
||||
"raw": "\"div\""
|
||||
@ -154,10 +126,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
38,
|
||||
54
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "GenericTypeAnnotation",
|
||||
"start": 40,
|
||||
@ -172,10 +140,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
54
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -191,10 +155,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
54
|
||||
],
|
||||
"name": "HTMLDivElement"
|
||||
}
|
||||
}
|
||||
@ -213,13 +173,10 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
55,
|
||||
57
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
57
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
57
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
57
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 22
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
22
|
||||
],
|
||||
"name": "createElement"
|
||||
},
|
||||
"generator": false,
|
||||
@ -92,10 +76,6 @@
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
23,
|
||||
37
|
||||
],
|
||||
"name": "tagName",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -111,10 +91,6 @@
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
30,
|
||||
37
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "StringLiteralTypeAnnotation",
|
||||
"start": 32,
|
||||
@ -129,10 +105,6 @@
|
||||
"column": 37
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
32,
|
||||
37
|
||||
],
|
||||
"value": "div",
|
||||
"rawValue": "div",
|
||||
"raw": "'div'"
|
||||
@ -154,10 +126,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
38,
|
||||
54
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "GenericTypeAnnotation",
|
||||
"start": 40,
|
||||
@ -172,10 +140,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
54
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -191,10 +155,6 @@
|
||||
"column": 54
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
54
|
||||
],
|
||||
"name": "HTMLDivElement"
|
||||
}
|
||||
}
|
||||
@ -213,13 +173,10 @@
|
||||
"column": 57
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
55,
|
||||
57
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
35
test/fixtures/flow/tuples/1/expected.json
vendored
35
test/fixtures/flow/tuples/1/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
16
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
15
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
10
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
10
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "TupleTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
10
|
||||
],
|
||||
"types": []
|
||||
}
|
||||
}
|
||||
@ -146,10 +118,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
13,
|
||||
15
|
||||
],
|
||||
"elements": []
|
||||
}
|
||||
}
|
||||
@ -157,5 +125,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
59
test/fixtures/flow/tuples/2/expected.json
vendored
59
test/fixtures/flow/tuples/2/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
25
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
25
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
25
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
24
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
16
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
16
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "TupleTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
16
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
@ -143,10 +115,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
15
|
||||
],
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterInstantiation",
|
||||
"start": 12,
|
||||
@ -161,10 +129,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
15
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
@ -180,10 +144,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
13,
|
||||
14
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -199,10 +159,6 @@
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
13,
|
||||
14
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
}
|
||||
@ -222,10 +178,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
12
|
||||
],
|
||||
"name": "Foo"
|
||||
}
|
||||
}
|
||||
@ -247,10 +199,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
24
|
||||
],
|
||||
"elements": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@ -266,10 +214,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
23
|
||||
],
|
||||
"name": "foo"
|
||||
}
|
||||
]
|
||||
@ -279,5 +223,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
45
test/fixtures/flow/tuples/3/expected.json
vendored
45
test/fixtures/flow/tuples/3/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
26
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
17
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
17
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "TupleTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
17
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"type": "NumberTypeAnnotation",
|
||||
@ -142,11 +114,7 @@
|
||||
"line": 1,
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
15
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -166,10 +134,6 @@
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
20,
|
||||
26
|
||||
],
|
||||
"elements": [
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -185,10 +149,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
24
|
||||
],
|
||||
"value": 123,
|
||||
"rawValue": 123,
|
||||
"raw": "123"
|
||||
@ -200,5 +160,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
55
test/fixtures/flow/tuples/4/expected.json
vendored
55
test/fixtures/flow/tuples/4/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
41
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
41
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
41
|
||||
],
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
@ -69,10 +57,6 @@
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
40
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 4,
|
||||
@ -87,10 +71,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
4,
|
||||
24
|
||||
],
|
||||
"name": "a",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -106,10 +86,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
6,
|
||||
24
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "TupleTypeAnnotation",
|
||||
"start": 8,
|
||||
@ -124,10 +100,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
24
|
||||
],
|
||||
"types": [
|
||||
{
|
||||
"type": "NumberTypeAnnotation",
|
||||
@ -142,11 +114,7 @@
|
||||
"line": 1,
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
15
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "StringTypeAnnotation",
|
||||
@ -161,11 +129,7 @@
|
||||
"line": 1,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
23
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -185,10 +149,6 @@
|
||||
"column": 40
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
27,
|
||||
40
|
||||
],
|
||||
"elements": [
|
||||
{
|
||||
"type": "Literal",
|
||||
@ -204,10 +164,6 @@
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
28,
|
||||
31
|
||||
],
|
||||
"value": 123,
|
||||
"rawValue": 123,
|
||||
"raw": "123"
|
||||
@ -226,10 +182,6 @@
|
||||
"column": 39
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
33,
|
||||
39
|
||||
],
|
||||
"value": "duck",
|
||||
"rawValue": "duck",
|
||||
"raw": "\"duck\""
|
||||
@ -241,5 +193,6 @@
|
||||
"kind": "var"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
25
test/fixtures/flow/type-alias/1/expected.json
vendored
25
test/fixtures/flow/type-alias/1/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
19
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
19
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
19
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 5,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
9
|
||||
],
|
||||
"name": "FBID"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -88,13 +72,10 @@
|
||||
"line": 1,
|
||||
"column": 18
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
18
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
47
test/fixtures/flow/type-alias/2/expected.json
vendored
47
test/fixtures/flow/type-alias/2/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
20
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
20
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
20
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 5,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 8
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
5,
|
||||
8
|
||||
],
|
||||
"name": "Foo"
|
||||
},
|
||||
"typeParameters": {
|
||||
@ -88,10 +72,6 @@
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
8,
|
||||
11
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@ -107,10 +87,6 @@
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
10
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
]
|
||||
@ -129,10 +105,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
20
|
||||
],
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterInstantiation",
|
||||
"start": 17,
|
||||
@ -147,10 +119,6 @@
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
17,
|
||||
20
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "GenericTypeAnnotation",
|
||||
@ -166,10 +134,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
19
|
||||
],
|
||||
"typeParameters": null,
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
@ -185,10 +149,6 @@
|
||||
"column": 19
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
19
|
||||
],
|
||||
"name": "T"
|
||||
}
|
||||
}
|
||||
@ -208,14 +168,11 @@
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
17
|
||||
],
|
||||
"name": "Bar"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
29
test/fixtures/flow/type-alias/3/expected.json
vendored
29
test/fixtures/flow/type-alias/3/expected.json
vendored
@ -12,10 +12,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
25
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
25
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
25
|
||||
],
|
||||
"declaration": {
|
||||
"type": "TypeAlias",
|
||||
"start": 7,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
7,
|
||||
25
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 12,
|
||||
@ -86,10 +70,6 @@
|
||||
"column": 15
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
12,
|
||||
15
|
||||
],
|
||||
"name": "Foo"
|
||||
},
|
||||
"typeParameters": null,
|
||||
@ -106,16 +86,13 @@
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
18,
|
||||
24
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"specifiers": [],
|
||||
"source": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 44
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
44
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 44
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
44
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 44
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
44
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
12
|
||||
],
|
||||
"name": "foo"
|
||||
},
|
||||
"generator": false,
|
||||
@ -92,10 +76,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
13,
|
||||
24
|
||||
],
|
||||
"name": "numVal",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -111,10 +91,6 @@
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
19,
|
||||
24
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "AnyTypeAnnotation",
|
||||
"start": 21,
|
||||
@ -128,11 +104,7 @@
|
||||
"line": 1,
|
||||
"column": 24
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
24
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -150,10 +122,6 @@
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
26,
|
||||
41
|
||||
],
|
||||
"name": "otherVal",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -169,10 +137,6 @@
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
34,
|
||||
41
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "MixedTypeAnnotation",
|
||||
"start": 36,
|
||||
@ -186,11 +150,7 @@
|
||||
"line": 1,
|
||||
"column": 41
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
41
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -209,13 +169,10 @@
|
||||
"column": 44
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
42,
|
||||
44
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 56
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
56
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 56
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
56
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 56
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
56
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
12
|
||||
],
|
||||
"name": "foo"
|
||||
},
|
||||
"generator": false,
|
||||
@ -92,10 +76,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
13,
|
||||
53
|
||||
],
|
||||
"name": "callback",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -111,10 +91,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
53
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 23,
|
||||
@ -129,10 +105,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
23,
|
||||
53
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "FunctionTypeParam",
|
||||
@ -148,10 +120,6 @@
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
31
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 24,
|
||||
@ -166,10 +134,6 @@
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
26
|
||||
],
|
||||
"name": "_1"
|
||||
},
|
||||
"optional": false,
|
||||
@ -186,11 +150,7 @@
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
27,
|
||||
31
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -207,10 +167,6 @@
|
||||
"column": 42
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
33,
|
||||
42
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 33,
|
||||
@ -225,10 +181,6 @@
|
||||
"column": 35
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
33,
|
||||
35
|
||||
],
|
||||
"name": "_2"
|
||||
},
|
||||
"optional": false,
|
||||
@ -245,11 +197,7 @@
|
||||
"line": 1,
|
||||
"column": 42
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
42
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -267,11 +215,7 @@
|
||||
"line": 1,
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
47,
|
||||
53
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeParameters": null
|
||||
}
|
||||
@ -292,13 +236,10 @@
|
||||
"column": 56
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
54,
|
||||
56
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 67
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
67
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 67
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
67
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 67
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
67
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
12
|
||||
],
|
||||
"name": "foo"
|
||||
},
|
||||
"generator": false,
|
||||
@ -92,10 +76,6 @@
|
||||
"column": 64
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
13,
|
||||
64
|
||||
],
|
||||
"name": "callback",
|
||||
"typeAnnotation": {
|
||||
"type": "TypeAnnotation",
|
||||
@ -111,10 +91,6 @@
|
||||
"column": 64
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
64
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 23,
|
||||
@ -129,10 +105,6 @@
|
||||
"column": 64
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
23,
|
||||
64
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "FunctionTypeParam",
|
||||
@ -148,10 +120,6 @@
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
31
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 24,
|
||||
@ -166,10 +134,6 @@
|
||||
"column": 26
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
24,
|
||||
26
|
||||
],
|
||||
"name": "_1"
|
||||
},
|
||||
"optional": false,
|
||||
@ -186,11 +150,7 @@
|
||||
"line": 1,
|
||||
"column": 31
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
27,
|
||||
31
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -208,10 +168,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
53
|
||||
],
|
||||
"name": {
|
||||
"type": "Identifier",
|
||||
"start": 36,
|
||||
@ -226,10 +182,6 @@
|
||||
"column": 39
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
36,
|
||||
39
|
||||
],
|
||||
"name": "foo"
|
||||
},
|
||||
"optional": false,
|
||||
@ -247,10 +199,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
53
|
||||
],
|
||||
"typeParameters": {
|
||||
"type": "TypeParameterInstantiation",
|
||||
"start": 45,
|
||||
@ -265,10 +213,6 @@
|
||||
"column": 53
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
45,
|
||||
53
|
||||
],
|
||||
"params": [
|
||||
{
|
||||
"type": "NumberTypeAnnotation",
|
||||
@ -283,11 +227,7 @@
|
||||
"line": 1,
|
||||
"column": 52
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
46,
|
||||
52
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -305,10 +245,6 @@
|
||||
"column": 45
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
40,
|
||||
45
|
||||
],
|
||||
"name": "Array"
|
||||
}
|
||||
}
|
||||
@ -326,11 +262,7 @@
|
||||
"line": 1,
|
||||
"column": 64
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
58,
|
||||
64
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeParameters": null
|
||||
}
|
||||
@ -351,13 +283,10 @@
|
||||
"column": 67
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
65,
|
||||
67
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
23
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
23
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
23
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
12
|
||||
],
|
||||
"name": "foo"
|
||||
},
|
||||
"generator": false,
|
||||
@ -92,10 +76,6 @@
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
21
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "NumberTypeAnnotation",
|
||||
"start": 15,
|
||||
@ -109,11 +89,7 @@
|
||||
"line": 1,
|
||||
"column": 21
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
21
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"body": {
|
||||
@ -130,13 +106,10 @@
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
23
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
@ -12,10 +12,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start": 0,
|
||||
@ -30,10 +26,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"sourceType": "module",
|
||||
"body": [
|
||||
{
|
||||
@ -50,10 +42,6 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
0,
|
||||
27
|
||||
],
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start": 9,
|
||||
@ -68,10 +56,6 @@
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
9,
|
||||
12
|
||||
],
|
||||
"name": "foo"
|
||||
},
|
||||
"generator": false,
|
||||
@ -92,10 +76,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
14,
|
||||
25
|
||||
],
|
||||
"typeAnnotation": {
|
||||
"type": "FunctionTypeAnnotation",
|
||||
"start": 15,
|
||||
@ -110,10 +90,6 @@
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
15,
|
||||
25
|
||||
],
|
||||
"params": [],
|
||||
"rest": null,
|
||||
"returnType": {
|
||||
@ -129,11 +105,7 @@
|
||||
"line": 1,
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
21,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeParameters": null
|
||||
}
|
||||
@ -152,13 +124,10 @@
|
||||
"column": 27
|
||||
}
|
||||
},
|
||||
"range": [
|
||||
25,
|
||||
27
|
||||
],
|
||||
"body": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"comments": []
|
||||
}
|
||||
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