jonesmelton/sqlbrook/lexer does not have a README file
pub suberror LexError {
UnexpectedByte(Byte, offset~ : Int)
PostgresCast(offset~ : Int)
PostgresDollarQuote(offset~ : Int)
}test {
let spans = @lexer.lex("SELECT a FROM t")
inspect(
spans.map(sp => "\{sp.token}@\{sp.start}-\{sp.end}").join(" "),
content="select@0-6 a@7-8 from@10-14 t@15-16",
)
}test {
debug_inspect(
@lexer.tokenize("Order By x"),
content=(
#|[Keyword("order by"), Ident("x")]
),
)
}Install
Download zipWhole-statement SQLite formatter for the river style, as a library and a stdin CLI.