1.1 --- a/micropython/ast.py Mon Jun 08 00:49:37 2009 +0200
1.2 +++ b/micropython/ast.py Fri Jun 12 22:03:56 2009 +0200
1.3 @@ -115,11 +115,10 @@
1.4
1.5 self.optimiser.reset()
1.6
1.7 - def get_module_code(self, final=0):
1.8 + def get_module_code(self):
1.9
1.10 """
1.11 - Return the top-level module code including finalising code if 'final' is
1.12 - set to a true value.
1.13 + Return the top-level module code.
1.14 """
1.15
1.16 self.unit = self.module
1.17 @@ -133,7 +132,7 @@
1.18
1.19 # Finish off the translated program if appropriate.
1.20
1.21 - if final:
1.22 + if self.module.name == "__main__":
1.23 self.new_op(Return())
1.24
1.25 self.unit.temp_usage = self.max_temp_position + 1