mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Python: Add Str class
This makes the AST viewer (which annotates string constant nodes as `Str`) a bit more consistent.
This commit is contained in:
@@ -616,8 +616,11 @@ private string non_byte_prefix() {
|
|||||||
not result.charAt(_) in ["b", "B"]
|
not result.charAt(_) in ["b", "B"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** A string constant. This is a placeholder class -- use `StrConst` instead. */
|
||||||
|
class Str extends Str_ { }
|
||||||
|
|
||||||
/** A string constant. */
|
/** A string constant. */
|
||||||
class StrConst extends Str_, ImmutableLiteral {
|
class StrConst extends Str, ImmutableLiteral {
|
||||||
/* syntax: "hello" */
|
/* syntax: "hello" */
|
||||||
predicate isUnicode() {
|
predicate isUnicode() {
|
||||||
this.getPrefix() = unicode_prefix()
|
this.getPrefix() = unicode_prefix()
|
||||||
|
|||||||
Reference in New Issue
Block a user