php-parser
php-parser copied to clipboard
PHP parser written in Go
https://www.php.net/releases/8.0/en.php https://stitcher.io/blog/new-in-php-8
Hello I find a bug when using lexer.Lex(). Here is the poc ```package scanner import ( "github.com/z7zmey/php-parser/pkg/conf" "github.com/z7zmey/php-parser/pkg/version" "testing" "gotest.tools/assert" ) func TestCrash(t *testing.T) { src := "=
At the moment, the parser does not provide the ability to get AST for PHPDoc, which, however, can be quite convenient. I think it would be a useful feature.
Add `WithoutFreeFloating` to the printer visitor, so that the printer can print the code without FreeFloating tokens.
can we get the AST of parent class? ```class Dummy extends BaseElement {/**/}``` here we are able to get AST of _Dummy_ but not the AST of parent class _BaseElement_....
Does the AST data structure generated by this project share similarity with its counterpart on the PHP language ( [nikic/PHP-Parser](https://github.com/nikic/PHP-Parser) ) ? I'm trying to parse as a significant amount...
Hi, Hope you are all well ! I wanted to use **php-parser** to check if my prestashop code is missing some escaping function for any sql statement. For eg, in...
``` [*binary.Mul] "Left": [*binary.Plus] "Left": [*expr.Variable] "VarName": [*node.Identifier] "Value": a; "Right": [*expr.Variable] "VarName": [*node.Identifier] "Value": b; "Right": [*expr.Variable] "VarName": [*node.Identifier] "Value": c; ``` Currently, above AST is printed incorrectly: `$a...
requirements: * linear structure * batch allocations * memory reuse * fast creating * fast traversing * no type assertions * no links(use index)