Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0af9e8a

Browse files
committed
C#: remove support for legacy syntax
1 parent 6bb15dc commit 0af9e8a

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

csharp/ql/lib/semmle/code/csharp/dataflow/internal/AccessPathSyntax.qll

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,6 @@ class AccessPath extends string instanceof AccessPath::Range {
5252
AccessPathToken getLastToken(int n) { result = getToken(getNumToken() - 1 - n) }
5353
}
5454

55-
/**
56-
* An access path that uses `A of B` syntax, which should now be written as `B.A`.
57-
*
58-
* This is a compatibility layer to help test at checkpoints during transition to the new syntax.
59-
*/
60-
private class LegacyAccessPath extends AccessPath {
61-
LegacyAccessPath() { this.matches("% of %") }
62-
63-
private string getRawSplit(int n) { result = this.splitAt(" of ", n) }
64-
65-
private int getNumRawSplits() { result = strictcount(int n | exists(getRawSplit(n))) }
66-
67-
override string getRawToken(int n) { result = getRawSplit(getNumRawSplits() - n - 1) }
68-
69-
override predicate hasSyntaxError() { none() }
70-
}
71-
7255
/**
7356
* An access part token such as `Argument[1]` or `ReturnValue`, appearing in one or more access paths.
7457
*/

0 commit comments

Comments
 (0)