ast

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicLit

type BasicLit struct {
	Pos   *position.Pos
	Kind  *token.Token
	Value []byte
}

func (*BasicLit) Walk

func (n *BasicLit) Walk(v Visitor)

type BinaryExpr

type BinaryExpr struct {
	Pos   *position.Pos
	Left  Node
	OpTkn *token.Token
	Right Node
}

func (*BinaryExpr) Walk

func (n *BinaryExpr) Walk(v Visitor)

type CommaSeparatedList

type CommaSeparatedList struct {
	Pos     *position.Pos
	Items   []Node
	SepTkns []*token.Token
}

func (*CommaSeparatedList) Walk

func (n *CommaSeparatedList) Walk(v Visitor)

type ComparisonExpr

type ComparisonExpr struct {
	Pos   *position.Pos
	Left  Node
	OpTkn *token.Token
	Right Node
}

func (*ComparisonExpr) Walk

func (n *ComparisonExpr) Walk(v Visitor)

type FromExpr

type FromExpr struct {
	Pos     *position.Pos
	FromTkn *token.Token
	From    Node
}

func (*FromExpr) Walk

func (n *FromExpr) Walk(v Visitor)

type Identifier

type Identifier struct {
	Pos           *position.Pos
	IdentifierTkn *token.Token
	Value         []byte
}

func (*Identifier) Walk

func (n *Identifier) Walk(v Visitor)

type LimitExpr

type LimitExpr struct {
	Pos      *position.Pos
	LimitTkn *token.Token
	Value    Node
}

func (*LimitExpr) Walk

func (n *LimitExpr) Walk(v Visitor)

type MethodCallExpr

type MethodCallExpr struct {
	Pos             *position.Pos
	Variable        Node
	OpTkn           *token.Token
	MethodName      *Identifier
	OpenBracketTkn  *token.Token
	Args            []Node
	SeparatorsTkns  []*token.Token
	CloseBracketTkn *token.Token
}

func (*MethodCallExpr) Walk

func (n *MethodCallExpr) Walk(v Visitor)

type Node

type Node interface {
	Walk(v Visitor)
}

type NotExpr

type NotExpr struct {
	Pos    *position.Pos
	NotTkn *token.Token
	Expr   Node
}

func (*NotExpr) Walk

func (n *NotExpr) Walk(v Visitor)

type OrderByExpr

type OrderByExpr struct {
	Pos        *position.Pos
	OrderByTkn *token.Token
	Field      Node
	Desc       bool
	Asc        bool
}

func (*OrderByExpr) Walk

func (n *OrderByExpr) Walk(v Visitor)

type Root

type Root struct {
	Pos   *position.Pos
	Stmts []Node
}

func (*Root) Walk

func (n *Root) Walk(v Visitor)

type SelectExpr

type SelectExpr struct {
	Pos         *position.Pos
	SelectTkn   *token.Token
	Select      *SelectSubjectExpr
	FromExpr    *FromExpr
	WhereExpr   *WhereExpr
	WithExpr    *WithExpr
	LimitExpr   *LimitExpr
	OrderByExpr *OrderByExpr
}

func (*SelectExpr) Walk

func (n *SelectExpr) Walk(v Visitor)

type SelectSubjectExpr

type SelectSubjectExpr struct {
	Pos   *position.Pos
	List  *CommaSeparatedList // <Identifier>
	Star  *token.Token        // if SELECT *
	Count *token.Token        // if SELECT COUNT(*)
}

func (*SelectSubjectExpr) Walk

func (n *SelectSubjectExpr) Walk(v Visitor)

type Variable

type Variable struct {
	Pos     *position.Pos
	NameTkn *token.Token
	Name    []byte
}

func (*Variable) Walk

func (n *Variable) Walk(v Visitor)

type Visitor

type Visitor interface {
	EnterNode(n Node) bool
	LeaveNode(n Node)
}

type WhereExpr

type WhereExpr struct {
	Pos      *position.Pos
	WhereTkn *token.Token
	Expr     Node
}

func (*WhereExpr) Walk

func (n *WhereExpr) Walk(v Visitor)

type WithExpr

type WithExpr struct {
	Pos      *position.Pos
	WithTkn  *token.Token
	WithList *CommaSeparatedList // <Expr>
}

func (*WithExpr) Walk

func (n *WithExpr) Walk(v Visitor)

Jump to

Keyboard shortcuts

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