Help us shape the future of Go! Take the 2026 Go Developer Survey

parse

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrParse = errors.New("ParseError")

Functions

func Dump

func Dump(w io.Writer, n ast.Node, indentString string, mode DumpMode)

Dump displays AST as text.

Types

type DumpMode

type DumpMode int
const (
	DumpModeUnknown DumpMode = iota
	DumpModeText
	DumpModeVerbose
)

type Node

type Node = ast.StmtNode

type Parser

type Parser interface {
	Parse(s string) (*Result, error)
}

type Result

type Result struct {
	Nodes []Node
	Warns []error
}

type SQLParser

type SQLParser struct {
	// contains filtered or unexported fields
}

func NewSQLParser

func NewSQLParser() *SQLParser

func (*SQLParser) Parse

func (p *SQLParser) Parse(s string) (*Result, error)

type TreeDumper

type TreeDumper struct {
	// contains filtered or unexported fields
}

func NewTreeDumper

func NewTreeDumper(w io.Writer, indentString string, mode DumpMode) *TreeDumper

func (*TreeDumper) Enter

func (d *TreeDumper) Enter(n ast.Node) (ast.Node, bool)

func (*TreeDumper) Leave

func (d *TreeDumper) Leave(n ast.Node) (ast.Node, bool)

Jump to

Keyboard shortcuts

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