diff --git a/Sources/FFCParserCombinator/FFCParserCombinator.swift b/Sources/FFCParserCombinator/FFCParserCombinator.swift index d4aa195..bc8feee 100644 --- a/Sources/FFCParserCombinator/FFCParserCombinator.swift +++ b/Sources/FFCParserCombinator/FFCParserCombinator.swift @@ -28,12 +28,12 @@ public extension Parser { } /// Parses zero or more consecutive elements into an array - public var many: Parser { + var many: Parser { return atLeast(0) } /// Parses one or more consecutive elements into an array - public var many1: Parser { + var many1: Parser { return atLeast(1) } @@ -41,7 +41,7 @@ public extension Parser { /// /// - Parameter min: the minimum number of elements to match /// - Returns: A parser that matches the receiver at least `min` times. - public func atLeast(_ min: UInt) -> Parser { + func atLeast(_ min: UInt) -> Parser { return from(min, upTo: nil) } @@ -53,7 +53,7 @@ public extension Parser { /// - min: the minimum number of elements to match /// - max: the maximum number of elements to match /// - Returns: A parser that matches the receiver at least `min` times. - public func between(_ min: UInt, and max: UInt) -> Parser { + func between(_ min: UInt, and max: UInt) -> Parser { return from(min, upTo: max) }