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

Statements: 44.44% (4 / 9)      Branches: 100% (0 / 0)      Functions: 0% (0 / 2)      Lines: 44.44% (4 / 9)      Ignored: none     

All files » lib/parser/ast/ » assignment.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 341         1                 1                                   1  
var BaseExpression = require("./base");
 
/**
 */
 
function AssignmentExpression(reference, value) {
  BaseExpression.apply(this, arguments);
  this.reference = reference;
  this.value     = value;
}
 
/**
 */
 
BaseExpression.extend(AssignmentExpression, {
 
  /**
   */
 
  type: "assignment",
 
  /**
   */
 
  toJavaScript: function() {
 
    var path = this.reference.path.join(".");
 
    return "this.set('" + path + "', " + this.value.toJavaScript() + ")";
  }
});
 
module.exports = AssignmentExpression;