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

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

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

    1
    132
    132
    132

    1

    14

    14

    14
    14

    14

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

    function ModifierExpression(name, parameters) {
      this.name  = name;
      this.parameters = parameters;
      BaseExpression.apply(this, arguments);
    }

    BaseExpression.extend(ModifierExpression, {
      type: "modifier",
      toJavaScript: function() {

        var buffer = "modifiers." + this.name + ".call(this";

        var params = this.parameters.toJavaScript();

        Eif (params.length) {
          buffer += ", " + params;
        }

        return buffer + ")";

      }
    });

    module.exports = ModifierExpression;