VariableOptions

public struct VariableOptions : OptionSet

Options that modify the behaviour of the variable matching, and the output that the framework provides

  • Integer representation of the option

    Declaration

    Swift

    public let rawValue: Int
  • Basic initialiser with the integer representation

    Declaration

    Swift

    public init(rawValue: Int)
  • If set, the value of the recognised placeholder will not be processed. Otherwise, it will be evaluated, using the interpreterForEvaluatingVariables property of the interpreter instance

    Declaration

    Swift

    public static let notInterpreted: VariableOptions
  • Whether the processed variable should be or not to be trimmed (removing whitespaces from both sides)

    Declaration

    Swift

    public static let notTrimmed: VariableOptions
  • Provides information whether the match should be exhaustive or just use the shortest possible matching string (even zero characters in some edge cases). This depends on the surrounding Keyword instances in the containing collection.

    Declaration

    Swift

    public static let exhaustiveMatch: VariableOptions
  • If interpreted and the result of the evaluation is nil, then acceptsNilValue determines if the current match result should be instant noMatch, or nil is an accepted value, so the matching should be continued

    Declaration

    Swift

    public static let acceptsNilValue: VariableOptions
  • In order to avoid double negatives in the source code (e.g. !notInterpreted), this helper checks the lack of .notInterpreted value in the optionset

    Declaration

    Swift

    var interpreted: Bool { get }
  • In order to avoid double negatives in the source code (e.g. !notTrimmed), this helper checks the lack of .notTrimmed value in the optionset

    Declaration

    Swift

    var trimmed: Bool { get }