parser

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 18 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

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

FromPath creates a new parser for the given file.

func New

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

New creates a new parser

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context) (<-chan ast.Directive, <-chan error)

Parse parses the entire stream asynchronously.

type RecursiveParser

type RecursiveParser struct {
	File    string
	Context journal.Context
	// contains filtered or unexported fields
}

RecursiveParser parses a file hierarchy recursively.

func (*RecursiveParser) Parse

func (rp *RecursiveParser) Parse(ctx context.Context) (<-chan ast.Directive, <-chan error)

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