File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
lib/semmle/code/powershell/ast/internal
test/library-tests/ast/Expressions Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,12 @@ class MemberExpr extends Expr, TMemberExpr {
37
37
38
38
predicate isStatic ( ) { getRawAst ( this ) .( Raw:: MemberExpr ) .isStatic ( ) }
39
39
40
- final override string toString ( ) { result = this .getMemberName ( ) }
40
+ final override string toString ( ) {
41
+ result = this .getMemberName ( )
42
+ or
43
+ not exists ( this .getMemberName ( ) ) and
44
+ result = "..."
45
+ }
41
46
42
47
predicate isExplicitWrite ( Ast assignment ) {
43
48
explicitAssignment ( getRawAst ( this ) , getRawAst ( assignment ) )
Original file line number Diff line number Diff line change 5
5
| BinaryExpression.ps1:4:1:4:7 | [Stmt] result | BinaryExpression.ps1:4:1:4:7 | result |
6
6
| ExpandableString.ps1:1:1:1:39 | [Stmt] Date: $([DateTime]::Now)\nName: $name | ExpandableString.ps1:1:1:1:39 | Date: $([DateTime]::Now)\nName: $name |
7
7
| ExpandableString.ps1:1:23:1:37 | [Stmt] Now | ExpandableString.ps1:1:23:1:37 | Now |
8
- | MemberExpression.ps1:2:1:2:14 | (no string representation) | MemberExpression.ps1:2:1:2:14 | (no string representation) |
8
+ | MemberExpression.ps1:2:1:2:14 | [Stmt] ... | MemberExpression.ps1:2:1:2:14 | ... |
9
9
| SubExpression.ps1:1:1:1:23 | [Stmt] Call to AddDays | SubExpression.ps1:1:1:1:23 | Call to AddDays |
10
10
| SubExpression.ps1:1:3:1:10 | [Stmt] Call to Get-Date | SubExpression.ps1:1:3:1:10 | Call to Get-Date |
11
11
| SubExpression.ps1:2:1:2:21 | [Stmt] Call to AddDays | SubExpression.ps1:2:1:2:21 | Call to AddDays |
@@ -16,4 +16,4 @@ expandableString
16
16
| ExpandableString.ps1:1:1:1:39 | Date: $([DateTime]::Now)\nName: $name | 1 | ExpandableString.ps1:1:21:1:38 | $(...) |
17
17
memberExpr
18
18
| ExpandableString.ps1:1:23:1:37 | Now | ExpandableString.ps1:1:23:1:32 | DateTime |
19
- | MemberExpression.ps1:2:1:2:14 | (no string representation) | MemberExpression.ps1:2:1:2:10 | DateTime |
19
+ | MemberExpression.ps1:2:1:2:14 | ... | MemberExpression.ps1:2:1:2:10 | DateTime |
You can’t perform that action at this time.
0 commit comments