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
Click to show internal directories.
Click to hide internal directories.