New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

decaffeinate-parser

Package Overview
Dependencies
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decaffeinate-parser - npm Package Compare versions

Comparing version 18.0.0 to 18.1.0

dist/util/getLocation.d.ts

1

dist/ext/coffee-script.js

@@ -9,2 +9,3 @@ "use strict";

exports.patchCoffeeScript = patchCoffeeScript;
// tslint:disable-next-line no-any
function invert() {

@@ -11,0 +12,0 @@ this.inverted = !this.inverted;

4

dist/mappers/mapArr.js
"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapArr(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var members = node.objects.map(function (object) { return mapAny_1["default"](context, object); });

@@ -9,0 +9,0 @@ return new nodes_1.ArrayInitialiser(line, column, start, end, raw, members);

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var UnsupportedNodeError_1 = require("../util/UnsupportedNodeError");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
var COMPOUND_ASSIGN_OPS = {

@@ -30,3 +30,3 @@ '-=': nodes_1.SubtractOp.name,

}
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
if (node.context) {

@@ -33,0 +33,0 @@ var opName = COMPOUND_ASSIGN_OPS[node.context];

@@ -7,4 +7,4 @@ "use strict";

var nodes_2 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapBlock(context, node) {

@@ -23,3 +23,3 @@ var childContext = context;

}
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var previousTokenIndex = context.sourceTokens.indexOfTokenNearSourceIndex(start).previous();

@@ -47,3 +47,3 @@ var previousToken = previousTokenIndex ? context.sourceTokens.tokenAtIndex(previousTokenIndex) : null;

else if (property instanceof nodes_1.Assign) {
var _b = mapBase_1["default"](childContext, property), line = _b.line, column = _b.column, start = _b.start, end = _b.end, raw = _b.raw;
var _b = getLocation_1["default"](childContext, property), line = _b.line, column = _b.column, start = _b.start, end = _b.end, raw = _b.raw;
var key = mapAny_1["default"](childContext, property.variable);

@@ -50,0 +50,0 @@ var value = mapAny_1["default"](childContext, property.value);

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var mapBase_1 = require("./mapBase");
var getLocation_1 = require("../util/getLocation");
function mapBool(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
return new nodes_1.Bool(line, column, start, end, raw, JSON.parse(node.val));
}
exports["default"] = mapBool;

@@ -7,2 +7,3 @@ "use strict";

var nodes_2 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var isHeregexTemplateNode_1 = require("../util/isHeregexTemplateNode");

@@ -14,5 +15,4 @@ var locationsEqual_1 = require("../util/locationsEqual");

var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapCall(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
if (isHeregexTemplateNode_1["default"](node, context)) {

@@ -77,3 +77,3 @@ var firstArg = node.args[0];

}
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var callee = mapAny_1["default"](context, node.variable);

@@ -93,3 +93,3 @@ var args = node.args.map(function (arg) { return mapAny_1["default"](context, arg); });

}
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var expression = mapAny_1["default"](context, node.variable);

@@ -96,0 +96,0 @@ var args = node.args.map(function (arg) { return mapAny_1["default"](context, arg); });

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
var mapPossiblyEmptyBlock_1 = require("./mapPossiblyEmptyBlock");
function mapClass(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var nameAssignee = node.variable ? mapAny_1["default"](context, node.variable) : null;

@@ -10,0 +10,0 @@ var parent = node.parent ? mapAny_1["default"](context, node.parent) : null;

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
var mapPossiblyEmptyBlock_1 = require("./mapPossiblyEmptyBlock");
function mapCode(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var Node = getNodeTypeForCode(node);

@@ -10,0 +10,0 @@ var childContext = context.updateState(function (s) { return s.dropCurrentClass(); });

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapExistence(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
return new nodes_1.UnaryExistsOp(line, column, start, end, raw, mapAny_1["default"](context, node.expression));
}
exports["default"] = mapExistence;
"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var mapBase_1 = require("./mapBase");
var getLocation_1 = require("../util/getLocation");
function mapExpansion(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
return new nodes_1.Expansion(line, column, start, end, raw);
}
exports["default"] = mapExpansion;
"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapExtends(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
return new nodes_1.ExtendsOp(line, column, start, end, raw, mapAny_1["default"](context, node.child), mapAny_1["default"](context, node.parent));
}
exports["default"] = mapExtends;
"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
var mapPossiblyEmptyBlock_1 = require("./mapPossiblyEmptyBlock");
function mapFor(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var keyAssignee = node.index ? mapAny_1["default"](context, node.index) : null;

@@ -10,0 +10,0 @@ var valAssignee = node.name ? mapAny_1["default"](context, node.name) : null;

@@ -5,7 +5,7 @@ "use strict";

var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
var mapPossiblyEmptyBlock_1 = require("./mapPossiblyEmptyBlock");
function mapIf(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var condition = mapAny_1["default"](context, node.condition);

@@ -12,0 +12,0 @@ var consequent = mapPossiblyEmptyBlock_1["default"](context, node.body);

@@ -5,8 +5,8 @@ "use strict";

var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapIn(context, node) {
// We don't use the `negated` flag on `node` because it gets set to
// `true` when a parent `If` is an `unless`.
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var left = mapAny_1["default"](context, node.object);

@@ -13,0 +13,0 @@ var right = mapAny_1["default"](context, node.array);

@@ -6,2 +6,3 @@ "use strict";

var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var isStringAtPosition_1 = require("../util/isStringAtPosition");

@@ -12,6 +13,5 @@ var makeHeregex_1 = require("../util/makeHeregex");

var parseRegExp_1 = require("../util/parseRegExp");
var mapBase_1 = require("./mapBase");
var HEREGEX_PATTERN = /^\/\/\/((?:.|\s)*)\/\/\/([gimy]*)$/;
function mapLiteral(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
if (node.value === 'this') {

@@ -18,0 +18,0 @@ return new nodes_1.This(line, column, start, end, raw);

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var mapBase_1 = require("./mapBase");
var getLocation_1 = require("../util/getLocation");
function mapNull(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
return new nodes_1.Null(line, column, start, end, raw);
}
exports["default"] = mapNull;

@@ -5,12 +5,12 @@ "use strict";

var nodes_2 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var UnsupportedNodeError_1 = require("../util/UnsupportedNodeError");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
var mapValue_1 = require("./mapValue");
function mapObj(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var members = [];
for (var _i = 0, _b = node.properties; _i < _b.length; _i++) {
var property = _b[_i];
var _c = mapBase_1["default"](context, property), line_1 = _c.line, column_1 = _c.column, start_1 = _c.start, end_1 = _c.end, raw_1 = _c.raw;
var _c = getLocation_1["default"](context, property), line_1 = _c.line, column_1 = _c.column, start_1 = _c.start, end_1 = _c.end, raw_1 = _c.raw;
if (property instanceof nodes_1.Value) {

@@ -17,0 +17,0 @@ // shorthand property

@@ -17,2 +17,3 @@ "use strict";

var nodes_2 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var getOperatorInfoInRange_1 = require("../util/getOperatorInfoInRange");

@@ -25,3 +26,2 @@ var isChainedComparison_1 = require("../util/isChainedComparison");

var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapOp(context, node) {

@@ -37,3 +37,3 @@ if (isChainedComparison_1["default"](node)) {

function mapChainedComparisonOp(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var coffeeOperands = unwindChainedComparison_1["default"](node);

@@ -137,7 +137,7 @@ var operands = coffeeOperands.map(function (operand) { return mapAny_1["default"](context, operand); });

}
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
return new nodes_2.NewOp(line, column, start, end, raw, mapAny_1["default"](context, node.first), []);
}
function mapYieldOp(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
if (node.first instanceof nodes_1.Return) {

@@ -152,3 +152,3 @@ var expression = node.first.expression;

function mapBinaryOp(context, node, Op) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
if (!node.second) {

@@ -160,3 +160,3 @@ throw new Error("unexpected '" + node.operator + "' operator with only one operand: " + util_1.inspect(node));

function mapUnaryOp(context, node, Op) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
if (node.second) {

@@ -163,0 +163,0 @@ throw new Error("unexpected '" + node.operator + "' operator with two operands: " + util_1.inspect(node));

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapParam(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var param = mapAny_1["default"](context, node.name);

@@ -9,0 +9,0 @@ if (node.value) {

@@ -5,6 +5,6 @@ "use strict";

var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapRange(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
if (!node.from || !node.to) {

@@ -11,0 +11,0 @@ throw new Error("'from' or 'to' unexpectedly missing: " + util_1.inspect(node));

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapReturn(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var argument = node.expression ? mapAny_1["default"](context, node.expression) : null;

@@ -9,0 +9,0 @@ return new nodes_1.Return(line, column, start, end, raw, argument);

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapSplat(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
return new nodes_1.Spread(line, column, start, end, raw, mapAny_1["default"](context, node.name));
}
exports["default"] = mapSplat;

@@ -5,7 +5,7 @@ "use strict";

var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
var mapPossiblyEmptyBlock_1 = require("./mapPossiblyEmptyBlock");
function mapSwitch(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var expression = node.subject ? mapAny_1["default"](context, node.subject) : null;

@@ -25,3 +25,3 @@ var cases = node.cases.map(function (_a) {

var caseLine = locationForIndex.line, caseColumn = locationForIndex.column;
var end = mapBase_1["default"](context, body).end;
var end = getLocation_1["default"](context, body).end;
return new nodes_1.SwitchCase(caseLine + 1, caseColumn + 1, whenToken.start, end, context.source.slice(whenToken.start, end), switchConditions, consequent);

@@ -28,0 +28,0 @@ });

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapThrow(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var expression = node.expression ? mapAny_1["default"](context, node.expression) : null;

@@ -9,0 +9,0 @@ return new nodes_1.Throw(line, column, start, end, raw, expression);

"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
var mapPossiblyEmptyBlock_1 = require("./mapPossiblyEmptyBlock");
function mapTry(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
return new nodes_1.Try(line, column, start, end, raw, mapPossiblyEmptyBlock_1["default"](context, node.attempt), node.errorVariable ? mapAny_1["default"](context, node.errorVariable) : null, mapPossiblyEmptyBlock_1["default"](context, node.recovery), mapPossiblyEmptyBlock_1["default"](context, node.ensure));
}
exports["default"] = mapTry;
"use strict";
exports.__esModule = true;
var nodes_1 = require("../nodes");
var mapBase_1 = require("./mapBase");
var getLocation_1 = require("../util/getLocation");
function mapUndefined(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
return new nodes_1.Undefined(line, column, start, end, raw);
}
exports["default"] = mapUndefined;

@@ -7,11 +7,11 @@ "use strict";

var nodes_2 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var UnsupportedNodeError_1 = require("../util/UnsupportedNodeError");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
function mapValue(context, node) {
var base = mapBase_1["default"](context, node);
return node.properties.reduce(function (reduced, property) { return propertyReducer(context, base, reduced, property); }, mapAny_1["default"](context, node.base));
var location = getLocation_1["default"](context, node);
return node.properties.reduce(function (reduced, property) { return propertyReducer(context, location, reduced, property); }, mapAny_1["default"](context, node.base));
}
exports["default"] = mapValue;
function propertyReducer(context, base, reduced, property) {
function propertyReducer(context, location, reduced, property) {
if (property instanceof nodes_1.Access) {

@@ -44,3 +44,3 @@ var name = property.name;

var AccessOp = property.soak ? nodes_2.SoakedProtoMemberAccessOp : nodes_2.ProtoMemberAccessOp;
return new AccessOp(base.line, base.column, base.start, last + 1, context.source.slice(base.start, last + 1), reduced);
return new AccessOp(location.line, location.column, location.start, last + 1, context.source.slice(location.start, last + 1), reduced);
}

@@ -53,3 +53,3 @@ else {

var AccessOp = property.soak ? nodes_2.SoakedMemberAccessOp : nodes_2.MemberAccessOp;
return new AccessOp(base.line, base.column, base.start, last + 1, context.source.slice(base.start, last + 1), reduced, member);
return new AccessOp(location.line, location.column, location.start, last + 1, context.source.slice(location.start, last + 1), reduced, member);
}

@@ -66,3 +66,3 @@ }

}
return new NodeClass(base.line, base.column, base.start, last + 1, context.source.slice(base.start, last + 1), reduced, mapAny_1["default"](context, property.index));
return new NodeClass(location.line, location.column, location.start, last + 1, context.source.slice(location.start, last + 1), reduced, mapAny_1["default"](context, property.index));
}

@@ -78,3 +78,3 @@ else if (property instanceof nodes_1.Slice) {

var SliceClass = property.soak ? nodes_2.SoakedSlice : nodes_2.Slice;
return new SliceClass(base.line, base.column, base.start, last + 1, context.source.slice(base.start, last + 1), reduced, property.range.from ? mapAny_1["default"](context, property.range.from) : null, property.range.to ? mapAny_1["default"](context, property.range.to) : null, !property.range.exclusive);
return new SliceClass(location.line, location.column, location.start, last + 1, context.source.slice(location.start, last + 1), reduced, property.range.from ? mapAny_1["default"](context, property.range.from) : null, property.range.to ? mapAny_1["default"](context, property.range.to) : null, !property.range.exclusive);
}

@@ -81,0 +81,0 @@ else {

@@ -5,7 +5,7 @@ "use strict";

var nodes_1 = require("../nodes");
var getLocation_1 = require("../util/getLocation");
var mapAny_1 = require("./mapAny");
var mapBase_1 = require("./mapBase");
var mapPossiblyEmptyBlock_1 = require("./mapPossiblyEmptyBlock");
function mapWhile(context, node) {
var _a = mapBase_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var _a = getLocation_1["default"](context, node), line = _a.line, column = _a.column, start = _a.start, end = _a.end, raw = _a.raw;
var startTokenIndex = context.sourceTokens.indexOfTokenStartingAtSourceIndex(start);

@@ -12,0 +12,0 @@ var startToken = startTokenIndex && context.sourceTokens.tokenAtIndex(startTokenIndex);

import SourceToken from 'coffee-lex/dist/SourceToken';
import ParseContext from './util/ParseContext';
export interface RealNode {
type: string;
line: number;
column: number;
range: [number, number];
raw: string;
}
export declare class Node {
export declare type ChildField = Node | Array<Node | null> | null;
export declare abstract class Node {
readonly type: string;

@@ -19,2 +13,4 @@ readonly line: number;

constructor(type: string, line: number, column: number, start: number, end: number, raw: string);
getChildren(): Array<Node>;
abstract getChildFields(): Array<ChildField>;
}

@@ -24,2 +20,3 @@ export declare class Identifier extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, data: string);
getChildFields(): Array<ChildField>;
}

@@ -31,2 +28,3 @@ export declare class Bool extends Node {

static false(): Bool;
getChildFields(): Array<ChildField>;
}

@@ -36,2 +34,3 @@ export declare class JavaScript extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, data: string);
getChildFields(): Array<ChildField>;
}

@@ -41,2 +40,3 @@ export declare class Number extends Node {

constructor(type: string, line: number, column: number, start: number, end: number, raw: string, data: number);
getChildFields(): Array<ChildField>;
}

@@ -56,5 +56,7 @@ export declare class Float extends Number {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node, member: Identifier);
getChildFields(): Array<ChildField>;
}
export declare class ProtoMemberAccessOp extends AccessOp {
constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node);
getChildFields(): Array<ChildField>;
}

@@ -64,5 +66,7 @@ export declare class SoakedMemberAccessOp extends AccessOp {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node, member: Identifier);
getChildFields(): Array<ChildField>;
}
export declare class SoakedProtoMemberAccessOp extends AccessOp {
constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node);
getChildFields(): Array<ChildField>;
}

@@ -72,2 +76,3 @@ export declare class DynamicMemberAccessOp extends AccessOp {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node, indexingExpr: Node);
getChildFields(): Array<ChildField>;
}

@@ -77,2 +82,3 @@ export declare class SoakedDynamicMemberAccessOp extends AccessOp {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node, indexingExpr: Node);
getChildFields(): Array<ChildField>;
}

@@ -82,2 +88,3 @@ export declare class Quasi extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, data: string);
getChildFields(): Array<ChildField>;
}

@@ -88,2 +95,3 @@ export declare class String extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, quasis: Array<Quasi>, expressions: Array<Node | null>);
getChildFields(): Array<ChildField>;
}

@@ -93,2 +101,3 @@ export declare class ObjectInitialiser extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, members: Array<ObjectInitialiserMember | AssignOp>);
getChildFields(): Array<ChildField>;
}

@@ -99,2 +108,3 @@ export declare class ObjectInitialiserMember extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, key: Node, expression: Node);
getChildFields(): Array<ChildField>;
}

@@ -107,2 +117,3 @@ export declare class Conditional extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, condition: Node, consequent: Block | null, alternate: Block | null, isUnless: boolean);
getChildFields(): Array<ChildField>;
}

@@ -113,2 +124,3 @@ export declare class Program extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, body: Block | null, context: ParseContext);
getChildFields(): Array<ChildField>;
}

@@ -119,2 +131,3 @@ export declare class Block extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, statements: Array<Node>, inline: boolean);
getChildFields(): Array<ChildField>;
withInline(inline: boolean): Block;

@@ -125,2 +138,3 @@ }

constructor(line: number, column: number, start: number, end: number, raw: string, body: Node | null);
getChildFields(): Array<ChildField>;
}

@@ -133,2 +147,3 @@ export declare class While extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, condition: Node, guard: Node | null, body: Node | null, isUntil: boolean);
getChildFields(): Array<ChildField>;
}

@@ -146,2 +161,3 @@ export declare abstract class For extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, keyAssignee: Node | null, valAssignee: Node | null, target: Node, filter: Node | null, body: Block | null, isOwn: boolean);
getChildFields(): Array<ChildField>;
}

@@ -151,2 +167,3 @@ export declare class ForIn extends For {

constructor(line: number, column: number, start: number, end: number, raw: string, keyAssignee: Node | null, valAssignee: Node | null, target: Node, filter: Node | null, body: Block | null, step: Node | null);
getChildFields(): Array<ChildField>;
}

@@ -158,2 +175,3 @@ export declare class Switch extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node | null, cases: Array<SwitchCase>, alternate: Block | null);
getChildFields(): Array<ChildField>;
}

@@ -164,2 +182,3 @@ export declare class SwitchCase extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, conditions: Array<Node>, consequent: Block | null);
getChildFields(): Array<ChildField>;
}

@@ -183,8 +202,11 @@ export declare class RegexFlags {

constructor(line: number, column: number, start: number, end: number, raw: string, quasis: Array<Quasi>, expressions: Array<Node | null>, flags: RegexFlags);
getChildFields(): Array<ChildField>;
}
export declare class Null extends Node {
constructor(line: number, column: number, start: number, end: number, raw: string);
getChildFields(): Array<ChildField>;
}
export declare class Undefined extends Node {
constructor(line: number, column: number, start: number, end: number, raw: string);
getChildFields(): Array<ChildField>;
}

@@ -195,2 +217,3 @@ export declare class Regex extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, pattern: string, flags: RegexFlags);
getChildFields(): Array<ChildField>;
}

@@ -200,2 +223,3 @@ export declare class Return extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node | null);
getChildFields(): Array<ChildField>;
}

@@ -205,5 +229,7 @@ export declare class YieldReturn extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node | null);
getChildFields(): Array<ChildField>;
}
export declare class This extends Node {
constructor(line: number, column: number, start: number, end: number, raw: string);
getChildFields(): Array<ChildField>;
}

@@ -213,2 +239,3 @@ export declare class Throw extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node | null);
getChildFields(): Array<ChildField>;
}

@@ -218,2 +245,3 @@ export declare class ArrayInitialiser extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, members: Array<Node>);
getChildFields(): Array<ChildField>;
}

@@ -224,2 +252,3 @@ export declare class DefaultParam extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, param: Node, defaultValue: Node);
getChildFields(): Array<ChildField>;
}

@@ -229,11 +258,15 @@ export declare class Rest extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node);
getChildFields(): Array<ChildField>;
}
export declare class Expansion extends Node {
constructor(line: number, column: number, start: number, end: number, raw: string);
getChildFields(): Array<ChildField>;
}
export declare class Break extends Node {
constructor(line: number, column: number, start: number, end: number, raw: string);
getChildFields(): Array<ChildField>;
}
export declare class Continue extends Node {
constructor(line: number, column: number, start: number, end: number, raw: string);
getChildFields(): Array<ChildField>;
}

@@ -243,2 +276,3 @@ export declare class Spread extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node);
getChildFields(): Array<ChildField>;
}

@@ -250,2 +284,3 @@ export declare class Range extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, left: Node, right: Node, isInclusive: boolean);
getChildFields(): Array<ChildField>;
}

@@ -256,2 +291,3 @@ export declare abstract class BinaryOp extends Node {

constructor(type: string, line: number, column: number, start: number, end: number, raw: string, left: Node, right: Node);
getChildFields(): Array<ChildField>;
}

@@ -261,2 +297,3 @@ export declare abstract class UnaryOp extends Node {

constructor(type: string, line: number, column: number, start: number, end: number, raw: string, expression: Node);
getChildFields(): Array<ChildField>;
}

@@ -267,2 +304,3 @@ export declare class ChainedComparisonOp extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, operands: Array<Node>, operators: Array<OperatorInfo>);
getChildFields(): Array<ChildField>;
}

@@ -379,2 +417,3 @@ export declare class OperatorInfo {

constructor(type: string, line: number, column: number, start: number, end: number, raw: string, assignee: Node, expression: Node);
getChildFields(): Array<ChildField>;
}

@@ -421,2 +460,3 @@ export declare class AssignOp extends BaseAssignOp {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node, left: Node | null, right: Node | null, isInclusive: boolean);
getChildFields(): Array<ChildField>;
}

@@ -429,2 +469,3 @@ export declare class SoakedSlice extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node, left: Node | null, right: Node | null, isInclusive: boolean);
getChildFields(): Array<ChildField>;
}

@@ -435,2 +476,3 @@ export declare abstract class BaseFunction extends Node {

constructor(type: string, line: number, column: number, start: number, end: number, raw: string, parameters: Array<Node>, body: Block | null);
getChildFields(): Array<ChildField>;
abstract withParameters(parameters: Array<Node>): BaseFunction;

@@ -460,2 +502,3 @@ }

constructor(line: number, column: number, start: number, end: number, raw: string, body: Node | null, catchAssignee: Node | null, catchBody: Node | null, finallyBody: Node | null);
getChildFields(): Array<ChildField>;
}

@@ -476,2 +519,3 @@ export declare class Constructor extends BaseAssignOp {

constructor(line: number, column: number, start: number, end: number, raw: string, nameAssignee: Node | null, name: Node | null, body: Block | null, boundMembers: Array<ClassProtoAssignOp>, parent: Node | null, ctor: Constructor | null);
getChildFields(): Array<ChildField>;
}

@@ -482,2 +526,3 @@ export declare class FunctionApplication extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, fn: Node, args: Array<Node>);
getChildFields(): Array<ChildField>;
}

@@ -488,8 +533,11 @@ export declare class SoakedFunctionApplication extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, fn: Node, args: Array<Node>);
getChildFields(): Array<ChildField>;
}
export declare class Super extends Node {
constructor(line: number, column: number, start: number, end: number, raw: string);
getChildFields(): Array<ChildField>;
}
export declare class BareSuperFunctionApplication extends Node {
constructor(line: number, column: number, start: number, end: number, raw: string);
getChildFields(): Array<ChildField>;
}

@@ -500,2 +548,3 @@ export declare class NewOp extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, ctor: Node, args: Array<Node>);
getChildFields(): Array<ChildField>;
}

@@ -506,2 +555,3 @@ export declare class SoakedNewOp extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, ctor: Node, args: Array<Node>);
getChildFields(): Array<ChildField>;
}

@@ -511,2 +561,3 @@ export declare class DoOp extends Node {

constructor(line: number, column: number, start: number, end: number, raw: string, expression: Node);
getChildFields(): Array<ChildField>;
}

@@ -24,2 +24,15 @@ "use strict";

}
Node.prototype.getChildren = function () {
var children = [];
for (var _i = 0, _a = this.getChildFields(); _i < _a.length; _i++) {
var childField = _a[_i];
if (Array.isArray(childField)) {
children.push.apply(children, childField.filter(function (node) { return node !== null; }));
}
else if (childField) {
children.push(childField);
}
}
return children;
};
return Node;

@@ -35,2 +48,5 @@ }());

}
Identifier.prototype.getChildFields = function () {
return [];
};
return Identifier;

@@ -52,2 +68,5 @@ }(Node));

};
Bool.prototype.getChildFields = function () {
return [];
};
return Bool;

@@ -63,2 +82,5 @@ }(Node));

}
JavaScript.prototype.getChildFields = function () {
return [];
};
return JavaScript;

@@ -74,2 +96,5 @@ }(Node));

}
Number.prototype.getChildFields = function () {
return [];
};
return Number;

@@ -111,2 +136,5 @@ }(Node));

}
MemberAccessOp.prototype.getChildFields = function () {
return [this.expression, this.member];
};
return MemberAccessOp;

@@ -120,2 +148,5 @@ }(AccessOp));

}
ProtoMemberAccessOp.prototype.getChildFields = function () {
return [this.expression];
};
return ProtoMemberAccessOp;

@@ -131,2 +162,5 @@ }(AccessOp));

}
SoakedMemberAccessOp.prototype.getChildFields = function () {
return [this.expression, this.member];
};
return SoakedMemberAccessOp;

@@ -140,2 +174,5 @@ }(AccessOp));

}
SoakedProtoMemberAccessOp.prototype.getChildFields = function () {
return [this.expression];
};
return SoakedProtoMemberAccessOp;

@@ -151,2 +188,5 @@ }(AccessOp));

}
DynamicMemberAccessOp.prototype.getChildFields = function () {
return [this.expression, this.indexingExpr];
};
return DynamicMemberAccessOp;

@@ -162,2 +202,5 @@ }(AccessOp));

}
SoakedDynamicMemberAccessOp.prototype.getChildFields = function () {
return [this.expression, this.indexingExpr];
};
return SoakedDynamicMemberAccessOp;

@@ -173,2 +216,5 @@ }(AccessOp));

}
Quasi.prototype.getChildFields = function () {
return [];
};
return Quasi;

@@ -185,2 +231,5 @@ }(Node));

}
String.prototype.getChildFields = function () {
return [this.quasis, this.expressions];
};
return String;

@@ -196,2 +245,5 @@ }(Node));

}
ObjectInitialiser.prototype.getChildFields = function () {
return [this.members];
};
return ObjectInitialiser;

@@ -208,2 +260,5 @@ }(Node));

}
ObjectInitialiserMember.prototype.getChildFields = function () {
return [this.key, this.expression];
};
return ObjectInitialiserMember;

@@ -222,2 +277,5 @@ }(Node));

}
Conditional.prototype.getChildFields = function () {
return [this.condition, this.consequent, this.alternate];
};
return Conditional;

@@ -234,2 +292,5 @@ }(Node));

}
Program.prototype.getChildFields = function () {
return [this.body];
};
return Program;

@@ -246,2 +307,5 @@ }(Node));

}
Block.prototype.getChildFields = function () {
return [this.statements];
};
Block.prototype.withInline = function (inline) {

@@ -260,2 +324,5 @@ return new Block(this.line, this.column, this.start, this.end, this.raw, this.statements, inline);

}
Loop.prototype.getChildFields = function () {
return [this.body];
};
return Loop;

@@ -274,2 +341,5 @@ }(Node));

}
While.prototype.getChildFields = function () {
return [this.condition, this.guard, this.body];
};
return While;

@@ -299,2 +369,5 @@ }(Node));

}
ForOf.prototype.getChildFields = function () {
return [this.keyAssignee, this.valAssignee, this.target, this.filter, this.body];
};
return ForOf;

@@ -310,2 +383,5 @@ }(For));

}
ForIn.prototype.getChildFields = function () {
return [this.keyAssignee, this.valAssignee, this.target, this.step, this.filter, this.body];
};
return ForIn;

@@ -323,2 +399,5 @@ }(For));

}
Switch.prototype.getChildFields = function () {
return [this.expression, this.cases, this.alternate];
};
return Switch;

@@ -335,2 +414,5 @@ }(Node));

}
SwitchCase.prototype.getChildFields = function () {
return [this.conditions, this.consequent];
};
return SwitchCase;

@@ -387,2 +469,5 @@ }(Node));

}
Heregex.prototype.getChildFields = function () {
return [this.quasis, this.expressions];
};
return Heregex;

@@ -396,2 +481,5 @@ }(Node));

}
Null.prototype.getChildFields = function () {
return [];
};
return Null;

@@ -405,2 +493,5 @@ }(Node));

}
Undefined.prototype.getChildFields = function () {
return [];
};
return Undefined;

@@ -417,2 +508,5 @@ }(Node));

}
Regex.prototype.getChildFields = function () {
return [];
};
return Regex;

@@ -428,2 +522,5 @@ }(Node));

}
Return.prototype.getChildFields = function () {
return [this.expression];
};
return Return;

@@ -439,2 +536,5 @@ }(Node));

}
YieldReturn.prototype.getChildFields = function () {
return [this.expression];
};
return YieldReturn;

@@ -448,2 +548,5 @@ }(Node));

}
This.prototype.getChildFields = function () {
return [];
};
return This;

@@ -459,2 +562,5 @@ }(Node));

}
Throw.prototype.getChildFields = function () {
return [this.expression];
};
return Throw;

@@ -470,2 +576,5 @@ }(Node));

}
ArrayInitialiser.prototype.getChildFields = function () {
return [this.members];
};
return ArrayInitialiser;

@@ -482,2 +591,5 @@ }(Node));

}
DefaultParam.prototype.getChildFields = function () {
return [this.param, this["default"]];
};
return DefaultParam;

@@ -493,2 +605,5 @@ }(Node));

}
Rest.prototype.getChildFields = function () {
return [this.expression];
};
return Rest;

@@ -502,2 +617,5 @@ }(Node));

}
Expansion.prototype.getChildFields = function () {
return [];
};
return Expansion;

@@ -511,2 +629,5 @@ }(Node));

}
Break.prototype.getChildFields = function () {
return [];
};
return Break;

@@ -520,2 +641,5 @@ }(Node));

}
Continue.prototype.getChildFields = function () {
return [];
};
return Continue;

@@ -531,2 +655,5 @@ }(Node));

}
Spread.prototype.getChildFields = function () {
return [this.expression];
};
return Spread;

@@ -544,2 +671,5 @@ }(Node));

}
Range.prototype.getChildFields = function () {
return [this.left, this.right];
};
return Range;

@@ -556,2 +686,5 @@ }(Node));

}
BinaryOp.prototype.getChildFields = function () {
return [this.left, this.right];
};
return BinaryOp;

@@ -567,2 +700,5 @@ }(Node));

}
UnaryOp.prototype.getChildFields = function () {
return [this.expression];
};
return UnaryOp;

@@ -579,2 +715,5 @@ }(Node));

}
ChainedComparisonOp.prototype.getChildFields = function () {
return [this.operands];
};
return ChainedComparisonOp;

@@ -865,2 +1004,5 @@ }(Node));

}
BaseAssignOp.prototype.getChildFields = function () {
return [this.assignee, this.expression];
};
return BaseAssignOp;

@@ -968,2 +1110,5 @@ }(Node));

}
Slice.prototype.getChildFields = function () {
return [this.expression, this.left, this.right];
};
return Slice;

@@ -982,2 +1127,5 @@ }(Node));

}
SoakedSlice.prototype.getChildFields = function () {
return [this.expression, this.left, this.right];
};
return SoakedSlice;

@@ -994,2 +1142,5 @@ }(Node));

}
BaseFunction.prototype.getChildFields = function () {
return [this.parameters, this.body];
};
return BaseFunction;

@@ -1052,2 +1203,5 @@ }(Node));

}
Try.prototype.getChildFields = function () {
return [this.body, this.catchAssignee, this.catchBody, this.finallyBody];
};
return Try;

@@ -1084,2 +1238,5 @@ }(Node));

}
Class.prototype.getChildFields = function () {
return [this.nameAssignee, this.parent, this.body];
};
return Class;

@@ -1096,2 +1253,5 @@ }(Node));

}
FunctionApplication.prototype.getChildFields = function () {
return [this["function"], this.arguments];
};
return FunctionApplication;

@@ -1108,2 +1268,5 @@ }(Node));

}
SoakedFunctionApplication.prototype.getChildFields = function () {
return [this["function"], this.arguments];
};
return SoakedFunctionApplication;

@@ -1117,2 +1280,5 @@ }(Node));

}
Super.prototype.getChildFields = function () {
return [];
};
return Super;

@@ -1126,2 +1292,5 @@ }(Node));

}
BareSuperFunctionApplication.prototype.getChildFields = function () {
return [];
};
return BareSuperFunctionApplication;

@@ -1138,2 +1307,5 @@ }(Node));

}
NewOp.prototype.getChildFields = function () {
return [this.ctor, this.arguments];
};
return NewOp;

@@ -1150,2 +1322,5 @@ }(Node));

}
SoakedNewOp.prototype.getChildFields = function () {
return [this.ctor, this.arguments];
};
return SoakedNewOp;

@@ -1161,4 +1336,7 @@ }(Node));

}
DoOp.prototype.getChildFields = function () {
return [this.expression];
};
return DoOp;
}(Node));
exports.DoOp = DoOp;
import { Base } from 'decaffeinate-coffeescript/lib/coffee-script/nodes';
import { Quasi } from '../nodes';
import ParseContext from './ParseContext';
export declare type TemplateLiteralComponents = {
quasis: Array<Quasi>;
unmappedExpressions: Array<Base | null>;
start: number;
end: number;
};
/**

@@ -10,7 +16,2 @@ * Reconstruct template literal information given the coffee-lex tokens and the

*/
export default function getTemplateLiteralComponents(context: ParseContext, node: Base): {
quasis: Quasi[];
unmappedExpressions: (Base | null)[];
start: number;
end: number;
};
export default function getTemplateLiteralComponents(context: ParseContext, node: Base): TemplateLiteralComponents;
import SourceTokenList from 'coffee-lex/dist/SourceTokenList';
import { Base, Block, LocationData } from 'decaffeinate-coffeescript/lib/coffee-script/nodes';
import LinesAndColumns from 'lines-and-columns';
import { ClassProtoAssignOp, Constructor, RealNode } from '../nodes';
import { ClassProtoAssignOp, Constructor } from '../nodes';
/**

@@ -28,5 +28,5 @@ * Any information we need to know about the current state of parsing. While the

constructor(source: string, linesAndColumns: LinesAndColumns, sourceTokens: SourceTokenList, ast: Block, parseState: ParseState);
getRange(locatable: RealNode | Base | LocationData): [number, number] | null;
getRange(locatable: Base | LocationData): [number, number] | null;
static fromSource(source: string, sourceLex: (source: string) => SourceTokenList, parse: (source: string) => Block): ParseContext;
updateState(updater: (oldState: ParseState) => ParseState): ParseContext;
}

@@ -67,6 +67,3 @@ "use strict";

ParseContext.prototype.getRange = function (locatable) {
if ('range' in locatable) {
return locatable.range;
}
else if (locatable instanceof nodes_1.Base) {
if (locatable instanceof nodes_1.Base) {
return this.getRange(locatable.locationData);

@@ -73,0 +70,0 @@ }

@@ -35,3 +35,3 @@ {

"@types/mocha": "^2.2.35",
"@types/node": "8.0.9",
"@types/node": "8.0.14",
"babel": "^6.5.2",

@@ -63,3 +63,3 @@ "babel-eslint": "^7.1.1",

},
"version": "18.0.0"
"version": "18.1.0"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc