parsing

package
v0.0.0-...-e49a3f0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrReadFmt = "Could not read file at %s: %w"
	ErrASTFmt  = "Error parsing file into AST: %w"
	ErrWalkFmt = "Error arose during walk of root %s: %w"
)

Variables

View Source
var ErrNoContent = errors.New(
	"No AST could be parsed, there were unrecoverable syntax errors or the file was empty",
)

Functions

This section is empty.

Types

type Parser

type Parser interface {
	Parse(content []byte) (*ast.Root, error)

	Lexer(content []byte) (lexer.Lexer, error)

	Read(path string) (string, error)

	Walk(root string, walker func(path string, d fs.DirEntry, err error) error) error
}

Parser is responsible for and a central place for file system access and parsing file content into IR for use everywhere else.

func New

func New(phpv *phpversion.PHPVersion) Parser

Jump to

Keyboard shortcuts

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