lib/llvm-ast.js
// reused when only a column specified.
reused when only a column specified.
reused when only a column specified .
parseSpan(line, lastLineNo) {
        const spanRegex = /<((?:line|col)[\d ,:ceilno]+)>/;
        const m = line.match(spanRegex);
        if (m) {
            const span = m[1];
            const beginEnd = span.split(',');
            if (beginEnd.length === 2) {
                const begin = this.parsePoint(beginEnd[0], lastLineNo);
                const end = this.parsePoint(beginEnd[1], begin.line);
                return {type: this.locTypes.SPAN, begin, end};
            } else {
                return {type: this.locTypes.POINT, loc: this.parsePoint(span, lastLineNo)};
            }
        }
        return {type: this.locTypes.NONE};
    }
parseSpan ( line , lastLineNo ) { const spanRegex = / <((?:line|col)[\d ,:ceilno]+)> / ; const m = line . match ( spanRegex ) ; if ( m ) { const span = m [ 1 ] ; const beginEnd = span . split ( ',' ) ; if ( beginEnd . length === 2 ) { const begin = this . parsePoint ( beginEnd [ 0 ] , lastLineNo ) ; const end = this . parsePoint ( beginEnd [ 1 ] , begin . line ) ; return { type : this . locTypes . SPAN , begin , end } ; } else { return { type : this . locTypes . POINT , loc : this . parsePoint ( span , lastLineNo ) } ; } } return { type : this . locTypes . NONE } ; }
reused when only a column specified.
reused when only a column specified .