Skip to content

Commit 073302f

Browse files
committed
Ruby: Add another regex consistency test
1 parent a70ed71 commit 073302f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ruby/ql/consistency-queries/RegExpConsistency.ql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ query predicate nonUniqueChild(RegExpParent parent, int i, RegExpTerm child) {
66
}
77

88
query predicate cyclic(RegExpParent parent) { parent = parent.getAChild+() }
9+
10+
query predicate nonConsecutive(RegExpParent parent, int i) {
11+
exists(parent.getChild(i)) and
12+
i > 0 and
13+
not exists(parent.getChild(i - 1))
14+
}

0 commit comments

Comments
 (0)