Documentation
¶
Index ¶
- Constants
- type ArgumentList
- type Builder
- func (b *Builder) AppendToSeparatedList(list ast.Node, tkn *token.Token, node ast.Node) *ast.CommaSeparatedList
- func (b *Builder) NewBasicLit(LiteralTkn *token.Token) *ast.BasicLit
- func (b *Builder) NewBinaryExpr(Left ast.Node, OpTkn *token.Token, Right ast.Node) *ast.BinaryExpr
- func (b *Builder) NewComparisonExpr(Variable ast.Node, OpTkn *token.Token, Expr ast.Node) *ast.ComparisonExpr
- func (b *Builder) NewEmptySeparatedList() *ast.CommaSeparatedList
- func (b *Builder) NewFromExpr(FromTkn *token.Token, From ast.Node) *ast.FromExpr
- func (b *Builder) NewIdentifier(IdentifierTkn *token.Token) *ast.Identifier
- func (b *Builder) NewLimitExpr(LimitTkn *token.Token, Value ast.Node) *ast.LimitExpr
- func (b *Builder) NewMethodCallExpr(Variable ast.Node, OpTkn *token.Token, MethodName *token.Token, ...) *ast.MethodCallExpr
- func (b *Builder) NewNonEmptySeparatedList(nodes []ast.Node, tkns []*token.Token) *ast.CommaSeparatedList
- func (b *Builder) NewNotExpr(NotTkn *token.Token, Expr ast.Node) *ast.NotExpr
- func (b *Builder) NewOrderByExpr(OrderByTkn *token.Token, Value ast.Node, DescOrAscTkn *token.Token) *ast.OrderByExpr
- func (b *Builder) NewRoot(Stmts []ast.Node) *ast.Root
- func (b *Builder) NewSelectExpr(SelectTkn *token.Token, Select ast.Node, FromExpr ast.Node, WhereExpr ast.Node, ...) *ast.SelectExpr
- func (b *Builder) NewSelectSubjectExpr(List ast.Node, Count *token.Token, Star *token.Token) *ast.SelectSubjectExpr
- func (b *Builder) NewSeparatedList(node ast.Node) *ast.CommaSeparatedList
- func (b *Builder) NewSeparatedListWithTwoElements(node1 ast.Node, tkn *token.Token, node2 ast.Node) *ast.CommaSeparatedList
- func (b *Builder) NewVariable(VariableTkn *token.Token) *ast.Variable
- func (b *Builder) NewWhereExpr(WhereTkn *token.Token, Expr ast.Node) *ast.WhereExpr
- func (b *Builder) NewWithExpr(WithTkn *token.Token, WithList ast.Node) *ast.WithExpr
- func (b *Builder) SeparatedListItems(list ast.Node) (items []ast.Node, sepTkns []*token.Token)
- type EnumCaseExpr
- type Lexer
- type NewLines
- type Parser
- type ParserBrackets
- type ParserSeparatedList
- type ReturnType
- type TraitAdaptationList
- type TraitMethodRef
Constants ¶
const T_AND = 57366
const T_ASC = 57355
const T_COMMENT = 57361
const T_CONSTANT_STRING = 57358
const T_COUNT = 57350
const T_DESC = 57354
const T_DNUMBER = 57357
const T_DOC_COMMENT = 57362
const T_EQUAL = 57368
const T_FROM = 57347
const T_GREATER = 57371
const T_GREATER_OR_EQUAL = 57373
const T_LIMIT = 57351
const T_LNUMBER = 57356
const T_NOT = 57367
const T_NOT_EQUAL = 57369
const T_OBJECT_OPERATOR = 57374
const T_OFFSET = 57352
const T_OR = 57364
const T_ORDER_BY = 57353
const T_SELECT = 57346
const T_SMALLER = 57370
const T_SMALLER_OR_EQUAL = 57372
const T_STRING = 57359
const T_VARIABLE = 57360
const T_WHERE = 57348
const T_WHITESPACE = 57363
const T_WITH = 57349
const T_XOR = 57365
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgumentList ¶
type ArgumentList struct { Pos *position.Pos OpenParenthesisTkn *token.Token Arguments []ast.Node SeparatorTkns []*token.Token EllipsisTkn *token.Token CloseParenthesisTkn *token.Token }
ArgumentList node
func (*ArgumentList) GetPos ¶
func (n *ArgumentList) GetPos() *position.Pos
func (*ArgumentList) Walk ¶
func (n *ArgumentList) Walk(v ast.Visitor)
type Builder ¶
Builder is responsible for creating nodes inside grammar rules. Creating nodes directly in grammar rules is inconvenient, since there is no autocompletion, and you cannot put breakpoints inside.
func NewBuilder ¶
NewBuilder creates a new Builder.
func (*Builder) AppendToSeparatedList ¶
func (b *Builder) AppendToSeparatedList(list ast.Node, tkn *token.Token, node ast.Node) *ast.CommaSeparatedList
AppendToSeparatedList inserts a new node and/or token into the list.
func (*Builder) NewBasicLit ¶
func (*Builder) NewBinaryExpr ¶
func (*Builder) NewComparisonExpr ¶
func (*Builder) NewEmptySeparatedList ¶
func (b *Builder) NewEmptySeparatedList() *ast.CommaSeparatedList
NewEmptySeparatedList creates a new empty list. Used for places where a delimited list is used.
func (*Builder) NewFromExpr ¶
func (*Builder) NewIdentifier ¶
func (b *Builder) NewIdentifier( IdentifierTkn *token.Token, ) *ast.Identifier
func (*Builder) NewLimitExpr ¶
func (*Builder) NewMethodCallExpr ¶
func (*Builder) NewNonEmptySeparatedList ¶
func (*Builder) NewNotExpr ¶
func (*Builder) NewOrderByExpr ¶
func (*Builder) NewSelectExpr ¶
func (*Builder) NewSelectSubjectExpr ¶
func (*Builder) NewSeparatedList ¶
func (b *Builder) NewSeparatedList(node ast.Node) *ast.CommaSeparatedList
NewSeparatedList creates a new single-element list. Used for places where a delimited list is used.
func (*Builder) NewSeparatedListWithTwoElements ¶
func (b *Builder) NewSeparatedListWithTwoElements(node1 ast.Node, tkn *token.Token, node2 ast.Node) *ast.CommaSeparatedList
NewSeparatedListWithTwoElements creates a new two-element list. Used for places where a delimited list is used.
func (*Builder) NewVariable ¶
func (*Builder) NewWhereExpr ¶
func (*Builder) NewWithExpr ¶
type EnumCaseExpr ¶
func (*EnumCaseExpr) GetPos ¶
func (n *EnumCaseExpr) GetPos() *position.Pos
func (*EnumCaseExpr) Walk ¶
func (n *EnumCaseExpr) Walk(v ast.Visitor)
type Parser ¶
type Parser struct { Lexer *Lexer // contains filtered or unexported fields }
Parser structure
type ParserBrackets ¶
type ParserBrackets struct { Pos *position.Pos OpenBracketTkn *token.Token Child ast.Node CloseBracketTkn *token.Token }
func (*ParserBrackets) GetPos ¶
func (n *ParserBrackets) GetPos() *position.Pos
func (*ParserBrackets) Walk ¶
func (n *ParserBrackets) Walk(v ast.Visitor)
type ParserSeparatedList ¶
func (*ParserSeparatedList) GetPos ¶
func (n *ParserSeparatedList) GetPos() *position.Pos
func (*ParserSeparatedList) Walk ¶
func (n *ParserSeparatedList) Walk(v ast.Visitor)
type ReturnType ¶
func (*ReturnType) GetPos ¶
func (n *ReturnType) GetPos() *position.Pos
func (*ReturnType) Walk ¶
func (n *ReturnType) Walk(v ast.Visitor)
type TraitAdaptationList ¶
type TraitAdaptationList struct { Pos *position.Pos OpenCurlyBracketTkn *token.Token Adaptations []ast.Node CloseCurlyBracketTkn *token.Token }
TraitAdaptationList node
func (*TraitAdaptationList) GetPos ¶
func (n *TraitAdaptationList) GetPos() *position.Pos
func (*TraitAdaptationList) Walk ¶
func (n *TraitAdaptationList) Walk(v ast.Visitor)
type TraitMethodRef ¶
type TraitMethodRef struct { Pos *position.Pos Trait ast.Node DoubleColonTkn *token.Token Method ast.Node }
TraitMethodRef node
func (*TraitMethodRef) GetPos ¶
func (n *TraitMethodRef) GetPos() *position.Pos
func (*TraitMethodRef) Walk ¶
func (n *TraitMethodRef) Walk(v ast.Visitor)