@@ -63,6 +63,9 @@ class AstNode extends TAstNode {
63
63
pred = directMember ( "getQLDoc" ) and result = this .getQLDoc ( )
64
64
}
65
65
66
+ /** Gets any child of this node. */
67
+ AstNode getAChild ( ) { result = this .getAChild ( _) }
68
+
66
69
/**
67
70
* Gets the primary QL class for the ast node.
68
71
*/
@@ -1238,14 +1241,7 @@ class Boolean extends Literal {
1238
1241
1239
1242
/** A comparison symbol, such as `"<"` or `"="`. */
1240
1243
class ComparisonSymbol extends string {
1241
- ComparisonSymbol ( ) {
1242
- this = "=" or
1243
- this = "!=" or
1244
- this = "<" or
1245
- this = ">" or
1246
- this = "<=" or
1247
- this = ">="
1248
- }
1244
+ ComparisonSymbol ( ) { this = [ "=" , "!=" , "<" , ">" , "<=" , ">=" ] }
1249
1245
}
1250
1246
1251
1247
/** A comparison formula, such as `x < 3` or `y = true`. */
@@ -1287,10 +1283,7 @@ class Quantifier extends TQuantifier, Formula {
1287
1283
}
1288
1284
1289
1285
/** Gets the ith variable declaration of this quantifier. */
1290
- VarDecl getArgument ( int i ) {
1291
- i >= 1 and
1292
- toQL ( result ) = quant .getChild ( i - 1 )
1293
- }
1286
+ VarDecl getArgument ( int i ) { toQL ( result ) = quant .getChild ( i + 1 ) }
1294
1287
1295
1288
/** Gets an argument of this quantifier. */
1296
1289
VarDecl getAnArgument ( ) { result = this .getArgument ( _) }
@@ -1661,6 +1654,15 @@ class FullAggregate extends TFullAggregate, Aggregate {
1661
1654
}
1662
1655
}
1663
1656
1657
+ /**
1658
+ * A "any" expression, such as `any(int i | i > 0).toString()`.
1659
+ */
1660
+ class Any extends FullAggregate {
1661
+ Any ( ) { this .getKind ( ) = "any" }
1662
+
1663
+ override string getAPrimaryQlClass ( ) { result = "Any" }
1664
+ }
1665
+
1664
1666
/**
1665
1667
* A "rank" expression, such as `rank[4](int i | i = [5 .. 15] | i)`.
1666
1668
*/
@@ -1855,7 +1857,7 @@ class ExprAnnotation extends TExprAnnotation, Expr {
1855
1857
1856
1858
/** A function symbol, such as `+` or `*`. */
1857
1859
class FunctionSymbol extends string {
1858
- FunctionSymbol ( ) { this = "+" or this = "-" or this = "*" or this = "/" or this = "%" }
1860
+ FunctionSymbol ( ) { this = [ "+" , "-" , "*" , "/" , "%" ] }
1859
1861
}
1860
1862
1861
1863
/**
0 commit comments