parser

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: ISC Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	Source string    // for error messages location information (e.g. filename)
	Werror io.Writer // where non-fatal scanning error messages go (default os.Stderr)
	// contains filtered or unexported fields
}

Parser gathers state data for parsing.

func (*Parser) ParseFile

func (p *Parser) ParseFile(filename string) ([]ast.Block, error)

ParseFile parses a frundis file and returns a list of AST blocks. Sets p.Source to filename if empty.

func (*Parser) ParseString

func (p *Parser) ParseString(str string) ([]ast.Block, error)

ParseString parses a frundis string and returns a list of AST blocks

func (*Parser) ParseWithReader

func (p *Parser) ParseWithReader(reader io.Reader) ([]ast.Block, error)

ParseWithReader parses a frundis source from a reader and returns a list of AST blocks.

Jump to

Keyboard shortcuts

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