-
Notifications
You must be signed in to change notification settings - Fork 74
/
a_expr_fingerprint.go
51 lines (41 loc) · 1.07 KB
/
a_expr_fingerprint.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Auto-generated - DO NOT EDIT
package pg_query
import "strconv"
func (node A_Expr) Fingerprint(ctx FingerprintContext, parentNode Node, parentFieldName string) {
ctx.WriteString("A_Expr")
if int(node.Kind) != 0 {
ctx.WriteString("kind")
ctx.WriteString(strconv.Itoa(int(node.Kind)))
}
if node.Lexpr != nil {
subCtx := FingerprintSubContext{}
node.Lexpr.Fingerprint(&subCtx, node, "Lexpr")
if len(subCtx.parts) > 0 {
ctx.WriteString("lexpr")
for _, part := range subCtx.parts {
ctx.WriteString(part)
}
}
}
// Intentionally ignoring node.Location for fingerprinting
if len(node.Name.Items) > 0 {
subCtx := FingerprintSubContext{}
node.Name.Fingerprint(&subCtx, node, "Name")
if len(subCtx.parts) > 0 {
ctx.WriteString("name")
for _, part := range subCtx.parts {
ctx.WriteString(part)
}
}
}
if node.Rexpr != nil {
subCtx := FingerprintSubContext{}
node.Rexpr.Fingerprint(&subCtx, node, "Rexpr")
if len(subCtx.parts) > 0 {
ctx.WriteString("rexpr")
for _, part := range subCtx.parts {
ctx.WriteString(part)
}
}
}
}