Code coverage report for 6to5/generation/generators/comprehensions.js

Statements: 100% (19 / 19)      Branches: 100% (6 / 6)      Functions: 100% (2 / 2)      Lines: 100% (19 / 19)      Ignored: none     

All files » 6to5/generation/generators/ » comprehensions.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 281 12 12 12 12 12 12     1 8   8 8   8 4 4 4 4 4     8   8    
exports.ComprehensionBlock = function (node, print) {
  this.keyword("for");
  this.push("(");
  print(node.left);
  this.push(" of ");
  print(node.right);
  this.push(")");
};
 
exports.ComprehensionExpression = function (node, print) {
  this.push(node.generator ? "(" : "[");
 
  print.join(node.blocks, { separator: " " });
  this.space();
 
  if (node.filter) {
    this.keyword("if");
    this.push("(");
    print(node.filter);
    this.push(")");
    this.space();
  }
 
  print(node.body);
 
  this.push(node.generator ? ")" : "]");
};