Documentation ¶
Overview ¶
Package ast declares the types used to represent syntax trees for pg.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alternative ¶
type Alternative []Expression
Alternative represents a list of alternative expressions.
func (Alternative) Pos ¶
func (a Alternative) Pos() token.Pos
Pos returns the position of the first character of the expression.
type Expression ¶
type Expression interface { Node // contains filtered or unexported methods }
Expression represents a production expression.
type Name ¶
type Name struct { Name string // name of the production StartPos token.Pos // position of the first character }
Name represents a production name.
type Node ¶
type Node interface { // Pos returns the position of the first character of the expression. Pos() token.Pos // contains filtered or unexported methods }
Node is an element in the abstract syntax tree.
type Production ¶
type Production struct { Name *Name // name of the production (lhs) Expr Expression // expression of the production (rhs) }
Production represents a single EBNF production.
func (*Production) Pos ¶
func (p *Production) Pos() token.Pos
Pos returns the position of the first character of the expression.
Click to show internal directories.
Click to hide internal directories.