File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
powershell/ql/lib/semmle/code/powershell/ast/internal Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ module Public {
66
66
import ParenExpr
67
67
import Pipeline
68
68
import StringConstantExpression
69
+ import StringLiteral
69
70
import MemberExpr
70
71
import InvokeMemberExpression
71
72
import ObjectCreation
Original file line number Diff line number Diff line change
1
+ private import AstImport
2
+
3
+ // TODO: A string literal should ideally be the string constants that are
4
+ // surrounded by quotes (single or double), but we don't yet extract that
5
+ // information. So for now we just use the StringConstExpr class, which is
6
+ // a bit more general than we want.
7
+ class StringLiteral instanceof StringConstExpr {
8
+ /** Get the string representation of this string literal. */
9
+ string toString ( ) { result = this .getValue ( ) }
10
+
11
+ /** Get the value of this string literal. */
12
+ string getValue ( ) { result = super .getValueString ( ) }
13
+
14
+ /** Get the location of this string literal. */
15
+ SourceLocation getLocation ( ) { result = super .getLocation ( ) }
16
+ }
You can’t perform that action at this time.
0 commit comments