Exemplo n.º 1
0
 def analyze_expr_structure(self, func):
     func.function_expr_count += 1
     self.name = "__func_expr_" + func.function_expr_count
     return_stmt = node_return_stmt()
     return_stmt.return_expression_list = (self.expr,)
     self.statements = [return_stmt]
     func.add_child_function(self)
Exemplo n.º 2
0
 def analyze_function_structure(self):
     print "..analyzing function structure of " + self.name
     if len(self.statements) == 0 or self.statements[-1].__class__ is not node_return_stmt:
         return_stmt_decl = node_return_stmt()
         return_stmt_decl.return_expression_list = []
         self.statements.append(return_stmt_decl)
     self.analyze_block_structure(self.statements)
     print self.name + " - structure analysis complete"