File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
csharp/ql/lib/semmle/code/csharp/exprs Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -102,14 +102,29 @@ class DecimalLiteral extends RealLiteral, @decimal_literal_expr {
102102}
103103
104104/**
105- * A `string` literal, for example `"Hello, World!"`.
105+ * A `string` literal. Either a `string` literal (`StringLiteralUtf16`),
106+ * or a `u8` literal (`StringLiteralUtf8`).
106107 */
107108class StringLiteral extends DotNet:: StringLiteral , Literal , @string_literal_expr {
108109 override string toString ( ) { result = "\"" + this .getValue ( ) .replaceAll ( "\"" , "\\\"" ) + "\"" }
109110
110111 override string getAPrimaryQlClass ( ) { result = "StringLiteral" }
111112}
112113
114+ /**
115+ * A `string` literal, for example `"Hello, World!"`.
116+ */
117+ class StringLiteralUtf16 extends StringLiteral , @utf16_string_literal_expr {
118+ override string getAPrimaryQlClass ( ) { result = "StringLiteralUtf16" }
119+ }
120+
121+ /**
122+ * A `u8` literal, for example `"AUTH"u8`
123+ */
124+ class StringLiteralUtf8 extends StringLiteral , @utf8_string_literal_expr {
125+ override string getAPrimaryQlClass ( ) { result = "StringLiteralUtf8" }
126+ }
127+
113128/**
114129 * A `null` literal.
115130 */
You can’t perform that action at this time.
0 commit comments