Skip to content

Commit 2db9c50

Browse files
committed
refactor(ast): Removed redundant type ast.Const (no parsers which produce instance of this type)
1 parent 2e0435c commit 2db9c50

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

internal/sql/ast/const.go

Lines changed: 0 additions & 17 deletions
This file was deleted.

internal/sql/astutils/rewrite.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,6 @@ func (a *application) apply(parent ast.Node, name string, iter *iterator, n ast.
496496
case *ast.CompositeTypeStmt:
497497
a.apply(n, "TypeName", nil, n.TypeName)
498498

499-
case *ast.Const:
500-
a.apply(n, "Xpr", nil, n.Xpr)
501-
502499
case *ast.Constraint:
503500
a.apply(n, "RawExpr", nil, n.RawExpr)
504501
a.apply(n, "Keys", nil, n.Keys)

internal/sql/astutils/walk.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,6 @@ func Walk(f Visitor, node ast.Node) {
665665
Walk(f, n.Ctecolcollations)
666666
}
667667

668-
case *ast.Const:
669-
if n.Xpr != nil {
670-
Walk(f, n.Xpr)
671-
}
672-
673668
case *ast.Constraint:
674669
if n.RawExpr != nil {
675670
Walk(f, n.RawExpr)

0 commit comments

Comments
 (0)