Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePos ¶
Types ¶
type Kind ¶
type Kind int
const ( // A keyword (like SELECT) SQLKeyword Kind = iota // Numeric literal Number // A character that cloud not be tokenized Char // Single quoted string i.e: 'string' SingleQuotedString // National string i.e: N'string' NationalStringLiteral // Comma Comma // Whitespace Whitespace // comment node Comment // = operator Eq // != or <> operator Neq // < operator Lt // > operator Gt // <= operator LtEq // >= operator GtEq // + operator Plus // - operator Minus // * operator Mult // / operator Div // % operator Mod // Left parenthesis `(` LParen // Right parenthesis `)` RParen // Period Period // Colon Colon // DoubleColon DoubleColon // Semicolon Semicolon // Backslash Backslash // Left bracket `]` LBracket // Right bracket `[` RBracket // & Ampersand // Left brace `{` LBrace // Right brace `}` RBrace // ILLEGAL sqltoken ILLEGAL )
type SQLWord ¶
func MakeKeyword ¶
type Tokenizer ¶
type Tokenizer struct { Dialect dialect.Dialect Scanner *scanner.Scanner Line int Col int // contains filtered or unexported fields }
func NewTokenizerWithOptions ¶
func NewTokenizerWithOptions(src io.Reader, options ...TokenizerOption) *Tokenizer
type TokenizerOption ¶
type TokenizerOption func(*Tokenizer)
func Dialect ¶
func Dialect(dialect dialect.Dialect) TokenizerOption
func DisableParseComment ¶
func DisableParseComment() TokenizerOption
Click to show internal directories.
Click to hide internal directories.