SwiftLintSyntaxMap
public struct SwiftLintSyntaxMap
Represents a Swift file’s syntax information.
-
The SwiftLint-specific syntax tokens for this syntax map.
Declaration
Swift
public let tokens: [SwiftLintSyntaxToken] -
Creates a
SwiftLintSyntaxMapfrom the rawSyntaxMapobtained by SourceKitten.Declaration
Swift
public init(value: SyntaxMap)Parameters
valueThe raw
SyntaxMapobtained by SourceKitten. -
Returns array of syntax tokens intersecting with byte range.
Declaration
Swift
public func tokens(inByteRange byteRange: ByteRange) -> [SwiftLintSyntaxToken]Parameters
byteRangeByte-based NSRange.
Return Value
The array of syntax tokens intersecting with byte range.
-
Returns the syntax kinds in the specified byte range.
Declaration
Swift
public func kinds(inByteRange byteRange: ByteRange) -> [SyntaxKind]Parameters
byteRangeByte range.
Return Value
The syntax kinds in the specified byte range.
View on GitHub
Install in Dash