diff python/c3/scope.py @ 163:8104fc8b5e90

Added visitor to c3
author Windel Bouwman
date Mon, 18 Mar 2013 20:13:57 +0100
parents b28a11c01dbe
children e023d3ce1d63
line wrap: on
line diff
--- a/python/c3/scope.py	Sun Mar 10 11:36:55 2013 +0100
+++ b/python/c3/scope.py	Mon Mar 18 20:13:57 2013 +0100
@@ -23,9 +23,17 @@
    def addSymbol(self, sym):
       self.symbols[sym.name] = sym
 
+# buildin types:
+intType = astnodes.BaseType('int')
+doubleType = astnodes.BaseType('double')
+voidType = astnodes.BaseType('void')
+boolType = astnodes.BaseType('void')
+
 def createBuiltins(scope):
-   for tn in ['int', 'u32', 'u16', 'double', 'void']:
+   for tn in ['u64', 'u32', 'u16', 'u8']:
       scope.addSymbol(astnodes.BaseType(tn))
+   for t in [intType, doubleType, voidType, boolType]:
+      scope.addSymbol(t)
 
 topScope = Scope()
 createBuiltins(topScope)