parser

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: Apache-2.0 Imports: 16 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 {
	// contains filtered or unexported fields
}

Parser parses a journal

func FromPath added in v0.0.11

func FromPath(ctx ledger.Context, path string) (*Parser, func() error, error)

FromPath creates a new parser for the given file.

func New

func New(ctx ledger.Context, path string, r io.RuneReader) (*Parser, error)

New creates a new parser

func (*Parser) Next added in v0.0.8

func (p *Parser) Next() (ledger.Directive, error)

Next returns the next directive

func (*Parser) ParseAll added in v0.0.8

func (p *Parser) ParseAll() <-chan interface{}

ParseAll parses the entire stream asynchronously.

type RecursiveParser added in v0.0.13

type RecursiveParser struct {
	File    string
	Context ledger.Context
}

RecursiveParser parses a file hierarchy recursively.

func (*RecursiveParser) BuildLedger added in v0.0.13

func (j *RecursiveParser) BuildLedger(f ledger.Filter) (ledger.Ledger, error)

BuildLedger builds a ledger.

func (*RecursiveParser) Parse added in v0.0.13

func (j *RecursiveParser) Parse() chan interface{}

Parse parses the journal at the path, and branches out for include files

Jump to

Keyboard shortcuts

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