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
3 3 var _token as IToken? 4 4 var _fileName as String 5 5 var _lineNum as int 6 var _colNum as int 6 7 7 8 cue init(token as IToken, message as String) 8 9 base.init(message) 9 10 _token = token 10 11 _fileName = _token.fileName 11 12 _lineNum = _token.lineNum 13 _colNum = _token.colNum 12 14 13 15 cue init(fileName as String, message as String) 14 16 base.init(message) 15 17 _fileName = fileName 16 18 _lineNum = 1 19 _colNum = 1 17 20 18 21 cue init(message as String) is protected 19 22 # for use by def clone... … … 34 37 35 38 get lineNum from var is override 36 39 40 get colNum from var 41 37 42 def cloneWithMessage(message as String) as ParserException 38 43 pe = ParserException(message) 39 44 pe._token = _token