mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +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"]
|
||||
}
|
||||
|
||||
/** A string constant. This is a placeholder class -- use `StrConst` instead. */
|
||||
class Str extends Str_ { }
|
||||
|
||||
/** A string constant. */
|
||||
class StrConst extends Str_, ImmutableLiteral {
|
||||
class StrConst extends Str, ImmutableLiteral {
|
||||
/* syntax: "hello" */
|
||||
predicate isUnicode() {
|
||||
this.getPrefix() = unicode_prefix()
|
||||
|
||||
Reference in New Issue
Block a user