Expression

public struct Expression : Codable, CustomStringConvertible, Equatable
extension Expression: ValidExpressionArgument

Undocumented

  • The individual elements of the expression in an array

    Declaration

    Swift

    public var elements: [Element]
  • Undocumented

    Declaration

    Swift

    public init(_ op: Expression.Operator,
                @ExpressionBuilder content: () -> Expression = { Expression(with: [.argument(.null)])})
  • Attempts to create an Expression from a jsonObject.

    Declaration

    Swift

    public init?(from jsonObject: Any)
  • Returns a jsonObject representation of this expression if serialization is successful, throws otherwise

    Declaration

    Swift

    public func jsonObject() throws -> Any
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws
  • Undocumented

    Declaration

    Swift

    public init(with elements: [Element])
  • Declaration

    Swift

    public var description: String { get }
  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • An ExpressionElement can be either a op (associated with a String) OR an argument (associated with an ExpressionArgument)

    See more

    Declaration

    Swift

    public indirect enum Element : Codable, CustomStringConvertible, Equatable
    extension Expression.Element: ValidExpressionArgument
  • An ExpressionArgument is either a literal (associated with a double, string, boolean, or null value) or another Expression

    See more

    Declaration

    Swift

    public indirect enum Argument : Codable, CustomStringConvertible, Equatable
    extension Expression.Argument: ValidExpressionArgument
  • Undocumented

    See more

    Declaration

    Swift

    enum Operator : String, Codable
    extension Expression.Operator: ValidExpressionArgument
  • Undocumented

    Declaration

    Swift

    public var expressionElements: [Expression.Element] { get }