Mercurial > lcfOS
comparison python/c3/scope.py @ 155:b28a11c01dbe
Simplified IR classes
author | Windel Bouwman |
---|---|
date | Sun, 03 Mar 2013 13:20:03 +0100 |
parents | 4ae0e02599de |
children | 8104fc8b5e90 |
comparison
equal
deleted
inserted
replaced
154:81e08e2e7777 | 155:b28a11c01dbe |
---|---|
22 return False | 22 return False |
23 def addSymbol(self, sym): | 23 def addSymbol(self, sym): |
24 self.symbols[sym.name] = sym | 24 self.symbols[sym.name] = sym |
25 | 25 |
26 def createBuiltins(scope): | 26 def createBuiltins(scope): |
27 for tn in ['int', 'u32', 'u16', 'double']: | 27 for tn in ['int', 'u32', 'u16', 'double', 'void']: |
28 scope.addSymbol(astnodes.BaseType(tn)) | 28 scope.addSymbol(astnodes.BaseType(tn)) |
29 | 29 |
30 topScope = Scope() | 30 topScope = Scope() |
31 | |
32 createBuiltins(topScope) | 31 createBuiltins(topScope) |
33 | 32 |