driver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintTree

func PrintTree(w io.Writer, node *Node)

Types

type Node

type Node struct {
	KindName string
	Text     string
	Children []*Node
}

type Parser

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

func NewParser

func NewParser(gram *spec.CompiledGrammar, src io.Reader, opts ...ParserOption) (*Parser, error)

func (*Parser) AST

func (p *Parser) AST() *Node

func (*Parser) CST

func (p *Parser) CST() *Node

func (*Parser) Parse

func (p *Parser) Parse() error

type ParserOption

type ParserOption func(p *Parser) error

func MakeAST

func MakeAST() ParserOption

func MakeCST

func MakeCST() ParserOption

Jump to

Keyboard shortcuts

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