parser

package
v0.0.0-...-6c5b1ce Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Optimizations = true

Functions

func Hash

func Hash(fs filesystem.FS, path string) ([]byte, error)

Make a hash of all the sources.

func Parse

func Parse(fs filesystem.FS, path string) (*ast.Program, error)

func ParseExpr

func ParseExpr(code string) (ast.Expr, error)

func ParseStr

func ParseStr(code string) (*ast.Program, error)

Types

type Config

type Config struct {
	Paths    map[string][]string
	BasePath string
}

func ReadConfig

func ReadConfig(fs filesystem.FS, file string) (*Config, error)

type ParseError

type ParseError struct {
	Pos ast.Position
	// contains filtered or unexported fields
}

func NewError

func NewError(p ast.Position, format string, args ...interface{}) ParseError

func (ParseError) Error

func (e ParseError) Error() string

func (ParseError) ErrorMessage

func (e ParseError) ErrorMessage() string

func (ParseError) Position

func (e ParseError) Position() ast.Position

Jump to

Keyboard shortcuts

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