Skip to content

Commit bde4783

Browse files
authored
Python: Add Str class
This makes the AST viewer (which annotates string constant nodes as `Str`) a bit more consistent.
1 parent 4101676 commit bde4783

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/ql/lib/semmle/python/Exprs.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,11 @@ private string non_byte_prefix() {
616616
not result.charAt(_) in ["b", "B"]
617617
}
618618

619+
/** A string constant. This is a placeholder class -- use `StrConst` instead. */
620+
class Str extends Str_ { }
621+
619622
/** A string constant. */
620-
class StrConst extends Str_, ImmutableLiteral {
623+
class StrConst extends Str, ImmutableLiteral {
621624
/* syntax: "hello" */
622625
predicate isUnicode() {
623626
this.getPrefix() = unicode_prefix()

0 commit comments

Comments
 (0)