diff --git a/javascript/ql/lib/semmle/javascript/Expr.qll b/javascript/ql/lib/semmle/javascript/Expr.qll index 11fe4739f7b..925352cacad 100644 --- a/javascript/ql/lib/semmle/javascript/Expr.qll +++ b/javascript/ql/lib/semmle/javascript/Expr.qll @@ -379,7 +379,10 @@ class NullLiteral extends @null_literal, Literal { } * false * ``` */ -class BooleanLiteral extends @boolean_literal, Literal { } +class BooleanLiteral extends @boolean_literal, Literal { + /** Gets the value of this literal. */ + boolean getBoolValue() { if this.getRawValue() = "true" then result = true else result = false } +} /** * A numeric literal.