Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/@babel/generator/lib/generators/jsx.js
rd565449 r0c6b92a 20 20 exports.JSXText = JSXText; 21 21 function JSXAttribute(node) { 22 this.print(node.name , node);22 this.print(node.name); 23 23 if (node.value) { 24 24 this.tokenChar(61); 25 this.print(node.value , node);25 this.print(node.value); 26 26 } 27 27 } … … 30 30 } 31 31 function JSXNamespacedName(node) { 32 this.print(node.namespace , node);32 this.print(node.namespace); 33 33 this.tokenChar(58); 34 this.print(node.name , node);34 this.print(node.name); 35 35 } 36 36 function JSXMemberExpression(node) { 37 this.print(node.object , node);37 this.print(node.object); 38 38 this.tokenChar(46); 39 this.print(node.property , node);39 this.print(node.property); 40 40 } 41 41 function JSXSpreadAttribute(node) { 42 42 this.tokenChar(123); 43 43 this.token("..."); 44 this.print(node.argument , node);45 this. tokenChar(125);44 this.print(node.argument); 45 this.rightBrace(node); 46 46 } 47 47 function JSXExpressionContainer(node) { 48 48 this.tokenChar(123); 49 this.print(node.expression , node);50 this. tokenChar(125);49 this.print(node.expression); 50 this.rightBrace(node); 51 51 } 52 52 function JSXSpreadChild(node) { 53 53 this.tokenChar(123); 54 54 this.token("..."); 55 this.print(node.expression , node);56 this. tokenChar(125);55 this.print(node.expression); 56 this.rightBrace(node); 57 57 } 58 58 function JSXText(node) { … … 66 66 function JSXElement(node) { 67 67 const open = node.openingElement; 68 this.print(open , node);68 this.print(open); 69 69 if (open.selfClosing) return; 70 70 this.indent(); 71 71 for (const child of node.children) { 72 this.print(child , node);72 this.print(child); 73 73 } 74 74 this.dedent(); 75 this.print(node.closingElement , node);75 this.print(node.closingElement); 76 76 } 77 77 function spaceSeparator() { … … 80 80 function JSXOpeningElement(node) { 81 81 this.tokenChar(60); 82 this.print(node.name , node);83 this.print(node.typeParameters , node);82 this.print(node.name); 83 this.print(node.typeParameters); 84 84 if (node.attributes.length > 0) { 85 85 this.space(); 86 this.printJoin(node.attributes, node,{86 this.printJoin(node.attributes, { 87 87 separator: spaceSeparator 88 88 }); … … 90 90 if (node.selfClosing) { 91 91 this.space(); 92 this.token("/>"); 93 } else { 94 this.tokenChar(62); 92 this.tokenChar(47); 95 93 } 94 this.tokenChar(62); 96 95 } 97 96 function JSXClosingElement(node) { 98 this.token("</"); 99 this.print(node.name, node); 97 this.tokenChar(60); 98 this.tokenChar(47); 99 this.print(node.name); 100 100 this.tokenChar(62); 101 101 } … … 104 104 } 105 105 function JSXFragment(node) { 106 this.print(node.openingFragment , node);106 this.print(node.openingFragment); 107 107 this.indent(); 108 108 for (const child of node.children) { 109 this.print(child , node);109 this.print(child); 110 110 } 111 111 this.dedent(); 112 this.print(node.closingFragment , node);112 this.print(node.closingFragment); 113 113 } 114 114 function JSXOpeningFragment() {
Note:
See TracChangeset
for help on using the changeset viewer.