Code

public enum Code : CodeRepresentable, Equatable

An enum that can unify a single Fragment and an array of Fragments into one type

  • A Fragment

    Declaration

    Swift

    case fragment(Fragment)
  • Several Fragments

    Declaration

    Swift

    case fragments([Fragment])
  • No fragments

    Declaration

    Swift

    case none
  • Code as an array of Fragments

    Declaration

    Swift

    @inlinable
    public var fragments: [Fragment] { get }
  • Declaration

    Swift

    @inlinable
    public var asCode: Code { get }
  • Declaration

    Swift

    public static func == (lhs: Code, rhs: Code) -> Bool