parse

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadSubstitution = errors.New("bad substitution")

ErrBadSubstitution represents a substitution parsing error.

Functions

This section is empty.

Types

type FuncNode

type FuncNode struct {
	Param string
	Name  string
	Args  []Node
}

FuncNode represents a string function.

type ListNode

type ListNode struct {
	Nodes []Node
}

ListNode represents a list of nodes.

type Node

type Node interface {
	// contains filtered or unexported methods
}

Node is an element in the parse tree.

type TextNode

type TextNode struct {
	Value string
}

TextNode represents a string of text.

type Tree

type Tree struct {
	Root Node
	// contains filtered or unexported fields
}

Tree is the representation of a single parsed SQL statement.

func Parse

func Parse(buf string) (*Tree, error)

Parse parses the string and returns a Tree.

func (*Tree) Parse

func (t *Tree) Parse(buf string) (tree *Tree, err error)

Parse parses the string buffer to construct an ast representation for expansion.

Jump to

Keyboard shortcuts

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