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 {
102
102
}
103
103
104
104
/**
105
- * A `string` literal, for example `"Hello, World!"`.
105
+ * A `string` literal. Either a `string` literal (`StringLiteralUtf16`),
106
+ * or a `u8` literal (`StringLiteralUtf8`).
106
107
*/
107
108
class StringLiteral extends DotNet:: StringLiteral , Literal , @string_literal_expr {
108
109
override string toString ( ) { result = "\"" + this .getValue ( ) .replaceAll ( "\"" , "\\\"" ) + "\"" }
109
110
110
111
override string getAPrimaryQlClass ( ) { result = "StringLiteral" }
111
112
}
112
113
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
+
113
128
/**
114
129
* A `null` literal.
115
130
*/
You can’t perform that action at this time.
0 commit comments