feat: refactoring project
This commit is contained in:
52
node_modules/@babel/generator/lib/generators/jsx.js
generated
vendored
52
node_modules/@babel/generator/lib/generators/jsx.js
generated
vendored
@@ -19,41 +19,41 @@ exports.JSXSpreadAttribute = JSXSpreadAttribute;
|
||||
exports.JSXSpreadChild = JSXSpreadChild;
|
||||
exports.JSXText = JSXText;
|
||||
function JSXAttribute(node) {
|
||||
this.print(node.name, node);
|
||||
this.print(node.name);
|
||||
if (node.value) {
|
||||
this.tokenChar(61);
|
||||
this.print(node.value, node);
|
||||
this.print(node.value);
|
||||
}
|
||||
}
|
||||
function JSXIdentifier(node) {
|
||||
this.word(node.name);
|
||||
}
|
||||
function JSXNamespacedName(node) {
|
||||
this.print(node.namespace, node);
|
||||
this.print(node.namespace);
|
||||
this.tokenChar(58);
|
||||
this.print(node.name, node);
|
||||
this.print(node.name);
|
||||
}
|
||||
function JSXMemberExpression(node) {
|
||||
this.print(node.object, node);
|
||||
this.print(node.object);
|
||||
this.tokenChar(46);
|
||||
this.print(node.property, node);
|
||||
this.print(node.property);
|
||||
}
|
||||
function JSXSpreadAttribute(node) {
|
||||
this.tokenChar(123);
|
||||
this.token("...");
|
||||
this.print(node.argument, node);
|
||||
this.tokenChar(125);
|
||||
this.print(node.argument);
|
||||
this.rightBrace(node);
|
||||
}
|
||||
function JSXExpressionContainer(node) {
|
||||
this.tokenChar(123);
|
||||
this.print(node.expression, node);
|
||||
this.tokenChar(125);
|
||||
this.print(node.expression);
|
||||
this.rightBrace(node);
|
||||
}
|
||||
function JSXSpreadChild(node) {
|
||||
this.tokenChar(123);
|
||||
this.token("...");
|
||||
this.print(node.expression, node);
|
||||
this.tokenChar(125);
|
||||
this.print(node.expression);
|
||||
this.rightBrace(node);
|
||||
}
|
||||
function JSXText(node) {
|
||||
const raw = this.getPossibleRaw(node);
|
||||
@@ -65,51 +65,51 @@ function JSXText(node) {
|
||||
}
|
||||
function JSXElement(node) {
|
||||
const open = node.openingElement;
|
||||
this.print(open, node);
|
||||
this.print(open);
|
||||
if (open.selfClosing) return;
|
||||
this.indent();
|
||||
for (const child of node.children) {
|
||||
this.print(child, node);
|
||||
this.print(child);
|
||||
}
|
||||
this.dedent();
|
||||
this.print(node.closingElement, node);
|
||||
this.print(node.closingElement);
|
||||
}
|
||||
function spaceSeparator() {
|
||||
this.space();
|
||||
}
|
||||
function JSXOpeningElement(node) {
|
||||
this.tokenChar(60);
|
||||
this.print(node.name, node);
|
||||
this.print(node.typeParameters, node);
|
||||
this.print(node.name);
|
||||
this.print(node.typeParameters);
|
||||
if (node.attributes.length > 0) {
|
||||
this.space();
|
||||
this.printJoin(node.attributes, node, {
|
||||
this.printJoin(node.attributes, {
|
||||
separator: spaceSeparator
|
||||
});
|
||||
}
|
||||
if (node.selfClosing) {
|
||||
this.space();
|
||||
this.token("/>");
|
||||
} else {
|
||||
this.tokenChar(62);
|
||||
this.tokenChar(47);
|
||||
}
|
||||
this.tokenChar(62);
|
||||
}
|
||||
function JSXClosingElement(node) {
|
||||
this.token("</");
|
||||
this.print(node.name, node);
|
||||
this.tokenChar(60);
|
||||
this.tokenChar(47);
|
||||
this.print(node.name);
|
||||
this.tokenChar(62);
|
||||
}
|
||||
function JSXEmptyExpression() {
|
||||
this.printInnerComments();
|
||||
}
|
||||
function JSXFragment(node) {
|
||||
this.print(node.openingFragment, node);
|
||||
this.print(node.openingFragment);
|
||||
this.indent();
|
||||
for (const child of node.children) {
|
||||
this.print(child, node);
|
||||
this.print(child);
|
||||
}
|
||||
this.dedent();
|
||||
this.print(node.closingFragment, node);
|
||||
this.print(node.closingFragment);
|
||||
}
|
||||
function JSXOpeningFragment() {
|
||||
this.tokenChar(60);
|
||||
|
||||
Reference in New Issue
Block a user