mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-06-08 18:04:29 +00:00
v5
This commit is contained in:
parent
d1407282e6
commit
08403cd828
6774 changed files with 1602535 additions and 1 deletions
192
node_modules/@babel/generator/lib/generators/classes.js
generated
vendored
Normal file
192
node_modules/@babel/generator/lib/generators/classes.js
generated
vendored
Normal file
|
@ -0,0 +1,192 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
|
||||
exports.ClassBody = ClassBody;
|
||||
exports.ClassProperty = ClassProperty;
|
||||
exports.ClassPrivateProperty = ClassPrivateProperty;
|
||||
exports.ClassMethod = ClassMethod;
|
||||
exports.ClassPrivateMethod = ClassPrivateMethod;
|
||||
exports._classMethodHead = _classMethodHead;
|
||||
|
||||
function t() {
|
||||
const data = _interopRequireWildcard(require("@babel/types"));
|
||||
|
||||
t = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function ClassDeclaration(node, parent) {
|
||||
if (!this.format.decoratorsBeforeExport || !t().isExportDefaultDeclaration(parent) && !t().isExportNamedDeclaration(parent)) {
|
||||
this.printJoin(node.decorators, node);
|
||||
}
|
||||
|
||||
if (node.declare) {
|
||||
this.word("declare");
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.abstract) {
|
||||
this.word("abstract");
|
||||
this.space();
|
||||
}
|
||||
|
||||
this.word("class");
|
||||
|
||||
if (node.id) {
|
||||
this.space();
|
||||
this.print(node.id, node);
|
||||
}
|
||||
|
||||
this.print(node.typeParameters, node);
|
||||
|
||||
if (node.superClass) {
|
||||
this.space();
|
||||
this.word("extends");
|
||||
this.space();
|
||||
this.print(node.superClass, node);
|
||||
this.print(node.superTypeParameters, node);
|
||||
}
|
||||
|
||||
if (node.implements) {
|
||||
this.space();
|
||||
this.word("implements");
|
||||
this.space();
|
||||
this.printList(node.implements, node);
|
||||
}
|
||||
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function ClassBody(node) {
|
||||
this.token("{");
|
||||
this.printInnerComments(node);
|
||||
|
||||
if (node.body.length === 0) {
|
||||
this.token("}");
|
||||
} else {
|
||||
this.newline();
|
||||
this.indent();
|
||||
this.printSequence(node.body, node);
|
||||
this.dedent();
|
||||
if (!this.endsWith("\n")) this.newline();
|
||||
this.rightBrace();
|
||||
}
|
||||
}
|
||||
|
||||
function ClassProperty(node) {
|
||||
this.printJoin(node.decorators, node);
|
||||
|
||||
if (node.accessibility) {
|
||||
this.word(node.accessibility);
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.static) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.abstract) {
|
||||
this.word("abstract");
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.readonly) {
|
||||
this.word("readonly");
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.computed) {
|
||||
this.token("[");
|
||||
this.print(node.key, node);
|
||||
this.token("]");
|
||||
} else {
|
||||
this._variance(node);
|
||||
|
||||
this.print(node.key, node);
|
||||
}
|
||||
|
||||
if (node.optional) {
|
||||
this.token("?");
|
||||
}
|
||||
|
||||
if (node.definite) {
|
||||
this.token("!");
|
||||
}
|
||||
|
||||
this.print(node.typeAnnotation, node);
|
||||
|
||||
if (node.value) {
|
||||
this.space();
|
||||
this.token("=");
|
||||
this.space();
|
||||
this.print(node.value, node);
|
||||
}
|
||||
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function ClassPrivateProperty(node) {
|
||||
if (node.static) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
}
|
||||
|
||||
this.print(node.key, node);
|
||||
this.print(node.typeAnnotation, node);
|
||||
|
||||
if (node.value) {
|
||||
this.space();
|
||||
this.token("=");
|
||||
this.space();
|
||||
this.print(node.value, node);
|
||||
}
|
||||
|
||||
this.semicolon();
|
||||
}
|
||||
|
||||
function ClassMethod(node) {
|
||||
this._classMethodHead(node);
|
||||
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function ClassPrivateMethod(node) {
|
||||
this._classMethodHead(node);
|
||||
|
||||
this.space();
|
||||
this.print(node.body, node);
|
||||
}
|
||||
|
||||
function _classMethodHead(node) {
|
||||
this.printJoin(node.decorators, node);
|
||||
|
||||
if (node.accessibility) {
|
||||
this.word(node.accessibility);
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.abstract) {
|
||||
this.word("abstract");
|
||||
this.space();
|
||||
}
|
||||
|
||||
if (node.static) {
|
||||
this.word("static");
|
||||
this.space();
|
||||
}
|
||||
|
||||
this._methodHead(node);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue