Documentation ¶
Index ¶
- Variables
- func Format(path string, data []byte) (formatted []byte, err error)
- func Parse(path string, data []byte) (root *ast.Root, err error)
- type Scanner
- func (s *Scanner) Peek() (token Token)
- func (s *Scanner) Pos() scanner.Position
- func (s *Scanner) Scan() (token Token, pos scanner.Position, text string)
- func (s *Scanner) ScanExact(token Token) (pos scanner.Position, text string, err error)
- func (s *Scanner) ScanIf(token Token) (pos scanner.Position, text string, ok bool)
- func (s *Scanner) ScanOneOf(tokens ...Token) (token Token, pos scanner.Position, text string, err error)
- func (s *Scanner) ScanTo(token Token)
- func (s *Scanner) ScanWhile(token Token)
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Error = errors.NewClass("syntax")
)
Functions ¶
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
type Token ¶
type Token string
const ( Ident Token = "Ident" Int Token = "Int" EOF Token = "EOF" Colon Token = ":" Dot Token = "." Comma Token = "," Equal Token = "=" LeftAngle Token = "<" RightAngle Token = ">" Question Token = "?" OpenParen Token = "(" CloseParen Token = ")" Exclamation Token = "!" String Token = "String" Float Token = "Float" Illegal Token = "Illegal" )
Source Files ¶
- common.go
- errors.go
- format.go
- node.go
- parse.go
- parse_create.go
- parse_delete.go
- parse_expr.go
- parse_field.go
- parse_field_ref.go
- parse_groupby.go
- parse_index.go
- parse_join.go
- parse_model.go
- parse_orderby.go
- parse_read.go
- parse_relation.go
- parse_suffix.go
- parse_update.go
- parse_view.go
- parse_where.go
- scanner.go
Click to show internal directories.
Click to hide internal directories.