# Code coverage report for lib/parser/ast/operator.js

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

All files » lib/parser/ast/ » operator.js

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    171

    1
    164
    164
    164
    164

    1

    31

    1var BaseExpression = require("./base");

    function OperatorExpression(operator, left, right) {
      this.operator = operator;
      this.left     = left;
      this.right    = right;
      BaseExpression.apply(this, arguments);
    }

    BaseExpression.extend(OperatorExpression, {
      type: "operator",
      toJavaScript: function() {
        return this.left.toJavaScript() + this.operator + this.right.toJavaScript();
      }
    });

    module.exports = OperatorExpression;