annotate python/ppci/core/module.py @ 133:a816c683c1c0

Fixes in hexedit
author Windel Bouwman
date Sun, 20 Jan 2013 21:48:41 +0100
parents 1544e7a4aa98
children
rev   line source
104
ed230e947dc6 Added hexviewer
windel
parents: 102
diff changeset
1 from .value import Value
105
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
2 from .symboltable import SymbolTable
104
ed230e947dc6 Added hexviewer
windel
parents: 102
diff changeset
3
ed230e947dc6 Added hexviewer
windel
parents: 102
diff changeset
4 class Module(Value):
105
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
5 """
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
6 Main container for a piece of code. Contains globals and functions.
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
7 """
107
1544e7a4aa98 Improvements
Windel Bouwman
parents: 106
diff changeset
8 def __init__(self, identifier=None):
1544e7a4aa98 Improvements
Windel Bouwman
parents: 106
diff changeset
9 self.identifier = identifier
106
f2d980eef509 improved code generation
Windel Bouwman
parents: 105
diff changeset
10 self.functions = [] # Do functions come out of symbol table?
f2d980eef509 improved code generation
Windel Bouwman
parents: 105
diff changeset
11 self.globals_ = [] # TODO: are globals in symbol table?
105
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
12 self.symtable = SymbolTable()
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
13
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
14 Globals = property(lambda self: self.globals_)
6a303f835c6d Removed compilers directory
Windel Bouwman
parents: 104
diff changeset
15 Functions = property(lambda self: self.functions)
106
f2d980eef509 improved code generation
Windel Bouwman
parents: 105
diff changeset
16 Identifier = property(lambda self: self.identifier)
94
1be00bcfaabb Last parts before movage
windel
parents:
diff changeset
17