Slide 24
Slide 24 text
lexNormal
private mutating func lexNormal(
sourceBufferStart: Lexer.Cursor,
preferRegexOverBinaryOperator: Bool
) -> Lexer.Result {
switch self.peek() {
case UInt8(ascii: "0"), UInt8(ascii: "1"), UInt8(ascii: "2"),
UInt8(ascii: "3"), UInt8(ascii: "4"), UInt8(ascii: "5"),
UInt8(ascii: "6"), UInt8(ascii: "7"), UInt8(ascii: "8"),
UInt8(ascii: "9"):
return self.lexNumber()
...
}
...
}
24 — Quick Overview of SwiftParser, Yusuke Kita (@kitasuke)