|
1 | 1 | private import codeql.swift.printast.PrintAstNode
|
2 | 2 |
|
3 | 3 | query predicate doubleChildren(
|
4 |
| - PrintAstNode parent, int index, PrintAstNode child1, PrintAstNode child2 |
| 4 | + PrintAstNode parent, int index, string label1, PrintAstNode child1, string label2, |
| 5 | + PrintAstNode child2 |
5 | 6 | ) {
|
6 | 7 | child1 != child2 and
|
7 |
| - parent.hasChild(child1, index, _) and |
8 |
| - parent.hasChild(child2, index, _) |
| 8 | + parent.hasChild(child1, index, label1) and |
| 9 | + parent.hasChild(child2, index, label2) |
9 | 10 | }
|
10 | 11 |
|
11 |
| -query predicate doubleIndexes(PrintAstNode parent, int index1, int index2, PrintAstNode child) { |
| 12 | +query predicate doubleIndexes( |
| 13 | + PrintAstNode parent, int index1, string label1, int index2, string label2, PrintAstNode child |
| 14 | +) { |
12 | 15 | index1 != index2 and
|
13 |
| - parent.hasChild(child, index1, _) and |
14 |
| - parent.hasChild(child, index2, _) |
| 16 | + parent.hasChild(child, index1, label1) and |
| 17 | + parent.hasChild(child, index2, label2) |
15 | 18 | }
|
16 | 19 |
|
17 |
| -query predicate doubleParents(PrintAstNode parent1, PrintAstNode parent2, PrintAstNode child) { |
| 20 | +query predicate doubleParents( |
| 21 | + PrintAstNode parent1, string label1, PrintAstNode parent2, string label2, PrintAstNode child |
| 22 | +) { |
18 | 23 | parent1 != parent2 and
|
19 |
| - parent1.hasChild(child, _, _) and |
20 |
| - parent2.hasChild(child, _, _) |
| 24 | + parent1.hasChild(child, _, label1) and |
| 25 | + parent2.hasChild(child, _, label2) |
21 | 26 | }
|
22 | 27 |
|
23 | 28 | private predicate isChildOf(PrintAstNode parent, PrintAstNode child) {
|
|
0 commit comments