add two positions.
note: line starts with 1, column starts with 0.
@param {Position} base
@param {Position} relative
@return {Position}
function addPositions(base, relative) {
    return {
        line: base.line + relative.line - 1, // line 1 + line 1 should be line 1
        column: relative.line == 1 ? base.column + relative.column // when the same line
            : relative.column               // when another line
    };
}