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

## Statements: 100% (13 / 13) Branches: 100% (0 / 0) Functions: 100% (3 / 3) Lines: 100% (13 / 13) 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
    26
    27
    281

    1
    112
    112
    112

    1

    23

    23

    23
    25

    23

    23

    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.map(function(name) {
          return "\"" + name + "\"";
        }).join(",") + "]";

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

        return buffer + ")";
      }
    });

    module.exports = CallExpression;