def check_identifier_kind(self):
#print "NameNode.check_identifier_kind:", self.entry.name ###
#print self.entry.__dict__ ###
- print self
- print self.pos, self.name
entry = self.entry
#entry.used = 1
if not (entry.is_const or entry.is_variable
self.generate_filename_table(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.write(code.h.f.getvalue())
self.generate_exttype_vtable_struct(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("/* Declarations */")
vtab_dict = self.generate_vtab_dict(modules)
# py_loopvar_node PyTempNode or None
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):
import ExprNodes
self.target.analyse_target_types(env)