We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4140ce0 commit 8ad05b7Copy full SHA for 8ad05b7
1 file changed
ql/src/codeql_ql/ast/Ast.qll
@@ -990,6 +990,21 @@ class Float extends Literal {
990
float getValue() { result = lit.getChild().(Generated::Float).getValue().toFloat() }
991
}
992
993
+/** A boolean literal */
994
+class Boolean extends Literal {
995
+ Generated::Bool bool;
996
+
997
+ Boolean() { lit.getChild() = bool }
998
999
+ /** Holds if the value is `true` */
1000
+ predicate isTrue() { bool.getChild() instanceof Generated::True }
1001
1002
+ /** Holds if the value is `false` */
1003
+ predicate isFalse() { bool.getChild() instanceof Generated::False }
1004
1005
+ override string getAPrimaryQlClass() { result = "Boolean" }
1006
+}
1007
1008
/** A comparison symbol, such as `"<"` or `"="`. */
1009
class ComparisonSymbol extends string {
1010
ComparisonSymbol() {
0 commit comments