Wiki

Ticket #298: parser_exception_col_num.patch

File parser_exception_col_num.patch, 0.8 KB (added by nerdzero, 12 years ago)

adds read-only 'colNum' property to ParserException? class

  • Parser.cobra

     
    33    var _token as IToken? 
    44    var _fileName as String 
    55    var _lineNum as int 
     6    var _colNum as int 
    67 
    78    cue init(token as IToken, message as String) 
    89        base.init(message) 
    910        _token = token 
    1011        _fileName = _token.fileName 
    1112        _lineNum = _token.lineNum 
     13        _colNum = _token.colNum 
    1214 
    1315    cue init(fileName as String, message as String) 
    1416        base.init(message) 
    1517        _fileName = fileName 
    1618        _lineNum = 1 
     19        _colNum = 1 
    1720 
    1821    cue init(message as String) is protected 
    1922        # for use by def clone... 
     
    3437 
    3538    get lineNum from var is override 
    3639 
     40    get colNum from var 
     41 
    3742    def cloneWithMessage(message as String) as ParserException 
    3843        pe = ParserException(message) 
    3944        pe._token = _token