-
The source
ByteBufferto parseDeclaration
Swift
var source: ByteBuffer -
Initalize with source
Declaration
Swift
init(source: ByteBuffer)Parameters
sourceThe source to parse
-
Parse the source
Declaration
Swift
mutating func parse() -> [Line]Return Value
[Line] -
Determines how to parse the next line
Declaration
Swift
private mutating func parseNext() -> Line?Return Value
Line? -
Skip a comment line
Declaration
Swift
private mutating func skipComment() -
Parse the line
Declaration
Swift
private mutating func parseLine() -> Line?Return Value
Line? -
Parse the
valueside of thekey=valuepairDeclaration
Swift
private mutating func parseLineValue() -> String?Return Value
String? -
Skip spaces until another character is found
Declaration
Swift
private mutating func skipSpaces() -
Take a look at the next character to read without moving the
ByteBuffer.readerIndexDeclaration
Swift
private func peek() -> UInt8?Return Value
UInt8? -
Read the next character
Warning
Moves theByteBuffer.readIndexDeclaration
Swift
private mutating func pop()Return Value
UInt8? -
Count the distance to the next occurrence of
byteDeclaration
Swift
private func countDistance(to byte: UInt8) -> Int?Return Value
Int?
View on GitHub
ByteBufferParser Structure Reference