parser

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(data []byte, importRoot string, enableEnv bool, funcMap map[string]interface{}) ([]byte, error)

func Pretty

func Pretty(pretty bool) func(*JSON) error

func Size

func Size(size int) func(*JSON) error

Types

type JSON

type JSON struct {
	Buffer string

	Pretty bool
	// contains filtered or unexported fields
}

func (*JSON) AST

func (t *JSON) AST() *node32

func (*JSON) Add

func (t *JSON) Add(rule pegRule, begin, end, index uint32)

func (*JSON) Init

func (p *JSON) Init(options ...func(*JSON) error) error

func (*JSON) Parse

func (p *JSON) Parse(rule ...int) error

func (*JSON) PrettyPrintSyntaxTree

func (t *JSON) PrettyPrintSyntaxTree(buffer string)

func (*JSON) Print

func (t *JSON) Print()

func (*JSON) PrintSyntaxTree

func (p *JSON) PrintSyntaxTree()

func (*JSON) Reset

func (p *JSON) Reset()

func (*JSON) SprintSyntaxTree

func (p *JSON) SprintSyntaxTree() string

func (*JSON) Tokens

func (t *JSON) Tokens() []token32

func (*JSON) Trim

func (t *JSON) Trim(length uint32)

func (*JSON) WriteSyntaxTree

func (p *JSON) WriteSyntaxTree(w io.Writer)

Jump to

Keyboard shortcuts

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