parser

package
v0.0.0-...-15aa6b1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

Types

type Document

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

func Parse

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

func (Document) String

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

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

type Options

type Options struct {
	AssignGlobals bool
	Location      string
}

type TextNode

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

type ToolNode

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
JackTT - Gopher 🇻🇳