Java: Add StringLiteral.isTextBlock().

This commit is contained in:
Anders Schack-Mulligen
2021-09-24 13:11:18 +02:00
parent a031b2a090
commit 854f2a046a

View File

@@ -726,6 +726,9 @@ class StringLiteral extends Literal, @stringliteral {
*/
string getRepresentedString() { result = getValue() }
/** Holds if this string literal is a text block (`""" ... """`). */
predicate isTextBlock() { getLiteral().matches("\"\"\"%") }
override string getAPrimaryQlClass() { result = "StringLiteral" }
}