-
The source
ByteBuffer
to parseDeclaration
Swift
var source: ByteBuffer
-
Initalize with source
Declaration
Swift
init(source: ByteBuffer)
Parameters
source
The 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
value
side of thekey=value
pairDeclaration
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
.readerIndex
Declaration
Swift
private func peek() -> UInt8?
Return Value
UInt8?
-
Read the next character
Warning
Moves theByteBuffer
.readIndex
Declaration
Swift
private mutating func pop()
Return Value
UInt8?
-
Count the distance to the next occurrence of
byte
Declaration
Swift
private func countDistance(to byte: UInt8) -> Int?
Return Value
Int?