Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shift-codegen

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shift-codegen - npm Package Compare versions

Comparing version 6.0.0 to 7.0.0

449

dist/minimal-codegen.js

@@ -133,6 +133,13 @@ 'use strict';

}, {
key: 'reduceSpreadProperty',
value: function reduceSpreadProperty(node, _ref4) {
var expression = _ref4.expression;
return seq(t('...'), getAssignmentExpr(expression));
}
}, {
key: 'reduceAssignmentExpression',
value: function reduceAssignmentExpression(node, _ref4) {
var binding = _ref4.binding,
expression = _ref4.expression;
value: function reduceAssignmentExpression(node, _ref5) {
var binding = _ref5.binding,
expression = _ref5.expression;

@@ -162,5 +169,5 @@ var leftCode = binding;

key: 'reduceAssignmentTargetWithDefault',
value: function reduceAssignmentTargetWithDefault(node, _ref5) {
var binding = _ref5.binding,
init = _ref5.init;
value: function reduceAssignmentTargetWithDefault(node, _ref6) {
var binding = _ref6.binding,
init = _ref6.init;

@@ -171,5 +178,5 @@ return seq(binding, t('='), p(node.init, _coderep.Precedence.Assignment, init));

key: 'reduceCompoundAssignmentExpression',
value: function reduceCompoundAssignmentExpression(node, _ref6) {
var binding = _ref6.binding,
expression = _ref6.expression;
value: function reduceCompoundAssignmentExpression(node, _ref7) {
var binding = _ref7.binding,
expression = _ref7.expression;

@@ -190,5 +197,5 @@ var leftCode = binding;

key: 'reduceBinaryExpression',
value: function reduceBinaryExpression(node, _ref7) {
var left = _ref7.left,
right = _ref7.right;
value: function reduceBinaryExpression(node, _ref8) {
var left = _ref8.left,
right = _ref8.right;

@@ -224,5 +231,5 @@ var leftCode = left;

key: 'reduceBindingWithDefault',
value: function reduceBindingWithDefault(node, _ref8) {
var binding = _ref8.binding,
init = _ref8.init;
value: function reduceBindingWithDefault(node, _ref9) {
var binding = _ref9.binding,
init = _ref9.init;

@@ -242,5 +249,5 @@ return seq(binding, t('='), p(node.init, _coderep.Precedence.Assignment, init));

key: 'reduceArrayAssignmentTarget',
value: function reduceArrayAssignmentTarget(node, _ref9) {
var elements = _ref9.elements,
rest = _ref9.rest;
value: function reduceArrayAssignmentTarget(node, _ref10) {
var elements = _ref10.elements,
rest = _ref10.rest;

@@ -261,5 +268,5 @@ var content = void 0;

key: 'reduceArrayBinding',
value: function reduceArrayBinding(node, _ref10) {
var elements = _ref10.elements,
rest = _ref10.rest;
value: function reduceArrayBinding(node, _ref11) {
var elements = _ref11.elements,
rest = _ref11.rest;

@@ -280,6 +287,13 @@ var content = void 0;

key: 'reduceObjectAssignmentTarget',
value: function reduceObjectAssignmentTarget(node, _ref11) {
var properties = _ref11.properties;
value: function reduceObjectAssignmentTarget(node, _ref12) {
var properties = _ref12.properties,
rest = _ref12.rest;
var state = brace(commaSep(properties));
var content = commaSep(properties);
if (properties.length === 0) {
content = rest == null ? empty() : seq(t('...'), rest);
} else {
content = rest == null ? content : seq(content, t(','), t('...'), rest);
}
var state = brace(content);
state.startsWithCurly = true;

@@ -290,6 +304,13 @@ return state;

key: 'reduceObjectBinding',
value: function reduceObjectBinding(node, _ref12) {
var properties = _ref12.properties;
value: function reduceObjectBinding(node, _ref13) {
var properties = _ref13.properties,
rest = _ref13.rest;
var state = brace(commaSep(properties));
var content = commaSep(properties);
if (properties.length === 0) {
content = rest == null ? empty() : seq(t('...'), rest);
} else {
content = rest == null ? content : seq(content, t(','), t('...'), rest);
}
var state = brace(content);
state.startsWithCurly = true;

@@ -300,5 +321,5 @@ return state;

key: 'reduceAssignmentTargetPropertyIdentifier',
value: function reduceAssignmentTargetPropertyIdentifier(node, _ref13) {
var binding = _ref13.binding,
init = _ref13.init;
value: function reduceAssignmentTargetPropertyIdentifier(node, _ref14) {
var binding = _ref14.binding,
init = _ref14.init;

@@ -310,5 +331,5 @@ if (node.init == null) return binding;

key: 'reduceAssignmentTargetPropertyProperty',
value: function reduceAssignmentTargetPropertyProperty(node, _ref14) {
var name = _ref14.name,
binding = _ref14.binding;
value: function reduceAssignmentTargetPropertyProperty(node, _ref15) {
var name = _ref15.name,
binding = _ref15.binding;

@@ -319,5 +340,5 @@ return seq(name, t(':'), binding);

key: 'reduceBindingPropertyIdentifier',
value: function reduceBindingPropertyIdentifier(node, _ref15) {
var binding = _ref15.binding,
init = _ref15.init;
value: function reduceBindingPropertyIdentifier(node, _ref16) {
var binding = _ref16.binding,
init = _ref16.init;

@@ -329,5 +350,5 @@ if (node.init == null) return binding;

key: 'reduceBindingPropertyProperty',
value: function reduceBindingPropertyProperty(node, _ref16) {
var name = _ref16.name,
binding = _ref16.binding;
value: function reduceBindingPropertyProperty(node, _ref17) {
var name = _ref17.name,
binding = _ref17.binding;

@@ -338,4 +359,4 @@ return seq(name, t(':'), binding);

key: 'reduceBlock',
value: function reduceBlock(node, _ref17) {
var statements = _ref17.statements;
value: function reduceBlock(node, _ref18) {
var statements = _ref18.statements;

@@ -346,4 +367,4 @@ return brace(seq.apply(undefined, _toConsumableArray(statements)));

key: 'reduceBlockStatement',
value: function reduceBlockStatement(node, _ref18) {
var block = _ref18.block;
value: function reduceBlockStatement(node, _ref19) {
var block = _ref19.block;

@@ -359,5 +380,5 @@ return block;

key: 'reduceCallExpression',
value: function reduceCallExpression(node, _ref19) {
var callee = _ref19.callee,
args = _ref19.arguments;
value: function reduceCallExpression(node, _ref20) {
var callee = _ref20.callee,
args = _ref20.arguments;

@@ -375,5 +396,5 @@ var parenthizedArgs = args.map(function (a, i) {

key: 'reduceCatchClause',
value: function reduceCatchClause(node, _ref20) {
var binding = _ref20.binding,
body = _ref20.body;
value: function reduceCatchClause(node, _ref21) {
var binding = _ref21.binding,
body = _ref21.body;

@@ -384,6 +405,6 @@ return seq(t('catch'), paren(binding), body);

key: 'reduceClassDeclaration',
value: function reduceClassDeclaration(node, _ref21) {
var name = _ref21.name,
_super = _ref21.super,
elements = _ref21.elements;
value: function reduceClassDeclaration(node, _ref22) {
var name = _ref22.name,
_super = _ref22.super,
elements = _ref22.elements;

@@ -399,6 +420,6 @@ var state = seq(t('class'), node.name.name === '*default*' ? empty() : name);

key: 'reduceClassExpression',
value: function reduceClassExpression(node, _ref22) {
var name = _ref22.name,
_super = _ref22.super,
elements = _ref22.elements;
value: function reduceClassExpression(node, _ref23) {
var name = _ref23.name,
_super = _ref23.super,
elements = _ref23.elements;

@@ -418,4 +439,4 @@ var state = t('class');

key: 'reduceClassElement',
value: function reduceClassElement(node, _ref23) {
var method = _ref23.method;
value: function reduceClassElement(node, _ref24) {
var method = _ref24.method;

@@ -427,5 +448,5 @@ if (!node.isStatic) return method;

key: 'reduceComputedMemberAssignmentTarget',
value: function reduceComputedMemberAssignmentTarget(node, _ref24) {
var object = _ref24.object,
expression = _ref24.expression;
value: function reduceComputedMemberAssignmentTarget(node, _ref25) {
var object = _ref25.object,
expression = _ref25.expression;

@@ -442,5 +463,5 @@ var startsWithLetSquareBracket = object.startsWithLetSquareBracket || node.object.type === 'IdentifierExpression' && node.object.name === 'let';

key: 'reduceComputedMemberExpression',
value: function reduceComputedMemberExpression(node, _ref25) {
var object = _ref25.object,
expression = _ref25.expression;
value: function reduceComputedMemberExpression(node, _ref26) {
var object = _ref26.object,
expression = _ref26.expression;

@@ -457,4 +478,4 @@ var startsWithLetSquareBracket = object.startsWithLetSquareBracket || node.object.type === 'IdentifierExpression' && node.object.name === 'let';

key: 'reduceComputedPropertyName',
value: function reduceComputedPropertyName(node, _ref26) {
var expression = _ref26.expression;
value: function reduceComputedPropertyName(node, _ref27) {
var expression = _ref27.expression;

@@ -465,6 +486,6 @@ return bracket(p(node.expression, _coderep.Precedence.Assignment, expression));

key: 'reduceConditionalExpression',
value: function reduceConditionalExpression(node, _ref27) {
var test = _ref27.test,
consequent = _ref27.consequent,
alternate = _ref27.alternate;
value: function reduceConditionalExpression(node, _ref28) {
var test = _ref28.test,
consequent = _ref28.consequent,
alternate = _ref28.alternate;

@@ -489,5 +510,5 @@ var containsIn = test.containsIn || alternate.containsIn;

key: 'reduceDataProperty',
value: function reduceDataProperty(node, _ref28) {
var name = _ref28.name,
expression = _ref28.expression;
value: function reduceDataProperty(node, _ref29) {
var name = _ref29.name,
expression = _ref29.expression;

@@ -503,5 +524,5 @@ return seq(name, t(':'), getAssignmentExpr(expression));

key: 'reduceDoWhileStatement',
value: function reduceDoWhileStatement(node, _ref29) {
var body = _ref29.body,
test = _ref29.test;
value: function reduceDoWhileStatement(node, _ref30) {
var body = _ref30.body,
test = _ref30.test;

@@ -517,4 +538,4 @@ return seq(t('do'), body, t('while'), paren(test), semiOp());

key: 'reduceExpressionStatement',
value: function reduceExpressionStatement(node, _ref30) {
var expression = _ref30.expression;
value: function reduceExpressionStatement(node, _ref31) {
var expression = _ref31.expression;

@@ -526,6 +547,6 @@ var needsParens = expression.startsWithCurly || expression.startsWithLetSquareBracket || expression.startsWithFunctionOrClass;

key: 'reduceForInStatement',
value: function reduceForInStatement(node, _ref31) {
var left = _ref31.left,
right = _ref31.right,
body = _ref31.body;
value: function reduceForInStatement(node, _ref32) {
var left = _ref32.left,
right = _ref32.right,
body = _ref32.body;

@@ -537,6 +558,6 @@ left = node.left.type === 'VariableDeclaration' ? noIn(markContainsIn(left)) : left;

key: 'reduceForOfStatement',
value: function reduceForOfStatement(node, _ref32) {
var left = _ref32.left,
right = _ref32.right,
body = _ref32.body;
value: function reduceForOfStatement(node, _ref33) {
var left = _ref33.left,
right = _ref33.right,
body = _ref33.body;

@@ -548,7 +569,7 @@ left = node.left.type === 'VariableDeclaration' ? noIn(markContainsIn(left)) : left;

key: 'reduceForStatement',
value: function reduceForStatement(node, _ref33) {
var init = _ref33.init,
test = _ref33.test,
update = _ref33.update,
body = _ref33.body;
value: function reduceForStatement(node, _ref34) {
var init = _ref34.init,
test = _ref34.test,
update = _ref34.update,
body = _ref34.body;

@@ -560,6 +581,16 @@ return (0, _objectAssign2.default)(seq(t('for'), paren(seq(init ? noIn(markContainsIn(init)) : empty(), semi(), test || empty(), semi(), update || empty())), body), {

}, {
key: 'reduceForAwaitStatement',
value: function reduceForAwaitStatement(node, _ref35) {
var left = _ref35.left,
right = _ref35.right,
body = _ref35.body;
left = node.left.type === 'VariableDeclaration' ? noIn(markContainsIn(left)) : left;
return (0, _objectAssign2.default)(seq(t('for'), t('await'), paren(seq(left.startsWithLet ? paren(left) : left, t('of'), p(node.right, _coderep.Precedence.Assignment, right))), body), { endsWithMissingElse: body.endsWithMissingElse });
}
}, {
key: 'reduceFunctionBody',
value: function reduceFunctionBody(node, _ref34) {
var directives = _ref34.directives,
statements = _ref34.statements;
value: function reduceFunctionBody(node, _ref36) {
var directives = _ref36.directives,
statements = _ref36.statements;

@@ -573,6 +604,6 @@ if (statements.length) {

key: 'reduceFunctionDeclaration',
value: function reduceFunctionDeclaration(node, _ref35) {
var name = _ref35.name,
params = _ref35.params,
body = _ref35.body;
value: function reduceFunctionDeclaration(node, _ref37) {
var name = _ref37.name,
params = _ref37.params,
body = _ref37.body;

@@ -583,6 +614,6 @@ return seq(node.isAsync ? t('async') : empty(), t('function'), node.isGenerator ? t('*') : empty(), node.name.name === '*default*' ? empty() : name, params, body);

key: 'reduceFunctionExpression',
value: function reduceFunctionExpression(node, _ref36) {
var name = _ref36.name,
params = _ref36.params,
body = _ref36.body;
value: function reduceFunctionExpression(node, _ref38) {
var name = _ref38.name,
params = _ref38.params,
body = _ref38.body;

@@ -595,5 +626,5 @@ var state = seq(node.isAsync ? t('async') : empty(), t('function'), node.isGenerator ? t('*') : empty(), name ? name : empty(), params, body);

key: 'reduceFormalParameters',
value: function reduceFormalParameters(node, _ref37) {
var items = _ref37.items,
rest = _ref37.rest;
value: function reduceFormalParameters(node, _ref39) {
var items = _ref39.items,
rest = _ref39.rest;

@@ -604,5 +635,5 @@ return paren(commaSep(items.concat(rest == null ? [] : [seq(t('...'), rest)])));

key: 'reduceArrowExpression',
value: function reduceArrowExpression(node, _ref38) {
var params = _ref38.params,
body = _ref38.body;
value: function reduceArrowExpression(node, _ref40) {
var params = _ref40.params,
body = _ref40.body;

@@ -622,5 +653,5 @@ params = this.regenerateArrowParams(node.params, params);

key: 'reduceGetter',
value: function reduceGetter(node, _ref39) {
var name = _ref39.name,
body = _ref39.body;
value: function reduceGetter(node, _ref41) {
var name = _ref41.name,
body = _ref41.body;

@@ -640,6 +671,6 @@ return seq(t('get'), name, paren(empty()), body);

key: 'reduceIfStatement',
value: function reduceIfStatement(node, _ref40) {
var test = _ref40.test,
consequent = _ref40.consequent,
alternate = _ref40.alternate;
value: function reduceIfStatement(node, _ref42) {
var test = _ref42.test,
consequent = _ref42.consequent,
alternate = _ref42.alternate;

@@ -653,5 +684,5 @@ if (alternate && consequent.endsWithMissingElse) {

key: 'reduceImport',
value: function reduceImport(node, _ref41) {
var defaultBinding = _ref41.defaultBinding,
namedImports = _ref41.namedImports;
value: function reduceImport(node, _ref43) {
var defaultBinding = _ref43.defaultBinding,
namedImports = _ref43.namedImports;

@@ -672,5 +703,5 @@ var bindings = [];

key: 'reduceImportNamespace',
value: function reduceImportNamespace(node, _ref42) {
var defaultBinding = _ref42.defaultBinding,
namespaceBinding = _ref42.namespaceBinding;
value: function reduceImportNamespace(node, _ref44) {
var defaultBinding = _ref44.defaultBinding,
namespaceBinding = _ref44.namespaceBinding;

@@ -681,4 +712,4 @@ return seq(t('import'), defaultBinding == null ? empty() : seq(defaultBinding, t(',')), t('*'), t('as'), namespaceBinding, t('from'), t((0, _coderep.escapeStringLiteral)(node.moduleSpecifier)), semiOp());

key: 'reduceImportSpecifier',
value: function reduceImportSpecifier(node, _ref43) {
var binding = _ref43.binding;
value: function reduceImportSpecifier(node, _ref45) {
var binding = _ref45.binding;

@@ -695,4 +726,4 @@ if (node.name == null) return binding;

key: 'reduceExportFrom',
value: function reduceExportFrom(node, _ref44) {
var namedExports = _ref44.namedExports;
value: function reduceExportFrom(node, _ref46) {
var namedExports = _ref46.namedExports;

@@ -703,4 +734,4 @@ return seq(t('export'), brace(commaSep(namedExports)), t('from'), t((0, _coderep.escapeStringLiteral)(node.moduleSpecifier)), semiOp());

key: 'reduceExportLocals',
value: function reduceExportLocals(node, _ref45) {
var namedExports = _ref45.namedExports;
value: function reduceExportLocals(node, _ref47) {
var namedExports = _ref47.namedExports;

@@ -711,4 +742,4 @@ return seq(t('export'), brace(commaSep(namedExports)), semiOp());

key: 'reduceExport',
value: function reduceExport(node, _ref46) {
var declaration = _ref46.declaration;
value: function reduceExport(node, _ref48) {
var declaration = _ref48.declaration;

@@ -726,4 +757,4 @@ switch (node.declaration.type) {

key: 'reduceExportDefault',
value: function reduceExportDefault(node, _ref47) {
var body = _ref47.body;
value: function reduceExportDefault(node, _ref49) {
var body = _ref49.body;

@@ -747,4 +778,4 @@ body = body.startsWithFunctionOrClass ? paren(body) : body;

key: 'reduceExportLocalSpecifier',
value: function reduceExportLocalSpecifier(node, _ref48) {
var name = _ref48.name;
value: function reduceExportLocalSpecifier(node, _ref50) {
var name = _ref50.name;

@@ -756,4 +787,4 @@ if (node.exportedName == null) return name;

key: 'reduceLabeledStatement',
value: function reduceLabeledStatement(node, _ref49) {
var body = _ref49.body;
value: function reduceLabeledStatement(node, _ref51) {
var body = _ref51.body;

@@ -794,6 +825,6 @@ return (0, _objectAssign2.default)(seq(t(node.label + ':'), body), { endsWithMissingElse: body.endsWithMissingElse });

key: 'reduceMethod',
value: function reduceMethod(node, _ref50) {
var name = _ref50.name,
params = _ref50.params,
body = _ref50.body;
value: function reduceMethod(node, _ref52) {
var name = _ref52.name,
params = _ref52.params,
body = _ref52.body;

@@ -804,5 +835,5 @@ return seq(node.isAsync ? t('async') : empty(), node.isGenerator ? t('*') : empty(), name, params, body);

key: 'reduceModule',
value: function reduceModule(node, _ref51) {
var directives = _ref51.directives,
items = _ref51.items;
value: function reduceModule(node, _ref53) {
var directives = _ref53.directives,
items = _ref53.items;

@@ -816,5 +847,5 @@ if (items.length) {

key: 'reduceNewExpression',
value: function reduceNewExpression(node, _ref52) {
var callee = _ref52.callee,
args = _ref52.arguments;
value: function reduceNewExpression(node, _ref54) {
var callee = _ref54.callee,
args = _ref54.arguments;

@@ -834,4 +865,4 @@ var parenthizedArgs = args.map(function (a, i) {

key: 'reduceObjectExpression',
value: function reduceObjectExpression(node, _ref53) {
var properties = _ref53.properties;
value: function reduceObjectExpression(node, _ref55) {
var properties = _ref55.properties;

@@ -844,4 +875,4 @@ var state = brace(commaSep(properties));

key: 'reduceUpdateExpression',
value: function reduceUpdateExpression(node, _ref54) {
var operand = _ref54.operand;
value: function reduceUpdateExpression(node, _ref56) {
var operand = _ref56.operand;

@@ -859,4 +890,4 @@ if (node.isPrefix) {

key: 'reduceUnaryExpression',
value: function reduceUnaryExpression(node, _ref55) {
var operand = _ref55.operand;
value: function reduceUnaryExpression(node, _ref57) {
var operand = _ref57.operand;

@@ -867,4 +898,4 @@ return seq(t(node.operator), p(node.operand, (0, _coderep.getPrecedence)(node), operand));

key: 'reduceReturnStatement',
value: function reduceReturnStatement(node, _ref56) {
var expression = _ref56.expression;
value: function reduceReturnStatement(node, _ref58) {
var expression = _ref58.expression;

@@ -875,5 +906,5 @@ return seq(t('return'), expression || empty(), semiOp());

key: 'reduceScript',
value: function reduceScript(node, _ref57) {
var directives = _ref57.directives,
statements = _ref57.statements;
value: function reduceScript(node, _ref59) {
var directives = _ref59.directives,
statements = _ref59.statements;

@@ -887,6 +918,6 @@ if (statements.length) {

key: 'reduceSetter',
value: function reduceSetter(node, _ref58) {
var name = _ref58.name,
param = _ref58.param,
body = _ref58.body;
value: function reduceSetter(node, _ref60) {
var name = _ref60.name,
param = _ref60.param,
body = _ref60.body;

@@ -897,4 +928,4 @@ return seq(t('set'), name, paren(param), body);

key: 'reduceShorthandProperty',
value: function reduceShorthandProperty(node, _ref59) {
var name = _ref59.name;
value: function reduceShorthandProperty(node, _ref61) {
var name = _ref61.name;

@@ -905,4 +936,4 @@ return name;

key: 'reduceStaticMemberAssignmentTarget',
value: function reduceStaticMemberAssignmentTarget(node, _ref60) {
var object = _ref60.object;
value: function reduceStaticMemberAssignmentTarget(node, _ref62) {
var object = _ref62.object;

@@ -918,4 +949,4 @@ var state = seq(p(node.object, (0, _coderep.getPrecedence)(node), object), t('.'), t(node.property));

key: 'reduceStaticMemberExpression',
value: function reduceStaticMemberExpression(node, _ref61) {
var object = _ref61.object;
value: function reduceStaticMemberExpression(node, _ref63) {
var object = _ref63.object;

@@ -948,5 +979,5 @@ var state = seq(p(node.object, (0, _coderep.getPrecedence)(node), object), t('.'), t(node.property));

key: 'reduceSwitchCase',
value: function reduceSwitchCase(node, _ref62) {
var test = _ref62.test,
consequent = _ref62.consequent;
value: function reduceSwitchCase(node, _ref64) {
var test = _ref64.test,
consequent = _ref64.consequent;

@@ -957,4 +988,4 @@ return seq(t('case'), test, t(':'), seq.apply(undefined, _toConsumableArray(consequent)));

key: 'reduceSwitchDefault',
value: function reduceSwitchDefault(node, _ref63) {
var consequent = _ref63.consequent;
value: function reduceSwitchDefault(node, _ref65) {
var consequent = _ref65.consequent;

@@ -965,5 +996,5 @@ return seq(t('default:'), seq.apply(undefined, _toConsumableArray(consequent)));

key: 'reduceSwitchStatement',
value: function reduceSwitchStatement(node, _ref64) {
var discriminant = _ref64.discriminant,
cases = _ref64.cases;
value: function reduceSwitchStatement(node, _ref66) {
var discriminant = _ref66.discriminant,
cases = _ref66.cases;

@@ -974,7 +1005,7 @@ return seq(t('switch'), paren(discriminant), brace(seq.apply(undefined, _toConsumableArray(cases))));

key: 'reduceSwitchStatementWithDefault',
value: function reduceSwitchStatementWithDefault(node, _ref65) {
var discriminant = _ref65.discriminant,
preDefaultCases = _ref65.preDefaultCases,
defaultCase = _ref65.defaultCase,
postDefaultCases = _ref65.postDefaultCases;
value: function reduceSwitchStatementWithDefault(node, _ref67) {
var discriminant = _ref67.discriminant,
preDefaultCases = _ref67.preDefaultCases,
defaultCase = _ref67.defaultCase,
postDefaultCases = _ref67.postDefaultCases;

@@ -985,5 +1016,5 @@ return seq(t('switch'), paren(discriminant), brace(seq.apply(undefined, _toConsumableArray(preDefaultCases).concat([defaultCase], _toConsumableArray(postDefaultCases)))));

key: 'reduceTemplateExpression',
value: function reduceTemplateExpression(node, _ref66) {
var tag = _ref66.tag,
elements = _ref66.elements;
value: function reduceTemplateExpression(node, _ref68) {
var tag = _ref68.tag,
elements = _ref68.elements;

@@ -1019,4 +1050,4 @@ var state = node.tag == null ? empty() : p(node.tag, (0, _coderep.getPrecedence)(node), tag);

key: 'reduceThrowStatement',
value: function reduceThrowStatement(node, _ref67) {
var expression = _ref67.expression;
value: function reduceThrowStatement(node, _ref69) {
var expression = _ref69.expression;

@@ -1027,5 +1058,5 @@ return seq(t('throw'), expression, semiOp());

key: 'reduceTryCatchStatement',
value: function reduceTryCatchStatement(node, _ref68) {
var body = _ref68.body,
catchClause = _ref68.catchClause;
value: function reduceTryCatchStatement(node, _ref70) {
var body = _ref70.body,
catchClause = _ref70.catchClause;

@@ -1036,6 +1067,6 @@ return seq(t('try'), body, catchClause);

key: 'reduceTryFinallyStatement',
value: function reduceTryFinallyStatement(node, _ref69) {
var body = _ref69.body,
catchClause = _ref69.catchClause,
finalizer = _ref69.finalizer;
value: function reduceTryFinallyStatement(node, _ref71) {
var body = _ref71.body,
catchClause = _ref71.catchClause,
finalizer = _ref71.finalizer;

@@ -1046,4 +1077,4 @@ return seq(t('try'), body, catchClause || empty(), t('finally'), finalizer);

key: 'reduceYieldExpression',
value: function reduceYieldExpression(node, _ref70) {
var expression = _ref70.expression;
value: function reduceYieldExpression(node, _ref72) {
var expression = _ref72.expression;

@@ -1055,4 +1086,4 @@ if (node.expression == null) return t('yield');

key: 'reduceYieldGeneratorExpression',
value: function reduceYieldGeneratorExpression(node, _ref71) {
var expression = _ref71.expression;
value: function reduceYieldGeneratorExpression(node, _ref73) {
var expression = _ref73.expression;

@@ -1069,4 +1100,4 @@ return (0, _objectAssign2.default)(seq(t('yield'), t('*'), p(node.expression, (0, _coderep.getPrecedence)(node), expression)), { containsIn: expression.containsIn });

key: 'reduceVariableDeclaration',
value: function reduceVariableDeclaration(node, _ref72) {
var declarators = _ref72.declarators;
value: function reduceVariableDeclaration(node, _ref74) {
var declarators = _ref74.declarators;

@@ -1077,4 +1108,4 @@ return seq(t(node.kind), commaSep(declarators));

key: 'reduceVariableDeclarationStatement',
value: function reduceVariableDeclarationStatement(node, _ref73) {
var declaration = _ref73.declaration;
value: function reduceVariableDeclarationStatement(node, _ref75) {
var declaration = _ref75.declaration;

@@ -1085,5 +1116,5 @@ return seq(declaration, semiOp());

key: 'reduceVariableDeclarator',
value: function reduceVariableDeclarator(node, _ref74) {
var binding = _ref74.binding,
init = _ref74.init;
value: function reduceVariableDeclarator(node, _ref76) {
var binding = _ref76.binding,
init = _ref76.init;

@@ -1102,5 +1133,5 @@ var containsIn = init && init.containsIn && !init.containsGroup;

key: 'reduceWhileStatement',
value: function reduceWhileStatement(node, _ref75) {
var test = _ref75.test,
body = _ref75.body;
value: function reduceWhileStatement(node, _ref77) {
var test = _ref77.test,
body = _ref77.body;

@@ -1111,5 +1142,5 @@ return (0, _objectAssign2.default)(seq(t('while'), paren(test), body), { endsWithMissingElse: body.endsWithMissingElse });

key: 'reduceWithStatement',
value: function reduceWithStatement(node, _ref76) {
var object = _ref76.object,
body = _ref76.body;
value: function reduceWithStatement(node, _ref78) {
var object = _ref78.object,
body = _ref78.body;

@@ -1116,0 +1147,0 @@ return (0, _objectAssign2.default)(seq(t('with'), paren(object), body), { endsWithMissingElse: body.endsWithMissingElse });

{
"name": "shift-codegen",
"version": "6.0.0",
"version": "7.0.0",
"description": "code generator for Shift format ASTs",

@@ -24,3 +24,3 @@ "author": "Shape Security",

"object-assign": "^4.1.0",
"shift-reducer": "5.0.0"
"shift-reducer": "6.0.0"
},

@@ -35,4 +35,4 @@ "devDependencies": {

"mocha": "5.2.0",
"shift-parser-expectations": "2017.0.0",
"shift-parser": "6.0.0"
"shift-parser-expectations": "2018.0.2",
"shift-parser": "7.0.0"
},

@@ -39,0 +39,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

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