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

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

All files » lib/parser/ast/ » call.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
    116
    116
    116

    1

    24

    24

    24

    24

    24

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

    function CallExpression(reference, parameters) {
      this.reference  = reference;
      this.parameters = parameters;
      BaseExpression.apply(this, arguments);
    }

    BaseExpression.extend(CallExpression, {
      type: "call",
      toJavaScript: function() {

        var path = this.reference.path.concat();

        var buffer = "this.call(";

        buffer += "'" + path.join(".") + "'";

        buffer += ", [" + this.parameters.toJavaScript() + "]";

        return buffer + ")";
      }
    });

    module.exports = CallExpression;