parser

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ast

type Ast struct {
	Nodes []Node
}

type Node

type Node struct {
	Token lexer.Token
	Left  *Node `json:",omitempty"`
	Right *Node `json:",omitempty"`
}

type NodeError

type NodeError struct {
	Parent *NodeError
	Node
	Message string
}

func (NodeError) Error

func (ne NodeError) Error() string

type NodeKind

type NodeKind string

type Parser

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

func NewParser

func NewParser(tokenMap map[string]lexer.TokenKind) *Parser

func (*Parser) Parse

func (p *Parser) Parse(s string) (Ast, error)

Jump to

Keyboard shortcuts

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