v1.0 with SW PWA enabled
This commit is contained in:
11
frontend/node_modules/@babel/generator/lib/node/whitespace.js
generated
vendored
11
frontend/node_modules/@babel/generator/lib/node/whitespace.js
generated
vendored
@ -69,6 +69,7 @@ const nodes = exports.nodes = {
|
||||
if (state.hasCall && state.hasHelper || state.hasFunction) {
|
||||
return state.hasFunction ? 1 | 2 : 2;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
SwitchCase(node, parent) {
|
||||
return (!!node.consequent.length || parent.cases[0] === node ? 1 : 0) | (!node.consequent.length && parent.cases[parent.cases.length - 1] === node ? 2 : 0);
|
||||
@ -77,21 +78,25 @@ const nodes = exports.nodes = {
|
||||
if (isFunction(node.left) || isFunction(node.right)) {
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
Literal(node) {
|
||||
if (isStringLiteral(node) && node.value === "use strict") {
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
CallExpression(node) {
|
||||
if (isFunction(node.callee) || isHelper(node)) {
|
||||
return 1 | 2;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
OptionalCallExpression(node) {
|
||||
if (isFunction(node.callee)) {
|
||||
return 1 | 2;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
VariableDeclaration(node) {
|
||||
for (let i = 0; i < node.declarations.length; i++) {
|
||||
@ -105,35 +110,41 @@ const nodes = exports.nodes = {
|
||||
return 1 | 2;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
IfStatement(node) {
|
||||
if (isBlockStatement(node.consequent)) {
|
||||
return 1 | 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {
|
||||
if (parent.properties[0] === node) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
nodes.ObjectTypeCallProperty = function (node, parent) {
|
||||
var _parent$properties;
|
||||
if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
nodes.ObjectTypeIndexer = function (node, parent) {
|
||||
var _parent$properties2, _parent$callPropertie;
|
||||
if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
nodes.ObjectTypeInternalSlot = function (node, parent) {
|
||||
var _parent$properties3, _parent$callPropertie2, _parent$indexers;
|
||||
if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function ([type, amounts]) {
|
||||
[type].concat(FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
|
||||
|
||||
Reference in New Issue
Block a user