Beispiel #1
0
 def visit(self, visitor: Visitor):
     visitor.visit_ForEachStmt(self)
     self.Ident.visit(visitor)
     self.In.visit(visitor)
     for stmt in self.Body:
         stmt.visit(visitor)
     visitor.leave_ForEachStmt(self)
Beispiel #2
0
 def visit(self, visitor: Visitor):
     visitor.visit_FieldExpr(self)
     if self.Args is not None:
         for expr in self.Args:
             if expr is not None:
                 expr.visit(visitor)
     visitor.leave_FieldExpr(self)
Beispiel #3
0
    def visit(self, visitor: Visitor):
        visitor.visit_PrepParenExpr(self)
        self.Expr.visit(visitor)
        visitor.leave_PrepParenExpr(self)


#endregion PrepExpr
Beispiel #4
0
 def visit(self, visitor: Visitor):
     visitor.visit_ForStmt(self)
     self.Ident.visit(visitor)
     self.From.visit(visitor)
     self.To.visit(visitor)
     for stmt in self.Body:
         stmt.visit(visitor)
     visitor.leave_ForStmt(self)
Beispiel #5
0
 def visit(self, visitor: Visitor):
     visitor.visit_TernaryExpr(self)
     self.Cond.visit(visitor)
     self.Then.visit(visitor)
     self.Else.visit(visitor)
     for item in self.Tail:
         item.visit(visitor)
     visitor.leave_TernaryExpr(self)
Beispiel #6
0
 def visit(self, visitor: Visitor):
     visitor.visit_IdentExpr(self)
     if self.Args is not None:
         for expr in self.Args:
             if expr is not None:
                 expr.visit(visitor)
     for item in self.Tail:
         item.visit(visitor)
     visitor.leave_IdentExpr(self)
Beispiel #7
0
 def visit(self, visitor: Visitor):
     visitor.visit_Module(self)
     for decl in self.Decls:
         decl.visit(visitor)
     for auto in self.Auto:
         auto.visit(visitor)
     for stmt in self.Body:
         stmt.visit(visitor)
     visitor.leave_Module(self)
Beispiel #8
0
 def visit(self, visitor: Visitor):
     visitor.visit_MethodDecl(self)
     self.Sign.visit(visitor)
     for decl in self.Vars:
         decl.visit(visitor)
     for auto in self.Auto:
         auto.visit(visitor)
     for stmt in self.Body:
         stmt.visit(visitor)
     visitor.leave_MethodDecl(self)
Beispiel #9
0
 def visit(self, visitor: Visitor):
     visitor.visit_IfStmt(self)
     self.Cond.visit(visitor)
     for stmt in self.Then:
         stmt.visit(visitor)
     if self.ElsIf is not None:
         for stmt in self.ElsIf:
             stmt.visit(visitor)
     if self.Else is not None:
         self.Else.visit(visitor)
     visitor.leave_IfStmt(self)
Beispiel #10
0
 def visit(self, visitor: Visitor):
     visitor.visit_BinaryExpr(self)
     self.Left.visit(visitor)
     self.Right.visit(visitor)
     visitor.leave_BinaryExpr(self)
Beispiel #11
0
 def visit(self, visitor: Visitor):
     visitor.visit_WhileStmt(self)
     self.Cond.visit(visitor)
     for stmt in self.Body:
         stmt.visit(visitor)
     visitor.leave_WhileStmt(self)
Beispiel #12
0
 def visit(self, visitor: Visitor):
     visitor.visit_ElsIfStmt(self)
     self.Cond.visit(visitor)
     for stmt in self.Then:
         stmt.visit(visitor)
     visitor.leave_ElsIfStmt(self)
Beispiel #13
0
 def visit(self, visitor: Visitor):
     visitor.visit_CallStmt(self)
     self.Ident.visit(visitor)
     visitor.leave_CallStmt(self)
Beispiel #14
0
 def visit(self, visitor: Visitor):
     visitor.visit_ExecuteStmt(self)
     self.Expr.visit(visitor)
     visitor.leave_ExecuteStmt(self)
Beispiel #15
0
 def visit(self, visitor: Visitor):
     visitor.visit_ParenExpr(self)
     self.Expr.visit(visitor)
     visitor.leave_ParenExpr(self)
Beispiel #16
0
 def visit(self, visitor: Visitor):
     visitor.visit_PrepElseInst(self)
Beispiel #17
0
 def visit(self, visitor: Visitor):
     visitor.visit_LabelStmt(self)
Beispiel #18
0
 def visit(self, visitor: Visitor):
     visitor.visit_ExceptStmt(self)
     for stmt in self.Body:
         stmt.visit(visitor)
     visitor.leave_ExceptStmt(self)
Beispiel #19
0
 def visit(self, visitor: Visitor):
     visitor.visit_AssignStmt(self)
     self.Left.visit(visitor)
     self.Right.visit(visitor)
     visitor.leave_AssignStmt(self)
Beispiel #20
0
 def visit(self, visitor: Visitor):
     visitor.visit_StringExpr(self)
     for expr in self.List:
         expr.visit(visitor)
     visitor.leave_StringExpr(self)
Beispiel #21
0
 def visit(self, visitor: Visitor):
     visitor.visit_NotExpr(self)
     self.Expr.visit(visitor)
     visitor.leave_NotExpr(self)
Beispiel #22
0
 def visit(self, visitor: Visitor):
     visitor.visit_UnaryExpr(self)
     self.Operand.visit(visitor)
     visitor.leave_UnaryExpr(self)
Beispiel #23
0
 def visit(self, visitor: Visitor):
     visitor.visit_TryStmt(self)
     for stmt in self.Try:
         stmt.visit(visitor)
     self.Except.visit(visitor)
     visitor.leave_TryStmt(self)
Beispiel #24
0
 def visit(self, visitor: Visitor):
     visitor.visit_NewExpr(self)
     for expr in self.Args:
         if expr is not None:
             expr.visit(visitor)
     visitor.leave_NewExpr(self)
Beispiel #25
0
 def visit(self, visitor: Visitor):
     visitor.visit_GotoStmt(self)
Beispiel #26
0
 def visit(self, visitor: Visitor):
     visitor.visit_BreakStmt(self)
Beispiel #27
0
 def visit(self, visitor: Visitor):
     visitor.visit_PrepElsIfInst(self)
     self.Cond.visit(visitor)
     visitor.leave_PrepElsIfInst(self)
Beispiel #28
0
 def visit(self, visitor: Visitor):
     visitor.visit_ContinueStmt(self)
Beispiel #29
0
 def visit(self, visitor: Visitor):
     visitor.visit_PrepEndIfInst(self)
Beispiel #30
0
 def visit(self, visitor: Visitor):
     visitor.visit_RaiseStmt(self)
     if self.Expr is not None:
         self.Expr.visit(visitor)
     visitor.leave_RaiseStmt(self)