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()
def VisitStatementExpression(self, node): self.PassVisit(node.env, node.stmt) return Environment.Empty()
def VisitArrayCreationExpression(self, node): self.PassVisit(node.env, node.a_type) self.PassVisit(node.env, node.exp) return Environment.Empty()
def VisitThisExpression(self, node): return Environment.Empty()
def VisitArrayAccess(self, node): self.PassVisit(node.env, node.name_or_primary) self.PassVisit(node.env, node.exp) return Environment.Empty()
def VisitFieldAccess(self, node): self.PassVisit(node.env, node.primary) return Environment.Empty()
def VisitWhileStatement(self, node): self.PassVisit(node.env, node.test_expr) self.ForkVisit(node.env, node.body) return Environment.Empty()
def VisitClassInstanceCreationExpression(self, node): self.PassVisit(node.env, node.class_type) self.PassVisit(node.env, node.args) return Environment.Empty()
def VisitUnaryExpression(self, node): self.PassVisit(node.env, node.right) return Environment.Empty()
def VisitImportDecl(self, node): return Environment.Empty()
def VisitVariableDeclarator(self, node): self.PassVisit(node.env, node.exp) return Environment.Empty()
def VisitEmptyStatement(self, node): return Environment.Empty()
def VisitReturnStatement(self, node): self.PassVisit(node.env, node.exp) return Environment.Empty()
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()
def VisitNameExpression(self, node): self.PassVisit(node.env, node.name) return Environment.Empty()
def VisitCastExpression(self, node): self.PassVisit(node.env, node.cast_type) self.PassVisit(node.env, node.exp) return Environment.Empty()
def VisitAssignmentExpression(self, node): self.PassVisit(node.env, node.lhs) self.PassVisit(node.env, node.exp) return Environment.Empty()
def VisitParensExpression(self, node): self.PassVisit(node.env, node.exp) return Environment.Empty()
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()
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()