parse

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchAnyKeyword

func MatchAnyKeyword(t tokenize.Token, codes ...KeywordCode) bool

func MatchAnySpecial

func MatchAnySpecial(t tokenize.Token, r ...rune) bool

func MatchAnyTokenKind

func MatchAnyTokenKind(t tokenize.Token, k ...tokenize.TokenKind) bool

func MatchIdentifier

func MatchIdentifier(t tokenize.Token, ignoreCase bool, pattern ...string) 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) PeekAt

func (s *ParseState) PeekAt(offset int) tokenize.Token

func (*ParseState) Skip

func (s *ParseState) Skip()

func (*ParseState) WrapError

func (s *ParseState) WrapError(err error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL