diff python/ppci/c3/builder.py @ 301:6753763d3bec

merge codegen into ppci package
author Windel Bouwman
date Thu, 05 Dec 2013 17:02:38 +0100
parents 158068af716c
children 0615b5308710
line wrap: on
line diff
--- a/python/ppci/c3/builder.py	Tue Dec 03 18:00:22 2013 +0100
+++ b/python/ppci/c3/builder.py	Thu Dec 05 17:02:38 2013 +0100
@@ -1,5 +1,4 @@
 import logging
-import ppci
 from .parser import Parser
 from .analyse import TypeChecker, Analyzer
 from .codegenerator import CodeGenerator
@@ -11,7 +10,7 @@
         Generates IR-code from c3 source.
         Reports errors to the diagnostics system.
     """
-    def __init__(self, diag):
+    def __init__(self, diag, target):
         self.logger = logging.getLogger('c3')
         self.diag = diag
         self.parser = Parser(diag)
@@ -58,7 +57,7 @@
 
     def build(self, srcs, imps=[]):
         """ Create IR-code from sources """
-        self.logger.info('Starting build with {}'.format(srcs))
+        self.logger.info('Starting build with {} source files'.format(len(srcs)))
         self.ok = True
         for pkg in self.checkSource(srcs, imps):
             # Only return ircode when everything is OK