add getBoolValue() as a utility predicate on BooleanLiteral

This commit is contained in:
erik-krogh
2022-12-20 21:23:29 +01:00
parent 2f8c9a5a2c
commit 3f0fe96f85

View File

@@ -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.