-
Notifications
You must be signed in to change notification settings - Fork 1
Parser_Match
kareman edited this page Aug 13, 2020
·
3 revisions
Contains information about a patterns successfully completed match.
public struct Match: Equatable
Equatable
@inlinable init(endIndex: Input.Index, captures: [(name: String?, range: Range<Input.Index>)])
@usableFromInline init(_ thread: VMEngine<Input>.Thread, instructions: VMEngine<Input>.Instructions)
The position in the input when the pattern completed.
let endIndex: Input.Index
Note: If the last part of the pattern is a `!` or `&&`, `endIndex` is the position when that last part *started*.
The names and ranges of all captures.
let captures: [(name: String?, range: Range<Input.Index>)]
The range from the beginning of the first capture to the end of the last one.
If there are no captures, the empty range at the endIndex
of this Match.
var range: Range<Input.Index>
The names of all the captures.
var captureNames: Set<String>
@inlinable public static func ==(lhs: Parser<Input>.Match, rhs: Parser<Input>.Match) -> Bool
public func description(using input: Input) -> String
Generated at 2020-08-23T12:56:49+0000 using swift-doc 1.0.0-beta.3.