# All files / src Nodes.js

90.91% Statements 10/11
100% Branches 3/3
100% Functions 0/0
90.91% Lines 10/11

    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
    30
    31
    32
    33
    34
    35
    36
    1x

    20x

    48x

    3542x

    676x

    115x

    14x

    320x

    13x

    1x
     "use strict";
    const NodeType_1 = require("./enums/NodeType");
    class Nodes {
        static getProgramNode(bodyNode) {
            return {
                'type': NodeType_1.NodeType.Program,
                'body': bodyNode
            };
        }
        static isBlockStatementNode(node) {
            return node.type === NodeType_1.NodeType.BlockStatement;
        }
        static isIdentifierNode(node) {
            return node.type === NodeType_1.NodeType.Identifier;
        }
        static isLiteralNode(node) {
            return node.type === NodeType_1.NodeType.Literal;
        }
        static isMemberExpressionNode(node) {
            return node.type === NodeType_1.NodeType.MemberExpression;
        }
        static isProgramNode(node) {
            return node.type === NodeType_1.NodeType.Program;
        }
        static isPropertyNode(node) {
            return node.type === NodeType_1.NodeType.Property;
        }
        static isVariableDeclaratorNode(node) {
            return node.type === NodeType_1.NodeType.VariableDeclarator;
        }
        static isNodeHasBlockStatement(node) {
            return node.hasOwnProperty('body') && Array.isArray(node.body);
        }
    }
    exports.Nodes = Nodes;
    //# sourceMappingURL=Nodes.js.map