Skip to content

Commit 57bf0b1

Browse files
committed
Ruby: remove support for legacy syntax
1 parent e3605ee commit 57bf0b1

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

ruby/ql/lib/codeql/ruby/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)