# All files / src/custom-nodes/debug-protection-nodes DebugProtectionFunctionCallNode.js

44.44% Statements 4/9
100% Branches 1/1
0% Functions 0/1
44.44% Lines 4/9

    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
    1x
    1x
    1x

    1x
     "use strict";
    const NodeType_1 = require("../../enums/NodeType");
    const Node_1 = require('../Node');
    const NodeUtils_1 = require("../../NodeUtils");
    class DebugProtectionFunctionCallNode extends Node_1.Node {
        constructor(debugProtectionFunctionName, options) {
            super(options);
            this.debugProtectionFunctionName = debugProtectionFunctionName;
            this.node = this.getNodeStructure();
        }
        appendNode(blockScopeNode) {
            NodeUtils_1.NodeUtils.appendNode(blockScopeNode.body, this.getNode());
        }
        getNodeStructure() {
            return {
                'type': NodeType_1.NodeType.ExpressionStatement,
                'expression': {
                    'type': NodeType_1.NodeType.CallExpression,
                    'callee': {
                        'type': NodeType_1.NodeType.Identifier,
                        'name': this.debugProtectionFunctionName
                    },
                    'arguments': []
                }
            };
        }
    }
    exports.DebugProtectionFunctionCallNode = DebugProtectionFunctionCallNode;
    //# sourceMappingURL=DebugProtectionFunctionCallNode.js.map