diff 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
line wrap: on
line diff
--- a/python/ppci/errors.py	Wed Apr 03 22:20:20 2013 +0200
+++ b/python/ppci/errors.py	Thu Apr 04 17:58:37 2013 +0200
@@ -44,4 +44,9 @@
       self.addDiag(CompilerError(msg, loc))
    def clear(self):
       self.diags.clear()
+   def printErrors(self, src):
+      if len(self.diags) > 0:
+         print('{0} Errors'.format(len(self.diags)))
+         for d in self.diags:
+            printError(src, d)