diff python/target.py @ 280:02385f62f250

Rework from str interface to Instruction interface
author Windel Bouwman
date Sat, 02 Nov 2013 10:03:26 +0100
parents 046017431c6a
children
line wrap: on
line diff
--- a/python/target.py	Sat Oct 12 09:56:23 2013 +0200
+++ b/python/target.py	Sat Nov 02 10:03:26 2013 +0100
@@ -57,6 +57,7 @@
 
 class LabelRef:
     def __init__(self, name):
+        assert type(name) is str
         self.name = name
 
     @classmethod
@@ -71,6 +72,13 @@
         pass
 
 
+class Nop(Instruction):
+    """ Instruction that does nothing and has zero size """
+    def encode(self):
+        return bytes()
+
+    
+
 class PseudoInstruction(Instruction):
     pass