From: Dag Sverre Seljebotn Date: Wed, 18 Jun 2008 06:28:27 +0000 (-0700) Subject: merge X-Git-Tag: 0.9.8.1~49^2~126 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=21c0a0270f327b4c79928441610d2bd0d3a6b164;p=cython.git merge --- 21c0a0270f327b4c79928441610d2bd0d3a6b164 diff --cc Cython/Compiler/Main.py index b5292dc9,4230814b..9b058f9a --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@@ -316,14 -225,17 +316,17 @@@ class Context 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 diff --cc Cython/Compiler/Nodes.py index 1e87f7a6,f9c99ae6..dd88dd6b --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@@ -2356,8 -2414,7 +2356,8 @@@ class InPlaceAssignmentNode(AssignmentN # 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) @@@ -2991,8 -2998,7 +2991,8 @@@ class ForInStatNode(LoopNode, StatNode) # 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)