delphi/parser-fileresolver

PHPParser Visitor to add File node as parent node

dev-main 2022-09-09 16:22 UTC

This package is auto-updated.

Last update: 2024-05-09 19:49:56 UTC


README

Adds a top-level node to represent the file that contains the code.

Sets an attribute on every node with the filepath for reference.

Usage

$fileResolver = new FileResolver();

$t = new \PhpParser\NodeTraverser();
$t->addVisitor($fileResolver);

$fileResolver->setFilepath($filepath);