Documentation
¶
Index ¶
- Constants
- func IsSelectSQL(lexer *Lexer) (bool, error)
- type Lexer
- func (lexer *Lexer) GetLineNum() int
- func (lexer *Lexer) GetNextToken() (lineNum int, tokenType int, token string, err error)
- func (lexer *Lexer) GetPos() int
- func (lexer *Lexer) LookAhead() (int, error)
- func (lexer *Lexer) MatchToken() (lineNum int, tokenType int, token string, err error)
- func (lexer *Lexer) NextTokenIs(tokenType int) (lineNum int, token string, err error)
- type SQL
- type Statement
- type Token
- type Word
- type Words
Constants ¶
View Source
const ( TOKEN_EOF = iota // end-of-file TOKEN_NOT // ! TOKEN_LEFT_PAREN // ( TOKEN_RIGHT_PAREN // ) TOKEN_LEFT_BRACKET // [ TOKEN_RIGHT_BRACKET // ] TOKEN_LEFT_BRACE // { TOKEN_RIGHT_BRACE // } TOKEN_LT // < TOKEN_GT // > TOKEN_COLON // : TOKEN_SEMICOLON // ; TOKEN_DOT // . TOKEN_COMMA // , TOKEN_EQUAL // = TOKEN_AT // @ TOKEN_AND // & TOKEN_VERTICAL_BAR // | TOKEN_QUOTE // " TOKEN_DUOQUOTE // "" TOKEN_SINGLE_QUOTE // ' TOKEN_DUO_SINGLE_QUOTE // ” TOKEN_BACKQUOTE // ` TOKEN_ESCAPE_CHARACTER // \ // comment TOKEN_MULTI_LINE_COMMENT_START // /* TOKEN_MULTI_LINE_COMMENT_END // */ TOKEN_COMMENT_SHARP // # TOKEN_SINGLE_LINE_COMMENT // -- // literal TOKEN_NUMBER // number literal // keywords TOKEN_SELECT // select TOKEN_UPDATE // update TOKEN_DELETE // delete TOKEN_CREATE // create TOKEN_INSERT // insert TOKEN_OTHER_TOKEN // SourceCharacter - Words )
token const
Variables ¶
This section is empty.
Functions ¶
func IsSelectSQL ¶
Types ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
lexer struct
func (*Lexer) GetLineNum ¶
func (*Lexer) GetNextToken ¶
func (*Lexer) MatchToken ¶
Click to show internal directories.
Click to hide internal directories.