parser

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package parser provides types and functions for parsing graphene

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParseError

type ParseError []error

func (ParseError) Error

func (p ParseError) Error() string

type ParseResult

type ParseResult struct {
	Exprs ast.Exprs
	Err   ParseError
}

type Parser

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

Represents a graphene parser

func NewParser

func NewParser(tokens []token.Token, lines []string, fname string) Parser

constructs a new parser from a slice of tokens, a slice of lines, and a file name

func (*Parser) Parse

func (p *Parser) Parse(c chan ParseResult)

Parses the source stored in the parser and writes it to the passed channel

type UnexpectedTokenErr

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

func (UnexpectedTokenErr) Error

func (u UnexpectedTokenErr) Error() string

Jump to

Keyboard shortcuts

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