Пример #1
0
    def VisitBlock(self, node):
        env = node.env.upstream.Fork()
        if node.stmts:
            for stmt in node.stmts:
                update = self.ForkVisit(env, stmt)
                env = env.Fork()
                env.Update(update)

        return Environment.Empty()
Пример #2
0
 def VisitStatementExpression(self, node):
     self.PassVisit(node.env, node.stmt)
     return Environment.Empty()
Пример #3
0
 def VisitArrayCreationExpression(self, node):
     self.PassVisit(node.env, node.a_type)
     self.PassVisit(node.env, node.exp)
     return Environment.Empty()
Пример #4
0
 def VisitThisExpression(self, node):
     return Environment.Empty()
Пример #5
0
 def VisitArrayAccess(self, node):
     self.PassVisit(node.env, node.name_or_primary)
     self.PassVisit(node.env, node.exp)
     return Environment.Empty()
Пример #6
0
 def VisitFieldAccess(self, node):
     self.PassVisit(node.env, node.primary)
     return Environment.Empty()
Пример #7
0
 def VisitWhileStatement(self, node):
     self.PassVisit(node.env, node.test_expr)
     self.ForkVisit(node.env, node.body)
     return Environment.Empty()
Пример #8
0
 def VisitClassInstanceCreationExpression(self, node):
     self.PassVisit(node.env, node.class_type)
     self.PassVisit(node.env, node.args)
     return Environment.Empty()
Пример #9
0
 def VisitUnaryExpression(self, node):
     self.PassVisit(node.env, node.right)
     return Environment.Empty()
Пример #10
0
 def VisitImportDecl(self, node):
     return Environment.Empty()
Пример #11
0
 def VisitVariableDeclarator(self, node):
     self.PassVisit(node.env, node.exp)
     return Environment.Empty()
Пример #12
0
 def VisitEmptyStatement(self, node):
     return Environment.Empty()
Пример #13
0
 def VisitReturnStatement(self, node):
     self.PassVisit(node.env, node.exp)
     return Environment.Empty()
Пример #14
0
 def VisitForStatement(self, node):
     node.env.Update(self.PassVisit(node.env, node.init))
     self.PassVisit(node.env, node.test_expr)
     self.PassVisit(node.env, node.update)
     self.ForkVisit(node.env, node.body)
     return Environment.Empty()
Пример #15
0
 def VisitNameExpression(self, node):
     self.PassVisit(node.env, node.name)
     return Environment.Empty()
Пример #16
0
 def VisitCastExpression(self, node):
     self.PassVisit(node.env, node.cast_type)
     self.PassVisit(node.env, node.exp)
     return Environment.Empty()
Пример #17
0
 def VisitAssignmentExpression(self, node):
     self.PassVisit(node.env, node.lhs)
     self.PassVisit(node.env, node.exp)
     return Environment.Empty()
Пример #18
0
 def VisitParensExpression(self, node):
     self.PassVisit(node.env, node.exp)
     return Environment.Empty()
Пример #19
0
 def VisitMethodInvocation(self, node):
     self.PassVisit(node.env, node.name)
     self.PassVisit(node.env, node.primary)
     self.PassVisit(node.env, node.args)
     return Environment.Empty()
Пример #20
0
 def VisitIfThenElseStatement(self, node):
     self.PassVisit(node.env, node.test_expr)
     self.ForkVisit(node.env, node.stmt_true)
     self.ForkVisit(node.env, node.stmt_false)
     return Environment.Empty()