306 return |
306 return |
307 |
307 |
308 if code and (self.counters[code] == 1 or self.__repeat): |
308 if code and (self.counters[code] == 1 or self.__repeat): |
309 # record the issue with one based line number |
309 # record the issue with one based line number |
310 self.errors.append( |
310 self.errors.append( |
311 (self.__filename, lineNumber + 1, offset, (code, args))) |
311 { |
|
312 "file": self.__filename, |
|
313 "line": lineNumber + 1, |
|
314 "offset": offset, |
|
315 "code": code, |
|
316 "args": args, |
|
317 } |
|
318 ) |
312 |
319 |
313 def __reportInvalidSyntax(self): |
320 def __reportInvalidSyntax(self): |
314 """ |
321 """ |
315 Private method to report a syntax error. |
322 Private method to report a syntax error. |
316 """ |
323 """ |