Skip to content

Commit

Permalink
add OneOf to Parsers namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineDominion committed Dec 3, 2023
1 parent 7379b32 commit 5825790
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Sources/URLSchemer/Parsers/OneOf.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
extension Parsers {
public typealias OneOf = URLSchemer.OneOf
}

/// Attempts to run each of its `parsers` until one succeeds, or fails if every parser inside fails.
///
/// ## Ordering is important
Expand Down Expand Up @@ -70,9 +74,9 @@ extension OneOfBuilder {
public let parser2: Parser2

@inlinable
public init(_ p0: Parser1, _ p1: Parser2) {
self.parser1 = p0
self.parser2 = p1
public init(_ parser1: Parser1, _ parser2: Parser2) {
self.parser1 = parser1
self.parser2 = parser2
}

@inlinable
Expand Down

0 comments on commit 5825790

Please sign in to comment.