Code coverage report for lib/parser/ast/blockBinding.js

Statements: 92.31% (12 / 13)      Branches: 50% (2 / 4)      Functions: 100% (2 / 2)      Lines: 92.31% (12 / 13)      Ignored: none     

All files » lib/parser/ast/ » blockBinding.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 261   1 3 3 3 3     1       3 3   3       3       1  
var BaseExpression = require("./base");
 
function BlockBindingExpression(scripts, contentTemplate, childBlock) {
  this.scripts    = scripts;
  this.contentTemplate = contentTemplate;
  this.childBlock = childBlock;
  BaseExpression.apply(this, arguments);
}
 
BaseExpression.extend(BlockBindingExpression, {
  type: "blockBinding",
  toJavaScript: function() {
 
    var buffer = "block(" + this.scripts.value.value.toJavaScript() + ", ";
    buffer += (this.contentTemplate ? this.contentTemplate.toJavaScript() : "void 0");
 
    Iif (this.childBlock) {
      buffer += ", " + this.childBlock.toJavaScript();
    }
 
    return buffer + ")";
  }
});
 
module.exports = BlockBindingExpression;