function getNodeLoc(context, node) {
    var start = node.startIndex;
    var pos = getLine(context.html, node);
    var end = void 0;
    if (node.data) {
        end = start + node.data.length;
    } else if (node.next) {
        // eslint-disable-line
        end = node.next.startIndex;
    } else {
        end = context.html.length;
    }
    return {
        pos: pos,
        start: start,
        end: end
    };
}
@param context
@param node
@return {{pos:Pos, start:number, end:number}}