Mercurial > lcfOS
comparison python/ir/module.py @ 147:4e79484a9d47
Moved core to ir folder
author | Windel Bouwman |
---|---|
date | Fri, 22 Feb 2013 10:33:48 +0100 |
parents | python/ppci/core/module.py@1544e7a4aa98 |
children | b28a11c01dbe |
comparison
equal
deleted
inserted
replaced
146:91af0e40f868 | 147:4e79484a9d47 |
---|---|
1 from .value import Value | |
2 from .symboltable import SymbolTable | |
3 | |
4 class Module(Value): | |
5 """ | |
6 Main container for a piece of code. Contains globals and functions. | |
7 """ | |
8 def __init__(self, identifier=None): | |
9 self.identifier = identifier | |
10 self.functions = [] # Do functions come out of symbol table? | |
11 self.globals_ = [] # TODO: are globals in symbol table? | |
12 self.symtable = SymbolTable() | |
13 | |
14 Globals = property(lambda self: self.globals_) | |
15 Functions = property(lambda self: self.functions) | |
16 Identifier = property(lambda self: self.identifier) | |
17 |