Mercurial > lcfOS
diff python/ppci/errors.py @ 225:1c7364bd74c7
Fixed pointer deref
author | Windel Bouwman |
---|---|
date | Thu, 11 Jul 2013 07:42:30 +0200 |
parents | c1ccb1cb4cef |
children | b10d46e5c8dd |
line wrap: on
line diff
--- a/python/ppci/errors.py Tue Jul 09 17:59:15 2013 +0200 +++ b/python/ppci/errors.py Thu Jul 11 07:42:30 2013 +0200 @@ -48,21 +48,24 @@ printLine(r, lines[r-1]) class DiagnosticsManager: - def __init__(self): + def __init__(self): self.diags = [] - def addDiag(self, d): + def addDiag(self, d): self.diags.append(d) - def error(self, msg, loc): + def error(self, msg, loc): self.addDiag(CompilerError(msg, loc)) - def clear(self): + def clear(self): del self.diags[:] - def printErrors(self, src): - if len(self.diags) > 0: - print('{0} Errors'.format(len(self.diags))) - for d in self.diags: - printError(src, d) + def printErrors(self, src): + if len(self.diags) > 0: + print('==============') + print('{0} Errors'.format(len(self.diags))) + for d in self.diags: + print('==============') + printError(src, d) + print('==============')