Merge pull request #6749 from aschackmull/java/istextblock

Java: Add StringLiteral.isTextBlock().
This commit is contained in:
Anders Schack-Mulligen
2021-09-27 10:54:31 +02:00
committed by GitHub

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" }
}