Ticket #212: with-colnum.patch
File with-colnum.patch, 1.6 KB (added by hopscc, 14 years ago) |
---|
-
Source/Parser.cobra
20 20 base.init(message) 21 21 _fileName = '' 22 22 23 def consoleString as String is override 24 if _token 25 type = if(.isError, 'error', 'warning') 26 msg = '[_token.fileName]([_token.lineNum],[_token.colNum]): [type]: [.message]' 27 return msg 28 return base.consoleString 29 23 30 get hasSourceSite as bool is override 24 31 return true 25 32 -
Tests/700-command-line/900-check-complier-message-format/200-check-compiler-message-format.cobra
19 19 .check('120-bind-error.cobra') 20 20 21 21 def check(sourceName as String) 22 re = Regex(r"[A-Za-z\.]+cobra\(\d+ \): (error|warning): [^\(]+$", RegexOptions(Compiled, CultureInvariant))22 re = Regex(r"[A-Za-z\.]+cobra\(\d+(,\d+)?\): (error|warning): [^\(]+$", RegexOptions(Compiled, CultureInvariant)) 23 23 # example output for regex ta match: 24 24 # bind-error.cobra(4): error: Cannot find "y". There is a member named ".getType" with a similar name. 25 # tokenizer-error.cobra(3,1): error: Space-based indentation must be a multiple of 4. This line has a remainder of 3. 25 26 26 27 output = .run('-c ' + sourceName) 27 28 assert 'Compilation failed' in output