mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[stdlib] Unicode[Encoding|Parser] => Unicode.[Encoding|Parser]
This commit is contained in:
@@ -29,9 +29,9 @@ extension Unicode {
|
||||
|
||||
/// Types that separate streams of code units into encoded Unicode
|
||||
/// scalar values.
|
||||
public protocol UnicodeParser {
|
||||
public protocol _UnicodeParser {
|
||||
/// The encoding with which this parser is associated
|
||||
associatedtype Encoding : _UnicodeEncoding
|
||||
associatedtype Encoding : _UnicodeEncoding_
|
||||
|
||||
/// Constructs an instance that can be used to begin parsing `CodeUnit`s at
|
||||
/// any Unicode scalar boundary.
|
||||
@@ -44,7 +44,7 @@ public protocol UnicodeParser {
|
||||
where I.Element == Encoding.CodeUnit
|
||||
}
|
||||
|
||||
extension UnicodeParser {
|
||||
extension _UnicodeParser {
|
||||
@_versioned
|
||||
@inline(__always)
|
||||
@discardableResult
|
||||
@@ -86,12 +86,16 @@ extension UnicodeParser {
|
||||
}
|
||||
}
|
||||
|
||||
extension Unicode {
|
||||
public typealias Parser = _UnicodeParser
|
||||
}
|
||||
|
||||
extension Unicode {
|
||||
@_fixed_layout
|
||||
public // @testable
|
||||
struct _ParsingIterator<
|
||||
CodeUnitIterator : IteratorProtocol,
|
||||
Parser: UnicodeParser
|
||||
Parser: Unicode.Parser
|
||||
> where Parser.Encoding.CodeUnit == CodeUnitIterator.Element {
|
||||
@inline(__always)
|
||||
@_inlineable
|
||||
|
||||
Reference in New Issue
Block a user