Condition
public indirect enum Condition : Codable, Equatable, Sendable
A condition in a conditional compilation statement.
-
Always holds.
Declaration
Swift
case `true` -
Never holds.
Declaration
Swift
case `false` -
Holds iff the operating system for which the code is compiled matches the payload.
Declaration
Swift
case operatingSystem(Identifier) -
Holds iff the processor architecture for which the code is compiled matches the payload.
Declaration
Swift
case architecture(Identifier) -
Holds iff the payload matches any of the feature enabled in the compiler.
Declaration
Swift
case feature(Identifier) -
Holds iff the name of the compiler processing the file matches the payload.
Declaration
Swift
case compiler(Identifier) -
Holds iff the version of the compiler processing the file, satisfies the
comparison.Declaration
Swift
case compilerVersion(comparison: VersionComparison) -
Holds iff the version of Hylo for which this file is compiled, satisfies
comparison.Declaration
Swift
case hyloVersion(comparison: VersionComparison) -
Holds iff the payload doesn’t.
Declaration
Swift
case not(Condition) -
Holds iff both conditions in the payload do.
Declaration
Swift
case and(Condition, Condition) -
Holds iff either condition in the payload does.
Declaration
Swift
case or(Condition, Condition) -
trueiff the body of the conditional-compilation shouldn’t be parsed.Declaration
Swift
public var mayNotNeedParsing: Bool { get } -
Returns
trueiffselfholds for the current process.Declaration
Swift
public func holds(for factors: ConditionalCompilationFactors) -> Bool
View on GitHub