Skip to content

OrPattern

kareman edited this page Jul 1, 2020 · 4 revisions

OrPattern

A pattern which first tries the first pattern, if that fails it tries the second pattern from the same position.

public struct OrPattern<First: Pattern, Second: Pattern>: Pattern

Inheritance

Pattern, RegexConvertible

Initializers

init(_:or:)

@inlinable init(_ first: First, or second: Second)

Properties

first

let first: First

second

let second: Second

description

var description: String

Methods

createInstructions(_:)

@inlinable public func createInstructions(_ instructions: inout Instructions) throws

Clone this wiki locally