Code coverage report for 6to5/generators/jsx.js

Statements: 28.57% (10 / 35)      Branches: 0% (0 / 6)      Functions: 0% (0 / 10)      Lines: 28.57% (10 / 35)      Ignored: none     

All files » 6to5/generators/ » jsx.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 581               1       1           1           1           1           1       1                   1       1      
exports.XJSAttribute = function (node, print) {
  print(node.name);
  if (node.value) {
    this.push("=");
    print(node.value);
  }
};
 
exports.XJSIdentifier = function (node) {
  this.push(node.name);
};
 
exports.XJSNamespacedName = function (node, print) {
  print(node.namespace)
  this.push(":");
  print(node.name);
};
 
exports.XJSMemberExpression = function (node, print) {
  print(node.object);
  this.push(".");
  print(node.property);
};
 
exports.XJSSpreadAttribute = function (node, print) {
  this.push("{...");
  print(node.argument);
  this.push("}");
};
 
exports.XJSExpressionContainer = function (node, print) {
  this.push("{");
  print(node.expression);
  this.push("}");
};
 
exports.XJSElement = function () {
  throw new Error("XJSElement");
};
 
exports.XJSOpeningElement = function (node, print) {
  this.push("<");
  print(node.name);
  if (node.attributes.length < 0) {
    this.push(" ");
    this.printJoin(print, node.attributes, " ");
  }
  this.push(node.selfClosing ? " />" : ">");;
};
 
exports.XJSClosingElement = function (node) {
  this.push("</" + node.name + ">");
};
 
exports.XJSEmptyExpression = function () {
 
};