mirror of
https://github.com/github/codeql.git
synced 2026-08-04 01:13:00 +02:00
25 lines
748 B
Plaintext
25 lines
748 B
Plaintext
import ruby
|
|
|
|
query predicate stringEscapeSequenceComponents(
|
|
StringEscapeSequenceComponent c, string raw, string unescaped
|
|
) {
|
|
(
|
|
unescaped = c.getConstantValue().getString()
|
|
or
|
|
not exists(c.getConstantValue().getString()) and unescaped = "<none>"
|
|
) and
|
|
raw = c.getRawText()
|
|
}
|
|
|
|
query predicate regexpEscapeSequenceComponents(RegExpEscapeSequenceComponent c, string stringValue) {
|
|
stringValue = c.getConstantValue().getString()
|
|
or
|
|
not exists(c.getConstantValue().getString()) and stringValue = "<none>"
|
|
}
|
|
|
|
query predicate stringlikeLiterals(StringlikeLiteral l, string value, string kind) {
|
|
value = l.getConstantValue().getString() and kind = "string"
|
|
or
|
|
value = l.getConstantValue().getSymbol() and kind = "symbol"
|
|
}
|