parser

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT 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 {
	// contains filtered or unexported fields
}

Parser takes a Scanner and builds an abstract syntax tree.

func New

func New(ctx context.Context, scanner Scanner, filename string) *Parser

New returns new Parser.

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context) (document *ast.Document, err error)

Parse parses the .env file and returns an ast.Statement.

type Scanner

type Scanner interface {
	NextToken(ctx context.Context) token.Token
}

Scanner converts a sequence of characters into a sequence of tokens.

Jump to

Keyboard shortcuts

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