PatternProtocol
public protocol PatternProtocol
Pattern consists of array of elements
-
Matcherinstances are capable of recognising patterns described in theelementscollection. It only remains effective, if theVariableinstances are surrounded byKeywordinstances, so no twoVariables should be next to each other. Otherwise, their matching result and value would be undefined. This collection should be provided during the initialisation, and cannot be modified once theMatcherinstance has been created.Declaration
Swift
var elements: [PatternElement] { get } -
Options that modify the pattern matching algorithm
Declaration
Swift
var options: PatternOptions { get } -
Optional name to identify the pattern. If not provided during initialisation, it will fall back to the textual representation of the elements array
Declaration
Swift
var name: String { get }
View on GitHub
Install in Dash
PatternProtocol Protocol Reference