ExpressionParser

Protocol that is the base for expression parsers like InequalityExpressionParser or RegexExpressionParser.

Defines methods and properties that are needed to work as parser.

  • Pattern of expression.

    Declaration

    Swift

    var pattern: ExpressionPattern {get}
  • Method that parse pattern and returns ExpressionMatcher object if pattern can has been correctly parsed.

    Declaration

    Swift

    func parse() -> ExpressionMatcher?

    Return Value

    ExpressionMatcher or nil if pattern cannot be parsed.

  • Initializer that taeks ExpressionPattern as parameter.

    Declaration

    Swift

    init(_ pattern: ExpressionPattern)

    Parameters

    pattern

    ExpressionPattern that will be used to create ‘ExpressionMatcher’.