The parser does not treat include, include_once, require and require_once as keywords, and thus gets confused when these are used as the name of a function called on a pipe expression.
For instance, the following code:
new Foo() |> $$->include();
new Foo() |> $$->include_once();
new Foo() |> $$->require();
new Foo() |> $$->require_once();
Describe the bug
The parser does not treat include, include_once, require and require_once as keywords, and thus gets confused when these are used as the name of a function called on a pipe expression.
For instance, the following code:
Is incorrectly parsed as follows:
Requirements
To Reproduce
Add new test with content
new Foo() |> $$->include();
, then runtree-sitter test
Expected behavior
No errors are reported in the syntax tree.