parsing

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyFile is raised when file is not parsed successfully.
	ErrEmptyFile = errors.New("nothing to parse")
	// ErrLine is raised when there is an error on a line.
	ErrLine = errors.New("line contains an error")
)

Functions

This section is empty.

Types

type Parser

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

Parser parses input files with snippets.

func NewParser

func NewParser() Parser

NewParser creates a new parser.

func (*Parser) Parse

func (p *Parser) Parse(i io.Reader) (snippets.Container, error)

Parse parses file with snippets. The result is a map of of snippets with name as key and body as value.

Jump to

Keyboard shortcuts

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