c_stat = os.stat(result.c_file)
except EnvironmentError:
pass
- module_name = full_module_name # self.extract_module_name(source, options)
+ full_module_name = full_module_name or self.extract_module_name(source, options)
source = FileSourceDescriptor(source)
initial_pos = (source, 1, 0)
- scope = self.find_module(module_name, pos = initial_pos, need_pxd = 0)
+ scope = self.find_module(full_module_name, pos = initial_pos, need_pxd = 0)
errors_occurred = False
try:
- tree = self.parse(source, scope.type_names, pxd = 0, full_module_name = full_module_name)
- # This is of course going to change and be refactored real soon
+ tree = self.parse(source, scope, pxd = 0,
+ full_module_name = full_module_name)
+ from ParseTreeTransforms import WithTransform, PostParse
+ tree = PostParse()(tree)
+ tree = WithTransform()(tree)
tree.process_implementation(scope, options, result)
except CompileError:
errors_occurred = True
# Fortunately, the type of the lhs node is fairly constrained
# (it must be a NameNode, AttributeNode, or IndexNode).
- child_attrs = ["lhs", "rhs", "dup"]
+ child_attrs = ["lhs", "rhs"]
+ dup = None
def analyse_declarations(self, env):
self.lhs.analyse_target_declaration(env)
# else_clause StatNode
# item NextNode used internally
- child_attrs = ["target", "iterator", "body", "else_clause", "item"]
+ child_attrs = ["target", "iterator", "body", "else_clause"]
+ item = None
def analyse_declarations(self, env):
self.target.analyse_target_declaration(env)