parser

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrLine

func NewErrLine(path string, lineNo int, err error) error

func ParseTools added in v0.6.0

func ParseTools(input io.Reader, opts ...Options) (result []types.Tool, _ error)

Types

type Document added in v0.6.0

type Document struct {
	Nodes []Node `json:"nodes,omitempty"`
}

func Parse

func Parse(input io.Reader, opts ...Options) (Document, error)

func (Document) String added in v0.6.0

func (d Document) String() string

type ErrLine

type ErrLine struct {
	Path string
	Line int
	Err  error
}

func (*ErrLine) Error

func (e *ErrLine) Error() string

func (*ErrLine) Unwrap

func (e *ErrLine) Unwrap() error

type Node added in v0.6.0

type Node struct {
	TextNode *TextNode `json:"textNode,omitempty"`
	ToolNode *ToolNode `json:"toolNode,omitempty"`
}

type Options added in v0.6.0

type Options struct {
	AssignGlobals bool
	Location      string
}

type TextNode added in v0.6.0

type TextNode struct {
	Text string `json:"text,omitempty"`
}

type ToolNode added in v0.6.0

type ToolNode struct {
	Tool types.Tool `json:"tool,omitempty"`
}

Jump to

Keyboard shortcuts

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