parser

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: ISC Imports: 10 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)
	// contains filtered or unexported fields
}

Parser gathers state data for parsing.

func (*Parser) ParseFSFile added in v0.15.0

func (p *Parser) ParseFSFile(fsys fs.FS, filename string) ([]ast.Block, error)

ParseFSFile parses a frundis file from filesystem fsys and returns a list of AST blocks. Sets p.Source to filename if empty.

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