目录
目录README.md

MiniLexer

Build Status

A teeny-tiny-weeny lexer written in Swift available as a Swift Package.
Should be present in any programmer-who-likes-to-write-quick-script’s toolbelt.

Sample usage:

let text = "123 test"
let lexer = Lexer(input: text)

do {
    let oneTwoThree = try lexer.parseInt()
    lexer.skipWhitespace()
    let test = try lexer.nextIdent()
    
    print("\(oneTwoThree) \(test)")
} catch {
    print("Oopsie! Error: \(error)")
}

There’s also a sample URL-parsing example under Sources/URLParseSample, with tests over at Tests/URLParseSampleTests.

关于
273.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号