Commit 96945dd7 authored by Robert Bradshaw's avatar Robert Bradshaw

minor fixes

parent df6713cc
...@@ -870,8 +870,6 @@ class NameNode(AtomicExprNode): ...@@ -870,8 +870,6 @@ class NameNode(AtomicExprNode):
def check_identifier_kind(self): def check_identifier_kind(self):
#print "NameNode.check_identifier_kind:", self.entry.name ### #print "NameNode.check_identifier_kind:", self.entry.name ###
#print self.entry.__dict__ ### #print self.entry.__dict__ ###
print self
print self.pos, self.name
entry = self.entry entry = self.entry
#entry.used = 1 #entry.used = 1
if not (entry.is_const or entry.is_variable if not (entry.is_const or entry.is_variable
......
...@@ -255,7 +255,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -255,7 +255,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
self.generate_filename_table(code) self.generate_filename_table(code)
self.generate_utility_functions(env, code) self.generate_utility_functions(env, code)
self.generate_declarations_for_module(env, modules, code.h) self.generate_declarations_for_modules(env, modules, code.h)
f = open_new_file(result.c_file) f = open_new_file(result.c_file)
f.write(code.h.f.getvalue()) f.write(code.h.f.getvalue())
...@@ -440,7 +440,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -440,7 +440,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
self.generate_exttype_vtable_struct(entry, code) self.generate_exttype_vtable_struct(entry, code)
self.generate_exttype_vtabptr_declaration(entry, code) self.generate_exttype_vtabptr_declaration(entry, code)
def generate_declarations_for_module(self, env, modules, code): def generate_declarations_for_modules(self, env, modules, code):
code.putln("") code.putln("")
code.putln("/* Declarations */") code.putln("/* Declarations */")
vtab_dict = self.generate_vtab_dict(modules) vtab_dict = self.generate_vtab_dict(modules)
......
...@@ -3043,6 +3043,12 @@ class ForFromStatNode(LoopNode, StatNode): ...@@ -3043,6 +3043,12 @@ class ForFromStatNode(LoopNode, StatNode):
# py_loopvar_node PyTempNode or None # py_loopvar_node PyTempNode or None
child_attrs = ["target", "bound1", "bound2", "step", "body", "else_clause", "py_loopvar_node"] child_attrs = ["target", "bound1", "bound2", "step", "body", "else_clause", "py_loopvar_node"]
def analyse_declarations(self, env):
self.target.analyse_target_declaration(env)
self.body.analyse_declarations(env)
if self.else_clause:
self.else_clause.analyse_declarations(env)
def analyse_expressions(self, env): def analyse_expressions(self, env):
import ExprNodes import ExprNodes
self.target.analyse_target_types(env) self.target.analyse_target_types(env)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment