PatternElement
public protocol PatternElement
MatchElement
s are used by Matcher
instances to be able to recognise patterns.
Currently, the two main kind of MatchElement
classes are Keyword
s and Variable
s
-
Using this method, an element returns how much the String provided in the
prefix
parameter matches the current elementDeclaration
Swift
func matches(prefix: String, options: PatternOptions) -> MatchResult<Any>
Parameters
prefix
The input
options
Options that modify the matching algorithm
Return Value
The result of the match operation