mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Swift: Add Location.toString.
This commit is contained in:
@@ -8,4 +8,15 @@ class Location extends LocationBase {
|
||||
el = getEndLine() and
|
||||
ec = getEndColumn()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a textual representation of this location.
|
||||
*/
|
||||
override string toString() {
|
||||
exists(string filePath, int startLine, int startColumn, int endLine, int endColumn |
|
||||
this.hasLocationInfo(filePath, startLine, startColumn, endLine, endColumn)
|
||||
|
|
||||
toUrl(filePath, startLine, startColumn, endLine, endColumn, result)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| file://:0:0:0:0 | UnknownLocation |
|
||||
| location.swift:2:1:3:1 | DbLocation |
|
||||
| location.swift:2:11:2:14 | DbLocation |
|
||||
| location.swift:2:19:3:1 | DbLocation |
|
||||
| file://:0:0:0:0 | file://:0:0:0:0 |
|
||||
| location.swift:2:1:3:1 | location.swift:2:1:3:1 |
|
||||
| location.swift:2:11:2:14 | location.swift:2:11:2:14 |
|
||||
| location.swift:2:19:3:1 | location.swift:2:19:3:1 |
|
||||
|
||||
Reference in New Issue
Block a user