diff python/ppci/assembler.py @ 337:b00219172a42

Added cool lm3s811 qemu project
author Windel Bouwman
date Thu, 20 Feb 2014 20:04:52 +0100
parents d1ecc493384e
children c7cc54c0dfdf
line wrap: on
line diff
--- a/python/ppci/assembler.py	Wed Feb 19 22:32:15 2014 +0100
+++ b/python/ppci/assembler.py	Thu Feb 20 20:04:52 2014 +0100
@@ -153,6 +153,7 @@
 class Assembler:
     def __init__(self, target, stream):
         self.target = target
+        assert isinstance(target,Target)
         self.stream = stream
         self.restart()
         self.p = asmParser
@@ -189,8 +190,6 @@
 
     def assemble_aast(self):
         """ Assemble a parsed asm line """
-        if not self.target:
-            raise CompilerError('Cannot assemble without target')
         while self.stack:
             vi = self.stack.pop(0)
             if type(vi) is AInstruction: