Mercurial > lcfOS
comparison python/ppci/errors.py @ 172:5a7d37d615ee
Added function to IR
author | Windel Bouwman |
---|---|
date | Thu, 04 Apr 2013 17:58:37 +0200 |
parents | 0b5b2ee6b435 |
children | e9b27f7193e3 |
comparison
equal
deleted
inserted
replaced
171:3eb9b9e2958d | 172:5a7d37d615ee |
---|---|
42 self.diags.append(d) | 42 self.diags.append(d) |
43 def error(self, msg, loc): | 43 def error(self, msg, loc): |
44 self.addDiag(CompilerError(msg, loc)) | 44 self.addDiag(CompilerError(msg, loc)) |
45 def clear(self): | 45 def clear(self): |
46 self.diags.clear() | 46 self.diags.clear() |
47 def printErrors(self, src): | |
48 if len(self.diags) > 0: | |
49 print('{0} Errors'.format(len(self.diags))) | |
50 for d in self.diags: | |
51 printError(src, d) | |
47 | 52 |