ToolsVersionSpecificationComponents
A representation of a Swift tools version specification in its constituent parts.
ToolsVersionParser.swift:410struct ToolsVersionSpecificationComponents
A Swift tools version specification consists of the following parts:
// swift-tools-version: 5.4
⌃~⌃~⌃~~~~~~~~~~~~~~~~~~~⌃~⌃~~
│ │ └ label │ └ version specifier
│ └ spacing └ spacing
└ comment marker
Other members in extension
Types
enum Error
struct ManifestComponents
A representation of a manifest in its constituent parts.
Type members
static func parse(manifestPath: AbsolutePath, fileSystem: FileSystem
) throws -> ToolsVersion static func parse(utf8String: String
) throws -> ToolsVersion static func split(String
) -> ManifestComponents Splits the given manifest into its constituent components.
Citizens in PackageLoading
Instance members
let commentMarker: Substring
The comment marker.
var everythingUpToVersionSpecifierIsWellFormed: Bool
A Boolean value indicating whether everything up to the version specifier in the Swift tools version specification represented in its constituent parts is well-formed.
var isCompatibleWithPreSwift5_4: Bool
A Boolean value indicating whether the Swift tools version specification represented in its constituent parts is backward-compatible with Swift < 5.4.
let label: Substring
The label part of the Swift tools version specification.
let spacingAfterCommentMarker: Substring
The spacing after the comment marker
let spacingAfterLabel: Substring
The spacing between the label part of the Swift tools version specification and the version specifier.
let versionSpecifier: Substring
The version specifier.