Checks if AST node is `BEM.decl` or `BEM.DOM.decl` call.

@param {Object} node Mozilla Parser API AST node
function isBemDecl(node) {
    if (node.type !== 'CallExpression') {
        return false;
    }

    if (node.callee.type !== 'MemberExpression') {
        return false;
    }

    if (node.callee.property.type !== 'Identifier' || node.callee.property.name !== 'decl') {
        return false;
    }

    var obj = node.callee.object;
    if (obj.type === "Identifier") {
        return obj.name === "BEM";
    }

    if (obj.type === "MemberExpression") {
        if (obj.object.type !== "Identifier") {
            return false;
        }

        if (obj.object.name !== "BEM") {
            return false;
        }

        if (obj.property.type !== "Identifier") {
            return false;
        }

        return obj.property.name === "DOM";
    }
    return false;
}