Documentation ¶
Overview ¶
Package lex implements a simple lexical scanner for SQL statements.
This package was adapted from github.com/jjeffery/sqlr/private/scanner.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Scanner ¶
type Scanner struct { IgnoreWhiteSpace bool // contains filtered or unexported fields }
Scanner is a simple lexical scanner for SQL statements.
type Token ¶
type Token int
Token is a lexical token for SQL.
const ( TokenIllegal Token = iota // unexpected character TokenEOF // End of input TokenWhiteSpace // White space TokenComment // SQL comment TokenIdent // identifer, which may be quoted TokenKeyword // keyword TokenLiteral // string or numeric literal TokenOperator // operator TokenPlaceholder // prepared statement placeholder )
Tokens
Click to show internal directories.
Click to hide internal directories.