microsoft/tolerant-php-parser
Tolerant PHP parser from Microsoft that builds an AST even from incomplete or syntactically invalid code. Ideal for IDEs, refactoring tools, and static analysis, with error recovery and precise source positions for tokens and nodes.
This documentation was auto-generated using this parser to help dogfood the API. Please contribute fixes to
tools/PrintInvariants.phpand suggest API improvements.
We define and test both parser and lexer against a set of invariants (characteristics about the produced token set or tree that always hold true, no matter what the input). This set of invariants provides a consistent foundation that makes it easier to ensure the tree is "structurally sound", and confidently reason about the tree as we continue to build up our understanding.
How can I help you explore Laravel packages today?