File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,15 @@ func (n *A_Expr) Format(buf *TrackedBuffer) {
18
18
}
19
19
buf .astFormat (n .Lexpr )
20
20
buf .WriteString (" " )
21
- if n .Kind == A_Expr_Kind_IN {
21
+ switch n .Kind {
22
+ case A_Expr_Kind_IN :
22
23
buf .WriteString (" IN (" )
23
24
buf .astFormat (n .Rexpr )
24
25
buf .WriteString (")" )
25
- } else {
26
+ case A_Expr_Kind_LIKE :
27
+ buf .WriteString (" LIKE " )
28
+ buf .astFormat (n .Rexpr )
29
+ default :
26
30
buf .astFormat (n .Name )
27
31
buf .WriteString (" " )
28
32
buf .astFormat (n .Rexpr )
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ package ast
3
3
type A_Expr_Kind uint
4
4
5
5
const (
6
- A_Expr_Kind_IN A_Expr_Kind = 7
6
+ A_Expr_Kind_IN A_Expr_Kind = 7
7
+ A_Expr_Kind_LIKE A_Expr_Kind = 8
7
8
)
8
9
9
10
func (n * A_Expr_Kind ) Pos () int {
You can’t perform that action at this time.
0 commit comments