(f Visitor, node ast.Node)
| 18 | } |
| 19 | |
| 20 | func Walk(f Visitor, node ast.Node) { |
| 21 | if f = f.Visit(node); f == nil { |
| 22 | return |
| 23 | } |
| 24 | switch n := node.(type) { |
| 25 | |
| 26 | case *ast.AlterTableSetSchemaStmt: |
| 27 | if n.Table != nil { |
| 28 | Walk(f, n.Table) |
| 29 | } |
| 30 | |
| 31 | case *ast.AlterTableStmt: |
| 32 | if n.Relation != nil { |
| 33 | Walk(f, n.Relation) |
| 34 | } |
| 35 | if n.Table != nil { |
| 36 | Walk(f, n.Table) |
| 37 | } |
| 38 | if n.Cmds != nil { |
| 39 | Walk(f, n.Cmds) |
| 40 | } |
| 41 | |
| 42 | case *ast.AlterTypeAddValueStmt: |
| 43 | if n.Type != nil { |
| 44 | Walk(f, n.Type) |
| 45 | } |
| 46 | |
| 47 | case *ast.AlterTypeSetSchemaStmt: |
| 48 | if n.Type != nil { |
| 49 | Walk(f, n.Type) |
| 50 | } |
| 51 | |
| 52 | case *ast.AlterTypeRenameValueStmt: |
| 53 | if n.Type != nil { |
| 54 | Walk(f, n.Type) |
| 55 | } |
| 56 | |
| 57 | case *ast.CommentOnColumnStmt: |
| 58 | if n.Table != nil { |
| 59 | Walk(f, n.Table) |
| 60 | } |
| 61 | if n.Col != nil { |
| 62 | Walk(f, n.Col) |
| 63 | } |
| 64 | |
| 65 | case *ast.CommentOnSchemaStmt: |
| 66 | if n.Schema != nil { |
| 67 | Walk(f, n.Schema) |
| 68 | } |
| 69 | |
| 70 | case *ast.CommentOnTableStmt: |
| 71 | if n.Table != nil { |
| 72 | Walk(f, n.Table) |
| 73 | } |
| 74 | |
| 75 | case *ast.CommentOnTypeStmt: |
| 76 | if n.Type != nil { |
| 77 | Walk(f, n.Type) |
no test coverage detected