Documentation ¶
Index ¶
- func MatchAnyKeyword(t tokenize.Token, codes ...KeywordCode) bool
- func MatchAnySpecial(t tokenize.Token, r ...rune) bool
- func MatchAnyTokenKind(t tokenize.Token, k ...tokenize.TokenKind) bool
- func MatchIdentifier(t tokenize.Token, ignoreCase bool, pattern ...string) bool
- type KeywordCode
- type ParseState
- func (s *ParseState) Begin() int
- func (s *ParseState) Child() *ParseState
- func (s *ParseState) End() int
- func (s *ParseState) Len() int
- func (s *ParseState) Move(offset int)
- func (s *ParseState) PeekAt(offset int) tokenize.Token
- func (s *ParseState) Skip()
- func (s *ParseState) WrapError(err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchAnyKeyword ¶
func MatchAnyKeyword(t tokenize.Token, codes ...KeywordCode) bool
Types ¶
type KeywordCode ¶
type KeywordCode int
const ( KeywordCodeUnspecified KeywordCode = iota KeywordCodeAll KeywordCodeAnd KeywordCodeAny KeywordCodeArray KeywordCodeAs KeywordCodeAsc KeywordCodeAssertRowsModified KeywordCodeAt KeywordCodeBetween KeywordCodeBy KeywordCodeCase KeywordCodeCast KeywordCodeCollate KeywordCodeContains KeywordCodeCreate KeywordCodeCross KeywordCodeCube KeywordCodeCurrent KeywordCodeDefault KeywordCodeDefine KeywordCodeDesc KeywordCodeDistinct KeywordCodeElse KeywordCodeEnd KeywordCodeEnum KeywordCodeEscape KeywordCodeExcept KeywordCodeExclude KeywordCodeExists KeywordCodeExtract KeywordCodeFalse KeywordCodeFetch KeywordCodeFollowing KeywordCodeFor KeywordCodeFrom KeywordCodeFull KeywordCodeGroup KeywordCodeGrouping KeywordCodeGroups KeywordCodeHash KeywordCodeHaving KeywordCodeIf KeywordCodeIgnore KeywordCodeIn KeywordCodeInner KeywordCodeIntersect KeywordCodeInterval KeywordCodeInto KeywordCodeIs KeywordCodeJoin KeywordCodeLateral KeywordCodeLeft KeywordCodeLike KeywordCodeLimit KeywordCodeLookup KeywordCodeMerge KeywordCodeNatural KeywordCodeNew KeywordCodeNo KeywordCodeNot KeywordCodeNull KeywordCodeNulls KeywordCodeOf KeywordCodeOn KeywordCodeOr KeywordCodeOrder KeywordCodeOuter KeywordCodeOver KeywordCodePartition KeywordCodePreceding KeywordCodeProto KeywordCodeRange KeywordCodeRecursive KeywordCodeRespect KeywordCodeRight KeywordCodeRollup KeywordCodeRows KeywordCodeSelect KeywordCodeSet KeywordCodeSome KeywordCodeStruct KeywordCodeTablesample KeywordCodeThen KeywordCodeTo KeywordCodeTreat KeywordCodeTrue KeywordCodeUnbound KeywordCodeUnion KeywordCodeUnnest KeywordCodeUsing KeywordCodeWhen KeywordCodeWhere KeywordCodeWindow KeywordCodeWith KeywordCodeWithin )
func OfKeyword ¶
func OfKeyword(keyword string) (KeywordCode, error)
func (KeywordCode) Keyword ¶
func (k KeywordCode) Keyword() string
func (KeywordCode) String ¶
func (i KeywordCode) String() string
type ParseState ¶
type ParseState struct {
// contains filtered or unexported fields
}
func NewParseState ¶
func NewParseState(input []tokenize.Token) *ParseState
func (*ParseState) Begin ¶
func (s *ParseState) Begin() int
func (*ParseState) Child ¶
func (s *ParseState) Child() *ParseState
func (*ParseState) End ¶
func (s *ParseState) End() int
func (*ParseState) Len ¶
func (s *ParseState) Len() int
func (*ParseState) Move ¶
func (s *ParseState) Move(offset int)
func (*ParseState) Skip ¶
func (s *ParseState) Skip()
func (*ParseState) WrapError ¶
func (s *ParseState) WrapError(err error) error
Click to show internal directories.
Click to hide internal directories.