diff python/c3/parser.py @ 219:1fa3e0050b49

Expanded ad hoc code generator
author Windel Bouwman
date Sat, 06 Jul 2013 12:38:09 +0200
parents c1ccb1cb4cef
children 3f6c30a5d234
line wrap: on
line diff
--- a/python/c3/parser.py	Fri Jul 05 15:30:22 2013 +0200
+++ b/python/c3/parser.py	Sat Jul 06 12:38:09 2013 +0200
@@ -41,14 +41,14 @@
       return False
 
     def NextToken(self):
-      t = self.token
-      if t.typ != 'END':
-         self.token = self.tokens.__next__()
-      return t
+        t = self.token
+        if t.typ != 'END':
+            self.token = self.tokens.__next__()
+        return t
 
     def initLex(self, source):
-      self.tokens = lexer.tokenize(source) # Lexical stage
-      self.token = self.tokens.__next__()
+        self.tokens = lexer.tokenize(source) # Lexical stage
+        self.token = self.tokens.__next__()
     def addDeclaration(self, decl):
         self.currentPart.declarations.append(decl)
     
@@ -88,7 +88,7 @@
     # Type system
     def parseTypeSpec(self):
         # For now, do simple type spec, just parse an ID:
-        return self.parseDesignator()
+        #return self.parseDesignator()
         if self.Peak == 'struct':
             self.Consume('struct')
             self.Consume('{')