Full Code of nikic/PHP-Parser for AI

master 50f0d9c9d0e3 cached
664 files
2.1 MB
571.7k tokens
2042 symbols
1 requests
Download .txt
Showing preview only (2,275K chars total). Download the full file or copy to clipboard to get everything.
Repository: nikic/PHP-Parser
Branch: master
Commit: 50f0d9c9d0e3
Files: 664
Total size: 2.1 MB

Directory structure:
gitextract_zfx_1jy8/

├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       └── main.yml
├── .gitignore
├── .php-cs-fixer.dist.php
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── UPGRADE-1.0.md
├── UPGRADE-2.0.md
├── UPGRADE-3.0.md
├── UPGRADE-4.0.md
├── UPGRADE-5.0.md
├── bin/
│   └── php-parse
├── composer.json
├── doc/
│   ├── 0_Introduction.markdown
│   ├── 2_Usage_of_basic_components.markdown
│   ├── README.md
│   └── component/
│       ├── AST_builders.markdown
│       ├── Constant_expression_evaluation.markdown
│       ├── Error_handling.markdown
│       ├── FAQ.markdown
│       ├── JSON_representation.markdown
│       ├── Lexer.markdown
│       ├── Name_resolution.markdown
│       ├── Performance.markdown
│       ├── Pretty_printing.markdown
│       └── Walking_the_AST.markdown
├── grammar/
│   ├── README.md
│   ├── parser.template
│   ├── php.y
│   ├── phpyLang.php
│   └── rebuildParsers.php
├── lib/
│   └── PhpParser/
│       ├── Builder/
│       │   ├── ClassConst.php
│       │   ├── Class_.php
│       │   ├── Declaration.php
│       │   ├── EnumCase.php
│       │   ├── Enum_.php
│       │   ├── FunctionLike.php
│       │   ├── Function_.php
│       │   ├── Interface_.php
│       │   ├── Method.php
│       │   ├── Namespace_.php
│       │   ├── Param.php
│       │   ├── Property.php
│       │   ├── TraitUse.php
│       │   ├── TraitUseAdaptation.php
│       │   ├── Trait_.php
│       │   └── Use_.php
│       ├── Builder.php
│       ├── BuilderFactory.php
│       ├── BuilderHelpers.php
│       ├── Comment/
│       │   └── Doc.php
│       ├── Comment.php
│       ├── ConstExprEvaluationException.php
│       ├── ConstExprEvaluator.php
│       ├── Error.php
│       ├── ErrorHandler/
│       │   ├── Collecting.php
│       │   └── Throwing.php
│       ├── ErrorHandler.php
│       ├── Internal/
│       │   ├── DiffElem.php
│       │   ├── Differ.php
│       │   ├── PrintableNewAnonClassNode.php
│       │   ├── TokenPolyfill.php
│       │   └── TokenStream.php
│       ├── JsonDecoder.php
│       ├── Lexer/
│       │   ├── Emulative.php
│       │   └── TokenEmulator/
│       │       ├── AsymmetricVisibilityTokenEmulator.php
│       │       ├── AttributeEmulator.php
│       │       ├── EnumTokenEmulator.php
│       │       ├── ExplicitOctalEmulator.php
│       │       ├── FnTokenEmulator.php
│       │       ├── KeywordEmulator.php
│       │       ├── MatchTokenEmulator.php
│       │       ├── NullsafeTokenEmulator.php
│       │       ├── PipeOperatorEmulator.php
│       │       ├── PropertyTokenEmulator.php
│       │       ├── ReadonlyFunctionTokenEmulator.php
│       │       ├── ReadonlyTokenEmulator.php
│       │       ├── ReverseEmulator.php
│       │       ├── TokenEmulator.php
│       │       └── VoidCastEmulator.php
│       ├── Lexer.php
│       ├── Modifiers.php
│       ├── NameContext.php
│       ├── Node/
│       │   ├── Arg.php
│       │   ├── ArrayItem.php
│       │   ├── Attribute.php
│       │   ├── AttributeGroup.php
│       │   ├── ClosureUse.php
│       │   ├── ComplexType.php
│       │   ├── Const_.php
│       │   ├── DeclareItem.php
│       │   ├── Expr/
│       │   │   ├── ArrayDimFetch.php
│       │   │   ├── ArrayItem.php
│       │   │   ├── Array_.php
│       │   │   ├── ArrowFunction.php
│       │   │   ├── Assign.php
│       │   │   ├── AssignOp/
│       │   │   │   ├── BitwiseAnd.php
│       │   │   │   ├── BitwiseOr.php
│       │   │   │   ├── BitwiseXor.php
│       │   │   │   ├── Coalesce.php
│       │   │   │   ├── Concat.php
│       │   │   │   ├── Div.php
│       │   │   │   ├── Minus.php
│       │   │   │   ├── Mod.php
│       │   │   │   ├── Mul.php
│       │   │   │   ├── Plus.php
│       │   │   │   ├── Pow.php
│       │   │   │   ├── ShiftLeft.php
│       │   │   │   └── ShiftRight.php
│       │   │   ├── AssignOp.php
│       │   │   ├── AssignRef.php
│       │   │   ├── BinaryOp/
│       │   │   │   ├── BitwiseAnd.php
│       │   │   │   ├── BitwiseOr.php
│       │   │   │   ├── BitwiseXor.php
│       │   │   │   ├── BooleanAnd.php
│       │   │   │   ├── BooleanOr.php
│       │   │   │   ├── Coalesce.php
│       │   │   │   ├── Concat.php
│       │   │   │   ├── Div.php
│       │   │   │   ├── Equal.php
│       │   │   │   ├── Greater.php
│       │   │   │   ├── GreaterOrEqual.php
│       │   │   │   ├── Identical.php
│       │   │   │   ├── LogicalAnd.php
│       │   │   │   ├── LogicalOr.php
│       │   │   │   ├── LogicalXor.php
│       │   │   │   ├── Minus.php
│       │   │   │   ├── Mod.php
│       │   │   │   ├── Mul.php
│       │   │   │   ├── NotEqual.php
│       │   │   │   ├── NotIdentical.php
│       │   │   │   ├── Pipe.php
│       │   │   │   ├── Plus.php
│       │   │   │   ├── Pow.php
│       │   │   │   ├── ShiftLeft.php
│       │   │   │   ├── ShiftRight.php
│       │   │   │   ├── Smaller.php
│       │   │   │   ├── SmallerOrEqual.php
│       │   │   │   └── Spaceship.php
│       │   │   ├── BinaryOp.php
│       │   │   ├── BitwiseNot.php
│       │   │   ├── BooleanNot.php
│       │   │   ├── CallLike.php
│       │   │   ├── Cast/
│       │   │   │   ├── Array_.php
│       │   │   │   ├── Bool_.php
│       │   │   │   ├── Double.php
│       │   │   │   ├── Int_.php
│       │   │   │   ├── Object_.php
│       │   │   │   ├── String_.php
│       │   │   │   ├── Unset_.php
│       │   │   │   └── Void_.php
│       │   │   ├── Cast.php
│       │   │   ├── ClassConstFetch.php
│       │   │   ├── Clone_.php
│       │   │   ├── Closure.php
│       │   │   ├── ClosureUse.php
│       │   │   ├── ConstFetch.php
│       │   │   ├── Empty_.php
│       │   │   ├── Error.php
│       │   │   ├── ErrorSuppress.php
│       │   │   ├── Eval_.php
│       │   │   ├── Exit_.php
│       │   │   ├── FuncCall.php
│       │   │   ├── Include_.php
│       │   │   ├── Instanceof_.php
│       │   │   ├── Isset_.php
│       │   │   ├── List_.php
│       │   │   ├── Match_.php
│       │   │   ├── MethodCall.php
│       │   │   ├── New_.php
│       │   │   ├── NullsafeMethodCall.php
│       │   │   ├── NullsafePropertyFetch.php
│       │   │   ├── PostDec.php
│       │   │   ├── PostInc.php
│       │   │   ├── PreDec.php
│       │   │   ├── PreInc.php
│       │   │   ├── Print_.php
│       │   │   ├── PropertyFetch.php
│       │   │   ├── ShellExec.php
│       │   │   ├── StaticCall.php
│       │   │   ├── StaticPropertyFetch.php
│       │   │   ├── Ternary.php
│       │   │   ├── Throw_.php
│       │   │   ├── UnaryMinus.php
│       │   │   ├── UnaryPlus.php
│       │   │   ├── Variable.php
│       │   │   ├── YieldFrom.php
│       │   │   └── Yield_.php
│       │   ├── Expr.php
│       │   ├── FunctionLike.php
│       │   ├── Identifier.php
│       │   ├── InterpolatedStringPart.php
│       │   ├── IntersectionType.php
│       │   ├── MatchArm.php
│       │   ├── Name/
│       │   │   ├── FullyQualified.php
│       │   │   └── Relative.php
│       │   ├── Name.php
│       │   ├── NullableType.php
│       │   ├── Param.php
│       │   ├── PropertyHook.php
│       │   ├── PropertyItem.php
│       │   ├── Scalar/
│       │   │   ├── DNumber.php
│       │   │   ├── Encapsed.php
│       │   │   ├── EncapsedStringPart.php
│       │   │   ├── Float_.php
│       │   │   ├── Int_.php
│       │   │   ├── InterpolatedString.php
│       │   │   ├── LNumber.php
│       │   │   ├── MagicConst/
│       │   │   │   ├── Class_.php
│       │   │   │   ├── Dir.php
│       │   │   │   ├── File.php
│       │   │   │   ├── Function_.php
│       │   │   │   ├── Line.php
│       │   │   │   ├── Method.php
│       │   │   │   ├── Namespace_.php
│       │   │   │   ├── Property.php
│       │   │   │   └── Trait_.php
│       │   │   ├── MagicConst.php
│       │   │   └── String_.php
│       │   ├── Scalar.php
│       │   ├── StaticVar.php
│       │   ├── Stmt/
│       │   │   ├── Block.php
│       │   │   ├── Break_.php
│       │   │   ├── Case_.php
│       │   │   ├── Catch_.php
│       │   │   ├── ClassConst.php
│       │   │   ├── ClassLike.php
│       │   │   ├── ClassMethod.php
│       │   │   ├── Class_.php
│       │   │   ├── Const_.php
│       │   │   ├── Continue_.php
│       │   │   ├── DeclareDeclare.php
│       │   │   ├── Declare_.php
│       │   │   ├── Do_.php
│       │   │   ├── Echo_.php
│       │   │   ├── ElseIf_.php
│       │   │   ├── Else_.php
│       │   │   ├── EnumCase.php
│       │   │   ├── Enum_.php
│       │   │   ├── Expression.php
│       │   │   ├── Finally_.php
│       │   │   ├── For_.php
│       │   │   ├── Foreach_.php
│       │   │   ├── Function_.php
│       │   │   ├── Global_.php
│       │   │   ├── Goto_.php
│       │   │   ├── GroupUse.php
│       │   │   ├── HaltCompiler.php
│       │   │   ├── If_.php
│       │   │   ├── InlineHTML.php
│       │   │   ├── Interface_.php
│       │   │   ├── Label.php
│       │   │   ├── Namespace_.php
│       │   │   ├── Nop.php
│       │   │   ├── Property.php
│       │   │   ├── PropertyProperty.php
│       │   │   ├── Return_.php
│       │   │   ├── StaticVar.php
│       │   │   ├── Static_.php
│       │   │   ├── Switch_.php
│       │   │   ├── TraitUse.php
│       │   │   ├── TraitUseAdaptation/
│       │   │   │   ├── Alias.php
│       │   │   │   └── Precedence.php
│       │   │   ├── TraitUseAdaptation.php
│       │   │   ├── Trait_.php
│       │   │   ├── TryCatch.php
│       │   │   ├── Unset_.php
│       │   │   ├── UseUse.php
│       │   │   ├── Use_.php
│       │   │   └── While_.php
│       │   ├── Stmt.php
│       │   ├── UnionType.php
│       │   ├── UseItem.php
│       │   ├── VarLikeIdentifier.php
│       │   └── VariadicPlaceholder.php
│       ├── Node.php
│       ├── NodeAbstract.php
│       ├── NodeDumper.php
│       ├── NodeFinder.php
│       ├── NodeTraverser.php
│       ├── NodeTraverserInterface.php
│       ├── NodeVisitor/
│       │   ├── CloningVisitor.php
│       │   ├── CommentAnnotatingVisitor.php
│       │   ├── FindingVisitor.php
│       │   ├── FirstFindingVisitor.php
│       │   ├── NameResolver.php
│       │   ├── NodeConnectingVisitor.php
│       │   └── ParentConnectingVisitor.php
│       ├── NodeVisitor.php
│       ├── NodeVisitorAbstract.php
│       ├── Parser/
│       │   ├── Php7.php
│       │   └── Php8.php
│       ├── Parser.php
│       ├── ParserAbstract.php
│       ├── ParserFactory.php
│       ├── PhpVersion.php
│       ├── PrettyPrinter/
│       │   └── Standard.php
│       ├── PrettyPrinter.php
│       ├── PrettyPrinterAbstract.php
│       ├── Token.php
│       └── compatibility_tokens.php
├── phpstan-baseline.neon
├── phpstan.neon.dist
├── phpunit.xml.dist
├── test/
│   ├── PhpParser/
│   │   ├── Builder/
│   │   │   ├── ClassConstTest.php
│   │   │   ├── ClassTest.php
│   │   │   ├── EnumCaseTest.php
│   │   │   ├── EnumTest.php
│   │   │   ├── FunctionTest.php
│   │   │   ├── InterfaceTest.php
│   │   │   ├── MethodTest.php
│   │   │   ├── NamespaceTest.php
│   │   │   ├── ParamTest.php
│   │   │   ├── PropertyTest.php
│   │   │   ├── TraitTest.php
│   │   │   ├── TraitUseAdaptationTest.php
│   │   │   ├── TraitUseTest.php
│   │   │   └── UseTest.php
│   │   ├── BuilderFactoryTest.php
│   │   ├── BuilderHelpersTest.php
│   │   ├── CodeParsingTest.php
│   │   ├── CodeTestAbstract.php
│   │   ├── CodeTestParser.php
│   │   ├── CommentTest.php
│   │   ├── CompatibilityTest.php
│   │   ├── ConstExprEvaluatorTest.php
│   │   ├── ErrorHandler/
│   │   │   ├── CollectingTest.php
│   │   │   └── ThrowingTest.php
│   │   ├── ErrorTest.php
│   │   ├── Internal/
│   │   │   └── DifferTest.php
│   │   ├── JsonDecoderTest.php
│   │   ├── Lexer/
│   │   │   └── EmulativeTest.php
│   │   ├── LexerTest.php
│   │   ├── ModifiersTest.php
│   │   ├── NameContextTest.php
│   │   ├── Node/
│   │   │   ├── Expr/
│   │   │   │   └── CallableLikeTest.php
│   │   │   ├── IdentifierTest.php
│   │   │   ├── NameTest.php
│   │   │   ├── ParamTest.php
│   │   │   ├── PropertyHookTest.php
│   │   │   ├── Scalar/
│   │   │   │   ├── DNumberTest.php
│   │   │   │   ├── MagicConstTest.php
│   │   │   │   ├── NumberTest.php
│   │   │   │   └── StringTest.php
│   │   │   └── Stmt/
│   │   │       ├── ClassConstTest.php
│   │   │       ├── ClassMethodTest.php
│   │   │       ├── ClassTest.php
│   │   │       ├── InterfaceTest.php
│   │   │       └── PropertyTest.php
│   │   ├── NodeAbstractTest.php
│   │   ├── NodeDumperTest.php
│   │   ├── NodeFinderTest.php
│   │   ├── NodeTraverserTest.php
│   │   ├── NodeVisitor/
│   │   │   ├── FindingVisitorTest.php
│   │   │   ├── FirstFindingVisitorTest.php
│   │   │   ├── NameResolverTest.php
│   │   │   ├── NodeConnectingVisitorTest.php
│   │   │   └── ParentConnectingVisitorTest.php
│   │   ├── NodeVisitorForTesting.php
│   │   ├── Parser/
│   │   │   ├── Php7Test.php
│   │   │   └── Php8Test.php
│   │   ├── ParserFactoryTest.php
│   │   ├── ParserTestAbstract.php
│   │   ├── PhpVersionTest.php
│   │   ├── PrettyPrinterTest.php
│   │   └── TokenTest.php
│   ├── bootstrap.php
│   ├── code/
│   │   ├── formatPreservation/
│   │   │   ├── addingPropertyType.test
│   │   │   ├── anonClasses.test
│   │   │   ├── arrayInsertionWithComments.test
│   │   │   ├── array_spread.test
│   │   │   ├── arrow_function.test
│   │   │   ├── attributes.test
│   │   │   ├── basic.test
│   │   │   ├── blockConversion.test
│   │   │   ├── classMethodNop.test
│   │   │   ├── closure.test
│   │   │   ├── comments.test
│   │   │   ├── constants.test
│   │   │   ├── delAfterIdentifier.test
│   │   │   ├── emptyListInsertion.test
│   │   │   ├── enum.test
│   │   │   ├── fixup.test
│   │   │   ├── group_use.test
│   │   │   ├── indent.test
│   │   │   ├── inlineHtml.test
│   │   │   ├── insertionOfNullable.test
│   │   │   ├── listInsertion.test
│   │   │   ├── listInsertionIndentation.test
│   │   │   ├── listRemoval.test
│   │   │   ├── match.test
│   │   │   ├── modifierChange.test
│   │   │   ├── namedArgs.test
│   │   │   ├── nopCommentAtEnd.test
│   │   │   ├── property_hooks.test
│   │   │   ├── removalViaNull.test
│   │   │   ├── removingPropertyType.test
│   │   │   ├── rewriteVariableInterpolationString.test
│   │   │   └── traitAlias.test
│   │   ├── parser/
│   │   │   ├── blockComments.test
│   │   │   ├── commentAtEndOfClass.test
│   │   │   ├── comments.test
│   │   │   ├── emptyFile.test
│   │   │   ├── errorHandling/
│   │   │   │   ├── eofError.test
│   │   │   │   ├── lexerErrors.test
│   │   │   │   └── recovery.test
│   │   │   ├── expr/
│   │   │   │   ├── alternative_array_syntax.test
│   │   │   │   ├── arrayDef.test
│   │   │   │   ├── arrayDestructuring.test
│   │   │   │   ├── arrayEmptyElemens.test
│   │   │   │   ├── arraySpread.test
│   │   │   │   ├── arrow_function.test
│   │   │   │   ├── assign.test
│   │   │   │   ├── assignNewByRef.test
│   │   │   │   ├── cast.test
│   │   │   │   ├── clone.test
│   │   │   │   ├── closure.test
│   │   │   │   ├── closure_use_trailing_comma.test
│   │   │   │   ├── comparison.test
│   │   │   │   ├── concatPrecedence.test
│   │   │   │   ├── constant_expr.test
│   │   │   │   ├── dynamicClassConst.test
│   │   │   │   ├── errorSuppress.test
│   │   │   │   ├── exit.test
│   │   │   │   ├── exprInIsset.test
│   │   │   │   ├── exprInList.test
│   │   │   │   ├── fetchAndCall/
│   │   │   │   │   ├── args.test
│   │   │   │   │   ├── constFetch.test
│   │   │   │   │   ├── constantDeref.test
│   │   │   │   │   ├── funcCall.test
│   │   │   │   │   ├── namedArgs.test
│   │   │   │   │   ├── newDeref.test
│   │   │   │   │   ├── objectAccess.test
│   │   │   │   │   ├── simpleArrayAccess.test
│   │   │   │   │   ├── staticCall.test
│   │   │   │   │   └── staticPropertyFetch.test
│   │   │   │   ├── firstClassCallables.test
│   │   │   │   ├── includeAndEval.test
│   │   │   │   ├── issetAndEmpty.test
│   │   │   │   ├── keywordsInNamespacedName.test
│   │   │   │   ├── listReferences.test
│   │   │   │   ├── listWithKeys.test
│   │   │   │   ├── logic.test
│   │   │   │   ├── match.test
│   │   │   │   ├── math.test
│   │   │   │   ├── new.test
│   │   │   │   ├── newDeref.test
│   │   │   │   ├── newWithoutClass.test
│   │   │   │   ├── nullsafe.test
│   │   │   │   ├── pipe.test
│   │   │   │   ├── print.test
│   │   │   │   ├── shellExec.test
│   │   │   │   ├── ternaryAndCoalesce.test
│   │   │   │   ├── throw.test
│   │   │   │   ├── trailingCommas.test
│   │   │   │   ├── uvs/
│   │   │   │   │   ├── constDeref.test
│   │   │   │   │   ├── globalNonSimpleVarError.test
│   │   │   │   │   ├── indirectCall.test
│   │   │   │   │   ├── isset.test
│   │   │   │   │   ├── misc.test
│   │   │   │   │   ├── new.test
│   │   │   │   │   ├── newInstanceofExpr.test
│   │   │   │   │   └── staticProperty.test
│   │   │   │   ├── varVarPos.test
│   │   │   │   └── variable.test
│   │   │   ├── formattingAttributes.test
│   │   │   ├── nopPositions.test
│   │   │   ├── scalar/
│   │   │   │   ├── constantString.test
│   │   │   │   ├── docString.test
│   │   │   │   ├── docStringNewlines.test
│   │   │   │   ├── encapsedNegVarOffset.test
│   │   │   │   ├── encapsedString.test
│   │   │   │   ├── explicitOctal.test
│   │   │   │   ├── flexibleDocString.test
│   │   │   │   ├── flexibleDocStringErrors.test
│   │   │   │   ├── float.test
│   │   │   │   ├── int.test
│   │   │   │   ├── invalidOctal.test
│   │   │   │   ├── magicConst.test
│   │   │   │   ├── numberSeparators.test
│   │   │   │   └── unicodeEscape.test
│   │   │   ├── semiReserved.test
│   │   │   └── stmt/
│   │   │       ├── attributes.test
│   │   │       ├── blocklessStatement.test
│   │   │       ├── class/
│   │   │       │   ├── abstract.test
│   │   │       │   ├── anonymous.test
│   │   │       │   ├── asymmetric_visibility.test
│   │   │       │   ├── class_position.test
│   │   │       │   ├── conditional.test
│   │   │       │   ├── constModifierErrors.test
│   │   │       │   ├── constModifiers.test
│   │   │       │   ├── enum.test
│   │   │       │   ├── enum_with_string.test
│   │   │       │   ├── final.test
│   │   │       │   ├── implicitPublic.test
│   │   │       │   ├── interface.test
│   │   │       │   ├── modifier_error.test
│   │   │       │   ├── name.test
│   │   │       │   ├── php4Style.test
│   │   │       │   ├── propertyTypes.test
│   │   │       │   ├── property_hooks.test
│   │   │       │   ├── property_modifiers.test
│   │   │       │   ├── property_promotion.test
│   │   │       │   ├── readonly.test
│   │   │       │   ├── readonlyAnonyous.test
│   │   │       │   ├── readonlyAsClassName.test
│   │   │       │   ├── readonlyMethod.test
│   │   │       │   ├── shortEchoAsIdentifier.test
│   │   │       │   ├── simple.test
│   │   │       │   ├── staticMethod.test
│   │   │       │   ├── staticType.test
│   │   │       │   ├── trait.test
│   │   │       │   └── typedConstants.test
│   │   │       ├── const.test
│   │   │       ├── controlFlow.test
│   │   │       ├── declare.test
│   │   │       ├── echo.test
│   │   │       ├── function/
│   │   │       │   ├── builtinTypeDeclarations.test
│   │   │       │   ├── byRef.test
│   │   │       │   ├── clone_function.test
│   │   │       │   ├── conditional.test
│   │   │       │   ├── defaultValues.test
│   │   │       │   ├── disjointNormalFormTypes.test
│   │   │       │   ├── exit_die_function.test
│   │   │       │   ├── fn.test
│   │   │       │   ├── intersectionTypes.test
│   │   │       │   ├── invalidVoidParam.test
│   │   │       │   ├── neverType.test
│   │   │       │   ├── nullFalseTrueTypes.test
│   │   │       │   ├── nullableTypes.test
│   │   │       │   ├── parameters_trailing_comma.test
│   │   │       │   ├── readonlyFunction.test
│   │   │       │   ├── returnTypes.test
│   │   │       │   ├── specialVars.test
│   │   │       │   ├── typeDeclarations.test
│   │   │       │   ├── typeVersions.test
│   │   │       │   ├── unionTypes.test
│   │   │       │   ├── validVoidParam.test
│   │   │       │   ├── variadic.test
│   │   │       │   └── variadicDefaultValue.test
│   │   │       ├── generator/
│   │   │       │   ├── basic.test
│   │   │       │   ├── yieldPrecedence.test
│   │   │       │   └── yieldUnaryPrecedence.test
│   │   │       ├── haltCompiler.test
│   │   │       ├── haltCompilerInvalidSyntax.test
│   │   │       ├── haltCompilerOffset.test
│   │   │       ├── haltCompilerOutermostScope.test
│   │   │       ├── hashbang.test
│   │   │       ├── if.test
│   │   │       ├── inlineHTML.test
│   │   │       ├── loop/
│   │   │       │   ├── do.test
│   │   │       │   ├── for.test
│   │   │       │   ├── foreach.test
│   │   │       │   └── while.test
│   │   │       ├── multiCatch.test
│   │   │       ├── namespace/
│   │   │       │   ├── alias.test
│   │   │       │   ├── braced.test
│   │   │       │   ├── commentAfterNamespace.test
│   │   │       │   ├── groupUse.test
│   │   │       │   ├── groupUseErrors.test
│   │   │       │   ├── groupUsePositions.test
│   │   │       │   ├── groupUseTrailingComma.test
│   │   │       │   ├── invalidName.test
│   │   │       │   ├── mix.test
│   │   │       │   ├── name.test
│   │   │       │   ├── nested.test
│   │   │       │   ├── notBraced.test
│   │   │       │   ├── nsAfterHashbang.test
│   │   │       │   ├── outsideStmt.test
│   │   │       │   └── outsideStmtInvalid.test
│   │   │       ├── newInInitializer.test
│   │   │       ├── switch.test
│   │   │       ├── tryCatch.test
│   │   │       ├── tryCatch_without_variable.test
│   │   │       ├── tryWithoutCatch.test
│   │   │       ├── unset.test
│   │   │       └── voidCast.test
│   │   └── prettyPrinter/
│   │       ├── comments.test
│   │       ├── commentsInCommaList.test
│   │       ├── expr/
│   │       │   ├── anonymousClass.test
│   │       │   ├── arrayDestructuring.test
│   │       │   ├── arraySpread.test
│   │       │   ├── arrow_function.test
│   │       │   ├── call.test
│   │       │   ├── cast.test
│   │       │   ├── closure.test
│   │       │   ├── constant_deref.test
│   │       │   ├── docStrings.test
│   │       │   ├── dynamicClassConstFetch.test
│   │       │   ├── firstClassCallables.test
│   │       │   ├── include.test
│   │       │   ├── intrinsics.test
│   │       │   ├── list.test
│   │       │   ├── literals.test
│   │       │   ├── match.test
│   │       │   ├── namedArgs.test
│   │       │   ├── newDerefParentheses.test
│   │       │   ├── newVariable.test
│   │       │   ├── nullsafe.test
│   │       │   ├── numbers.test
│   │       │   ├── operators.test
│   │       │   ├── parentheses.test
│   │       │   ├── pipe.test
│   │       │   ├── shortArraySyntax.test
│   │       │   ├── stringEscaping.test
│   │       │   ├── throw.test
│   │       │   ├── uvs.test
│   │       │   ├── variables.test
│   │       │   └── yield.test
│   │       ├── indent.test
│   │       ├── inlineHTMLandPHPtest.file-test
│   │       ├── nestedInlineHTML.test
│   │       ├── onlyInlineHTML.file-test
│   │       ├── onlyPHP.file-test
│   │       └── stmt/
│   │           ├── alias.test
│   │           ├── asymmetric_visibility.test
│   │           ├── attributes.test
│   │           ├── block.test
│   │           ├── break_continue.test
│   │           ├── class.test
│   │           ├── class_const.test
│   │           ├── const.test
│   │           ├── declare.test
│   │           ├── disjointNormalFormTypes.test
│   │           ├── do_while.test
│   │           ├── enum.test
│   │           ├── for.test
│   │           ├── foreach.test
│   │           ├── function_signatures.test
│   │           ├── global_static_variables.test
│   │           ├── goto.test
│   │           ├── groupUse.test
│   │           ├── haltCompiler.file-test
│   │           ├── if.test
│   │           ├── intersection_types.test
│   │           ├── multiCatch.test
│   │           ├── namespaces.test
│   │           ├── nullable_types.test
│   │           ├── param_comments.test
│   │           ├── properties.test
│   │           ├── property_hooks.test
│   │           ├── property_promotion.test
│   │           ├── readonly_class.test
│   │           ├── staticType.test
│   │           ├── switch.test
│   │           ├── throw.test
│   │           ├── traitUse.test
│   │           ├── tryCatch.test
│   │           ├── tryCatch_without_variable.test
│   │           ├── union_types.test
│   │           ├── voidCast.test
│   │           └── while.test
│   ├── fixtures/
│   │   └── Suit.php
│   └── updateTests.php
├── test_old/
│   ├── run-php-src.sh
│   └── run.php
└── tools/
    ├── composer.json
    └── fuzzing/
        ├── generateCorpus.php
        ├── php.dict
        └── target.php

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
root = true

[*.y]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4


================================================
FILE: .gitattributes
================================================
/.github         export-ignore
/doc             export-ignore
/grammar         export-ignore
/test            export-ignore
/test_old        export-ignore
/tools           export-ignore
.editorconfig    export-ignore
.gitattributes   export-ignore
.gitignore       export-ignore
.php-cs-fixer.dist.php  export-ignore
Makefile         export-ignore
CHANGELOG.md     export-ignore
CONTRIBUTING.md  export-ignore
phpstan-baseline.neon   export-ignore
phpstan.neon.dist   export-ignore
phpunit.xml.dist export-ignore
UPGRADE-*.md     export-ignore


================================================
FILE: .github/workflows/main.yml
================================================
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: Main
on:
  push:
  pull_request:

jobs:
  tests_coverage:
    runs-on: "ubuntu-latest"
    name: "PHP 7.4 Unit Tests (with coverage)"
    steps:
      - name: "Checkout"
        uses: "actions/checkout@v4"
      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "xdebug"
          php-version: "7.4"
          tools: composer:v2
      - name: "Install dependencies"
        run: |
          composer require php-coveralls/php-coveralls:^2.2 --dev --no-update
          COMPOSER_ROOT_VERSION=dev-master composer update --no-progress --prefer-dist
      - name: "Tests"
        run: "php vendor/bin/phpunit --coverage-clover build/logs/clover.xml"
      - name: Coveralls
        env:
          COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: "php vendor/bin/php-coveralls"
        if: ${{ success() }}
  tests:
    runs-on: "ubuntu-latest"
    name: "PHP ${{ matrix.php-version }} Unit Tests"
    strategy:
      matrix:
        php-version:
          - "8.0"
          - "8.1"
          - "8.2"
          - "8.3"
          - "8.4"
          - "8.5"
      fail-fast: false
    steps:
      - name: "Checkout"
        uses: "actions/checkout@v4"
      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "none"
          php-version: "${{ matrix.php-version }}"
          ini-file: "development"
          tools: composer:v2
      - name: "Install dependencies"
        run: "COMPOSER_ROOT_VERSION=dev-master composer update --no-progress --prefer-dist ${{ matrix.flags }}"
      - name: "PHPUnit"
        run: "php vendor/bin/phpunit"
  test_old_73_80:
    runs-on: "ubuntu-latest"
    name: "PHP 7.4 Code on PHP 8.4 Integration Tests"
    steps:
      - name: "Checkout"
        uses: "actions/checkout@v4"
      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "none"
          php-version: "8.4"
          ini-file: "development"
          tools: composer:v2
      - name: "Install PHP 8 dependencies"
        run: "COMPOSER_ROOT_VERSION=dev-master composer update --no-progress --prefer-dist"
      - name: "Tests"
        run: "test_old/run-php-src.sh 7.4.33"
  test_old_80_70:
    runs-on: "ubuntu-latest"
    name: "PHP 8.4 Code on PHP 7.4 Integration Tests"
    steps:
      - name: "Checkout"
        uses: "actions/checkout@v4"
      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "none"
          php-version: "7.4"
          ini-file: "development"
          tools: composer:v2
      - name: "Install PHP 8 dependencies"
        run: "COMPOSER_ROOT_VERSION=dev-master composer update --no-progress --prefer-dist"
      - name: "Tests"
        run: "test_old/run-php-src.sh 8.4.0beta5"
  phpstan:
    runs-on: "ubuntu-latest"
    name: "PHPStan"
    steps:
      - name: "Checkout"
        uses: "actions/checkout@v4"
      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "none"
          php-version: "8.3"
          tools: composer:v2
      - name: "Install dependencies"
        run: |
          cd tools && composer install
      - name: "PHPStan"
        run: "php tools/vendor/bin/phpstan"
  php-cs-fixer:
    runs-on: "ubuntu-latest"
    name: "PHP-CS-Fixer"
    steps:
      - name: "Checkout"
        uses: "actions/checkout@v4"
      - name: "Install PHP"
        uses: "shivammathur/setup-php@v2"
        with:
          coverage: "none"
          php-version: "8.3"
          tools: composer:v2
      - name: "Install dependencies"
        run: |
          cd tools && composer install
      - name: "php-cs-fixer"
        run: "php tools/vendor/bin/php-cs-fixer fix --dry-run"


================================================
FILE: .gitignore
================================================
.idea/
vendor/
composer.lock
grammar/kmyacc.exe
grammar/y.output
.phpunit.result.cache
.php-cs-fixer.cache


================================================
FILE: .php-cs-fixer.dist.php
================================================
<?php

$finder = PhpCsFixer\Finder::create()
    ->exclude('PhpParser/Parser')
    ->in(__DIR__ . '/lib')
    ->in(__DIR__ . '/test')
    ->in(__DIR__ . '/grammar')
;

$config = new PhpCsFixer\Config();
return $config->setRiskyAllowed(true)
    ->setRules([
        '@PSR12' => true,
        // We use PSR12 with consistent brace placement.
        'curly_braces_position' => [
            'functions_opening_brace' => 'same_line',
            'classes_opening_brace' => 'same_line',
        ],
        // declare(strict_types=1) on the same line as <?php.
        'blank_line_after_opening_tag' => false,
        'declare_strict_types' => true,
        // Keep argument formatting for now.
        'method_argument_space' => ['on_multiline' => 'ignore'],
        'phpdoc_align' => ['align' => 'left'],
        'phpdoc_trim' => true,
        'no_empty_phpdoc' => true,
        'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
        'no_extra_blank_lines' => true,
    ])
    ->setFinder($finder)
;


================================================
FILE: CHANGELOG.md
================================================
Version 5.7.0 (2025-12-06)
--------------------------

### Fixed

* Fixed changing modifier on anonymous class with formatting preserving pretty printer.
* Emit an error for unparenthesized arrow functions in pipe operator, and print necessary
  parentheses in the pretty printer.
* Fix PHP 8.5 deprecation warning in php-parse binary.

### Changed

* When targeting PHP 8.4 or newer, omit parentheses around immediately dereferenced new expressions.

### Added

* Added `shouldPrintRawValue` attribute to `Scalar\Int_`, which makes the pretty printer use the
  `rawValue` of the node. This can be used to print integers with separators.

Version 5.6.2 (2025-10-21)
--------------------------

### Fixed

* Fixed formatting-preserving pretty-printing when changing the visibility modifier on a node that
  has attributes.
* Fixed `chr()` deprecation warning on PHP 8.5.

### Added

* Added `Param::isFinal()` method.

Version 5.6.1 (2025-08-13)
--------------------------

### Fixed

* Fixed `Param::isPublic()` for parameters with asymmetric visibility keyword.
* Fixed PHP 8.5 deprecation warnings for `SplObjectStorage` methods.

### Added

* Added cast `kind` attributes to `Cast\Int_`, `Cast\Bool_` and `Cast\String_`.
  These allow distinguishing the deprecated versions of these casts.

Version 5.6.0 (2025-07-27)
--------------------------

### Added

* [8.5] Added support for `clone` with arbitrary function arguments. This will be parsed as an
  `Expr\FuncCall` node, instead of the usual `Expr\Clone_` node.
* [8.5] Permit declaration of `function clone` for use in stubs.
* [8.5] Added support for the pipe operator, represented by `Expr\BinaryOp\Pipe`.
* [8.5] Added support for the `(void)` cast, represented by `Expr\Cast\Void_`.
* [8.5] Added support for the `final` modifier on promoted properties.
* Added `CallLike::getArg()` to fetch an argument by position and name.

Version 5.5.0 (2025-05-31)
--------------------------

### Added

* [8.5] Added support for attributes on constants. `Stmt\Const_` now has an `attrGroups` subnode.
* Added `weakReferences` option to `NodeConnectingVisitor` and `ParentConnectingVisitor`. This
  will create the parent/next/prev references as WeakReferences, to avoid making the AST cyclic
  and thus increasing GC pressure.

### Changed

* Attributes on parameters are now printed on separate lines if the pretty printer target version
  is PHP 7.4 or older (which is the default). This allows them to be interpreted as comments,
  instead of causing a parse error. Specify a target version of PHP 8.0 or newer to restore the
  previous behavior.

Version 5.4.0 (2024-12-30)
--------------------------

### Added

* Added `Property::isAbstract()` and `Property::isFinal()` methods.
* Added `PropertyHook::isFinal()` method.
* Emit an error if property hook is used on declaration with multiple properties.

### Fixed

* Make legacy class aliases compatible with classmap-authoritative autoloader.
* `Param::isPromoted()` and `Param::isPublic()` now returns true for parameters that have property
  hooks but no explicit visibility modifier.
* `PropertyHook::getStmts()` now correctly desugars short `set` hooks. `set => $value` will be
  expanded to `set { $this->propertyName = $value; }`. This requires the `propertyName` attribute
  on the hook to be set, which is now also set by the parser. If the attribute is not set,
  `getStmts()` will throw an error for short set hooks, as it is not possible to produce a correct
  desugaring.

Version 5.3.1 (2024-10-08)
--------------------------

### Added

* Added support for declaring functions with name `exit` or `die`, to allow their use in stubs.

Version 5.3.0 (2024-09-29)
--------------------------

### Added

* Added `indent` option to pretty printer, which can be used to specify the indentation to use
  (defaulting to four spaces). This also allows using tab indentation.

### Fixed

* Resolve names in `PropertyHook`s in the `NameResolver`.
* Include the trailing semicolon inside `Stmt\GroupUse` nodes, making them consistent with
  `Stmt\Use_` nodes.
* Fixed indentation sometimes becoming negative in formatting-preserving pretty printer, resulting
  in `ValueError`s.

Version 5.2.0 (2024-09-15)
--------------------------

### Added

* [8.4] Added support for `__PROPERTY__` magic constant, represented using a
  `Node\Scalar\MagicConst\Property` node.
* [8.4] Added support for property hooks, which are represented using a new `hooks` subnode on
  `Node\Stmt\Property` and `Node\Param`, which contains an array of `Node\PropertyHook`.
* [8.4] Added support for asymmetric visibility modifiers. Property `flags` can now hold the
  additional bits `Modifiers::PUBLIC_SET`, `Modifiers::PROTECTED_SET` and `Modifiers::PRIVATE_SET`.
* [8.4] Added support for generalized exit function. For backwards compatibility, exit without
  argument or a single plain argument continues to use a `Node\Expr\Exit_` node. Otherwise (e.g.
  if a named argument is used) it will be represented as a plain `Node\Expr\FuncCall`.
* Added support for passing enum values to various builder methods, like `BuilderFactory::val()`.

### Removed

* Removed support for alternative array syntax `$array{0}` from the PHP 8 parser. It is still
  supported by the PHP 7 parser. This is necessary in order to support property hooks.

Version 5.1.0 (2024-07-01)
--------------------------

### Added

* [8.4] Added support for dereferencing `new` expressions without parentheses.

### Fixed

* Fixed redundant parentheses being added when pretty printing ternary expressions.

### Changed

* Made some phpdoc types more precise.

Version 5.0.2 (2024-03-05)
--------------------------

### Fixed

* Fix handling of indentation on next line after opening PHP tag in formatting-preserving pretty
printer.

### Changed

* Avoid cyclic references in `Parser` objects. This means that no longer used parser objects are
  immediately destroyed now, instead of requiring cycle GC.
* Update `PhpVersion::getNewestSupported()` to report PHP 8.3 instead of PHP 8.2.

Version 5.0.1 (2024-02-21)
--------------------------

### Changed

* Added check to detect use of PHP-Parser with libraries that define `T_*` compatibility tokens
  with incorrect type (such as string instead of int). This would lead to `TypeError`s down the
  line. Now an `Error` will be thrown early to indicate the problem.

Version 5.0.0 (2024-01-07)
--------------------------

See UPGRADE-5.0 for detailed migration instructions.

### Fixed

* Fixed parent class of `PropertyItem` and `UseItem`.

Version 5.0.0-rc1 (2023-12-20)
------------------------------

See UPGRADE-5.0 for detailed migration instructions.

### Fixed

* Fixed parsing of empty files.

### Added

* Added support for printing additional attributes (like `kind`) in `NodeDumper`.
* Added `rawValue` attribute to `InterpolatedStringPart` and heredoc/nowdoc `String_`s, which
  provides the original, unparsed value. It was previously only available for non-interpolated
  single/double quoted strings.
* Added `Stmt\Block` to represent `{}` code blocks. Previously, such code blocks were flattened
  into the parent statements array. `Stmt\Block` will not be created for structures that are
  typically used with code blocks, for example `if ($x) { $y; }` will be represented as previously,
  while `if ($x) { { $x; } }` will have an extra `Stmt\Block` wrapper.

### Changed

* Use visitor to assign comments. This fixes the long-standing issue where comments were assigned
  to all nodes sharing a starting position. Now only the outer-most node will hold the comments.
* Don't parse unicode escape sequences when targeting PHP < 7.0.
* Improve NodeDumper performance for large dumps.

### Removed

* Removed `Stmt\Throw_` node, use `Expr\Throw_` inside `Stmt\Expression` instead.
* Removed `ParserFactory::create()`.

Version 5.0.0-beta1 (2023-09-17)
--------------------------------

See UPGRADE-5.0 for detailed migration instructions.

### Added

* Visitors can now be passed directly to the `NodeTraverser` constructor. A separate call to
  `addVisitor()` is no longer required.

### Changed

* The minimum host PHP version is now PHP 7.4. It is still possible to parse code from older
  versions. Property types have been added where possible.
* The `Lexer` no longer accepts options. `Lexer\Emulative` only accepts a `PhpVersion`. The
  `startLexing()`, `getTokens()` and `handleHaltCompiler()` methods have been removed. Instead,
  there is a single method `tokenize()` returning the tokens.
* The `Parser::getLexer()` method has been replaced by `Parser::getTokens()`.
* Attribute handling has been moved from the lexer to the parser, and is no longer configurable.
  The comments, startLine, endLine, startTokenPos, endTokenPos, startFilePos, and endFilePos
  attributes will always be added.
* The pretty printer now defaults to PHP 7.4 as the target version.
* The pretty printer now indents heredoc/nowdoc strings if the target version is >= 7.3
  (flexible heredoc/nowdoc).

### Removed

* The deprecated `Comment::getLine()`, `Comment::getTokenPos()` and `Comment::getFilePos()` methods
  have been removed. Use `Comment::getStartLine()`, `Comment::getStartTokenPos()` and
  `Comment::getStartFilePos()` instead.

### Deprecated

* The `Node::getLine()` method has been deprecated. Use `Node::getStartLine()` instead.

Version 5.0.0-alpha3 (2023-06-24)
---------------------------------

See UPGRADE-5.0 for detailed migration instructions.

### Added

* [PHP 8.3] Added support for typed constants.
* [PHP 8.3] Added support for readonly anonymous classes.
* Added support for `NodeVisitor::REPLACE_WITH_NULL`.
* Added support for CRLF newlines in the pretty printer, using the new `newline` option.

### Changed

* Use PHP 7.1 as the default target version for the pretty printer.
* Print `else if { }` instead of `else { if { } }`.
* The `leaveNode()` method on visitors is now invoked in reverse order of `enterNode()`.
* Moved `NodeTraverser::REMOVE_NODE` etc. to `NodeVisitor::REMOVE_NODE`. The old constants are still
  available for compatibility.
* The `Name` subnode `parts` has been replaced by `name`, which stores the name as a string rather
  than an array of parts separated by namespace separators. The `getParts()` method returns the old
  representation.
* No longer accept strings for types in Node constructors. Instead, either an `Identifier`, `Name`
  or `ComplexType` must be passed.
* `Comment::getReformattedText()` now normalizes CRLF newlines to LF newlines.

### Fixed

* Don't trim leading whitespace in formatting preserving printer.
* Treat DEL as a label character in the formatting preserving printer depending on the targeted
  PHP version.
* Fix error reporting in emulative lexer without explicitly specified error handler.
* Gracefully handle non-contiguous array indices in the `Differ`.

Version 5.0.0-alpha2 (2023-03-05)
---------------------------------

See UPGRADE-5.0 for detailed migration instructions.

### Added

* [PHP 8.3] Added support for dynamic class constant fetch.
* Added many additional type annotations. PhpStan is now used.
* Added a fuzzing target for PHP-Fuzzer, which was how a lot of pretty printer bugs were found.
* Added `isPromoted()`, `isPublic()`, `isProtected()`, `isPrivate()` and `isReadonly()` methods
  on `Param`.
* Added support for class constants in trait builder.
* Added `PrettyPrinter` interface.
* Added support for formatting preservation when toggling static modifiers.
* The `php-parse` binary now accepts `-` as the file name, in which case it will read from stdin.

### Fixed

* The pretty printer now uses a more accurate treatment of unary operator precedence, and will only
  wrap them in parentheses if required. This allowed fixing a number of other precedence related
  bugs.
* The pretty printer now respects the precedence of `clone`, `throw` and arrow functions.
* The pretty printer no longer unconditionally wraps `yield` in parentheses, unless the target
  version is set to older than PHP 7.0.
* Fixed formatting preservation for alternative elseif/else syntax.
* Fixed checks for when it is safe to print strings as heredoc/nowdoc to accommodate flexible
  doc string semantics.
* The pretty printer now prints parentheses around new/instanceof operands in all required
  situations.
* Similar, differences in allowed expressions on the LHS of `->` and `::` are now taken into account.
* Fixed various cases where `\r` at the end of a doc string could be incorrectly merged into a CRLF
  sequence with a following `\n`.
* `__halt_compiler` is no longer recognized as a semi-reserved keyword, in line with PHP behavior.
* `<?=` is no longer recognized as a semi-reserved keyword.
* Fix handling of very large overflowing `\u` escape sequences.

### Removed

* Removed deprecated `Error` constructor taking a line number instead of an attributes array.

Version 5.0.0-alpha1 (2022-09-04)
---------------------------------

See UPGRADE-5.0 for detailed migration instructions.

### Changed

* PHP 7.1 is now required to run PHP-Parser.
* Formatting of the standard pretty printer has been adjusted to match PSR-12 more closely.
* The internal token representation now uses a `PhpParser\Token` class, which is compatible with
  PHP 8 token representation (`PhpToken`).
* Destructuring is now always represented using `Expr\List_` nodes, even if it uses `[]` syntax.
* Renamed a number of node classes, and moved things that were not real expressions/statements
  outside the `Expr`/`Stmt` hierarchy. Compatibility shims for the old names have been retained.

### Added

* Added `PhpVersion` class, which is accepted in a number of places (e.g. ParserFactory, Parser,
  Lexer, PrettyPrinter) and gives more precise control over the PHP version being targeted.
* Added PHP 8 parser though it only differs from the PHP 7 parser in concatenation precedence.
* Added `Parser::getLexer()` method.
* Added a `Modifiers` class, as a replacement for `Stmt\Class_::MODIFIER_*`.
* Added support for returning an array or `REMOVE_NODE` from `NodeVisitor::enterNode()`.

### Removed

* The PHP 5 parser has been removed. The PHP 7 parser has been adjusted to deal with PHP 5 code
  more gracefully.

Version 4.15.1 (2022-09-04)
---------------------------

### Fixed

* Fixed formatting preservation when adding *multiple* attributes to a class/method/etc that
  previously had none. This fixes a regression in the 4.15.0 release.

Version 4.15.0 (2022-09-03)
---------------------------

### Added

* PHP 8.2: Added support for `true` type.
* PHP 8.2: Added support for DNF types.

### Fixed

* Support `readonly` as a function name.
* Added `__serialize` and `__unserialize` to magic method list.
* Fixed bounds check in `Name::slice()`.
* Fixed formatting preservation when adding attributes to a class/method/etc that previously had none.

Version 4.14.0 (2022-05-31)
---------------------------

### Added

* Added support for readonly classes.
* Added `rawValue` attribute to `LNumber`, `DNumber` and `String_` nodes, which stores the unparsed
  value of the literal (e.g. `"1_000"` rather than `1000`).

Version 4.13.2 (2021-11-30)
---------------------------

### Added

* Added builders for enums and enum cases.

### Fixed

* NullsafeMethodCall now extends from CallLike.
* The `namespacedName` property populated by the `NameResolver` is now declared on relevant nodes,
  to avoid a dynamic property deprecation warning with PHP 8.2.

Version 4.13.1 (2021-11-03)
---------------------------

### Fixed

* Support reserved keywords as enum cases.
* Support array unpacking in constant expression evaluator.

Version 4.13.0 (2021-09-20)
---------------------------

### Added

* [PHP 8.1] Added support for intersection types using a new `IntersectionType` node. Additionally
  a `ComplexType` parent class for `NullableType`, `UnionType` and `IntersectionType` has been
  added.
* [PHP 8.1] Added support for explicit octal literals.
* [PHP 8.1] Added support for first-class callables. These are represented using a call whose first
  argument is a `VariadicPlaceholder`. The representation is intended to be forward-compatible with
  partial function application, just like the PHP feature itself. Call nodes now extend from
  `Expr\CallLike`, which provides an `isFirstClassCallable()` method to determine whether a
  placeholder id present. `getArgs()` can be used to assert that the call is not a first-class
  callable and returns `Arg[]` rather than `array<Arg|VariadicPlaceholder>`.

### Fixed

* Multiple modifiers for promoted properties are now accepted. In particular this allows something
  like `public readonly` for promoted properties.
* Formatting-preserving pretty printing for comments in array literals has been fixed.

Version 4.12.0 (2021-07-21)
---------------------------

### Added

* [PHP 8.1] Added support for readonly properties (through a new `MODIFIER_READONLY`).
* [PHP 8.1] Added support for final class constants.

### Fixed

* Fixed compatibility with PHP 8.1. `&` tokens are now canonicalized to the
  `T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG` and `T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG` tokens
  used in PHP 8.1. This happens unconditionally, regardless of whether the emulative lexer is used.

Version 4.11.0 (2021-07-03)
---------------------------

### Added

* `BuilderFactory::args()` now accepts named arguments.
* `BuilderFactory::attribute()` has been added.
* An `addAttribute()` method accepting an `Attribute` or `AttributeGroup` has been adde to all
  builders that accept attributes, such as `Builder\Class_`.

### Fixed

* `NameResolver` now handles enums.
* `PrettyPrinter` now prints backing enum type.
* Builder methods for types now property handle `never` type.

Version 4.10.5 (2021-05-03)
---------------------------

### Added

* [PHP 8.1] Added support for enums. These are represented using the `Stmt\Enum_` and
  `Stmt\EnumCase` nodes.
* [PHP 8.1] Added support for never type. This type will now be returned as an `Identifier` rather
  than `Name`.
* Added `ClassConst` builder.

### Changed

* Non-UTF-8 code units in strings will now be hex-encoded.

### Fixed

* Fixed precedence of arrow functions.

Version 4.10.4 (2020-12-20)
---------------------------

### Fixed

* Fixed position information for variable-variables (#741).
* Fixed position information for traits/interfaces preceded by if statement (#738).

Version 4.10.3 (2020-12-03)
---------------------------

### Fixed

* Fixed formatting-preserving pretty printing for `"{$x}"`.
* Ternary expressions are now treated as non-associative in the pretty printer, in order to
  generate code that is compatible with the parentheses requirement introduced in PHP 8.
* Removed no longer necessary `error_clear_last()` call in lexer, which may interfere with fatal
  error handlers if invoked during shutdown.


Version 4.10.2 (2020-09-26)
------------------

### Fixed

* Fixed check for token emulation conflicts with other libraries.

Version 4.10.1 (2020-09-23)
---------------------------

### Added

* Added support for recovering from a missing semicolon after a property or class constant
  declaration.

### Fixed

* Fix spurious whitespace in formatting-preserving pretty printer when both removing and adding
  elements at the start of a list.
* Fix incorrect case-sensitivity in keyword token emulation.

Version 4.10.0 (2020-09-19)
---------------------------

### Added

* [PHP 8.0] Added support for attributes. These are represented using a new `AttributeGroup` node
  containing `Attribute` nodes. A new `attrGroups` subnode is available on all node types that
  support attributes, i.e. `Stmt\Class_`, `Stmt\Trait_`, `Stmt\Interface_`, `Stmt\Function_`,
  `Stmt\ClassMethod`, `Stmt\ClassConst`, `Stmt\Property`, `Expr\Closure`, `Expr\ArrowFunction` and
  `Param`.
* [PHP 8.0] Added support for nullsafe properties inside interpolated strings, in line with an
  upstream change.

### Fixed

* Improved compatibility with other libraries that use forward compatibility defines for PHP tokens.

Version 4.9.1 (2020-08-30)
--------------------------

### Added

* Added support for removing the first element of a list to the formatting-preserving pretty
  printer.

### Fixed

* Allow member modifiers as part of namespaced names. These were missed when support for other
  keywords was added.

Version 4.9.0 (2020-08-18)
--------------------------

### Added

* [PHP 8.0] Added support for named arguments, represented using a new `name` subnode on `Arg`.
* [PHP 8.0] Added support for static return type, represented like a normal class return type.
* [PHP 8.0] Added support for throw expression, represented using a new `Expr\Throw_` node. For
  backwards compatibility reasons, throw expressions in statement context continue to be
  represented using `Stmt\Throw_`.
* [PHP 8.0] Added support for keywords as parts of namespaced names.

### Fixed

* Emit parentheses for class constant fetch with complex left-hand-side.
* Emit parentheses for new/instanceof on complex class expression.

Version 4.8.0 (2020-08-09)
--------------------------

### Added

* [PHP 8.0] Added support for nullsafe operator, represented using the new
  `Expr\NullsafePropertyFetch` and `Expr\NullsafeMethodCall` nodes.
* Added `phpVersion` option to the emulative lexer, which allows controlling the target version to
  emulate (defaults to the latest available, currently PHP 8.0). This is useful to parse code that
  uses reserved keywords from newer PHP versions as identifiers.

Version 4.7.0 (2020-07-25)
--------------------------

### Added

* Add `ParentConnectingVisitor` and `NodeConnectingVisitor` classes.
* [PHP 8.0] Added support for match expressions. These are represented using a new `Expr\Match_`
  containing `MatchArm`s.
* [PHP 8.0] Added support for trailing comma in closure use lists.

### Fixed

* Fixed missing error for unterminated comment with trailing newline (#688).
* Compatibility with PHP 8.0 has been restored: Namespaced names are now always represented by
  `T_NAME_*` tokens, using emulationg on older PHP versions. Full support for reserved keywords
  in namespaced names is not yet present.

Version 4.6.0 (2020-07-02)
--------------------------

### Added

* [PHP 8.0] Added support for trailing commas in parameter lists.
* [PHP 8.0] Added support for constructor promotion. The parameter visibility is stored in
  `Node\Param::$flags`.

### Fixed

* Comment tokens now always follow the PHP 8 interpretation, and do not include trailing
  whitespace.
* As a result of the previous change, some whitespace issues when inserting a statement into a
  method containing only a comment, and using the formatting-preserving pretty printer, have been
  resolved.

Version 4.5.0 (2020-06-03)
--------------------------

### Added

* [PHP 8.0] Added support for the mixed type. This means `mixed` types are now parsed as an
  `Identifier` rather than a `Name`.
* [PHP 8.0] Added support for catching without capturing the exception. This means that
  `Catch_::$var` may now be null.

Version 4.4.0 (2020-04-10)
--------------------------

### Added

* Added support for passing union types in builders.
* Added end line, token position and file position information for comments.
* Added `getProperty()` method to `ClassLike` nodes.

### Fixed

* Fixed generation of invalid code when using the formatting preserving pretty printer, and
  inserting code next to certain nop statements. The formatting is still ugly though.
* `getDocComment()` no longer requires that the very last comment before a node be a doc comment.
  There may not be non-doc comments between the doc comment and the declaration.
* Allowed arbitrary expressions in `isset()` and `list()`, rather than just variables.
  In particular, this allows `isset(($x))`, which is legal PHP code.
* [PHP 8.0] Add support for [variable syntax tweaks RFC](https://wiki.php.net/rfc/variable_syntax_tweaks).

Version 4.3.0 (2019-11-08)
--------------------------

### Added

* [PHP 8.0] Added support for union types using a new `UnionType` node.

Version 4.2.5 (2019-10-25)
--------------------------

### Changed

* Tests and documentation are no longer included in source archives. They can still be accessed
  by cloning the repository.
* php-yacc is now used to generate the parser. This has no impact on users of the library.

Version 4.2.4 (2019-09-01)
--------------------------

### Added

* Added getProperties(), getConstants() and getTraitUses() to ClassLike. (#629, #630)

### Fixed

* Fixed flexible heredoc emulation to check for digits after the end label. This synchronizes
  behavior with the upcoming PHP 7.3.10 release.

Version 4.2.3 (2019-08-12)
--------------------------

### Added

* [PHP 7.4] Add support for numeric literal separators. (#615)

### Fixed

* Fixed resolution of return types for arrow functions. (#613)
* Fixed compatibility with PHP 7.4.

Version 4.2.2 (2019-05-25)
--------------------------

### Added

* [PHP 7.4] Add support for arrow functions using a new `Expr\ArrowFunction` node. (#602)
* [PHP 7.4] Add support for array spreads, using a new `unpack` subnode on `ArrayItem`. (#609)
* Added support for inserting into empty list nodes in the formatting preserving pretty printer.

### Changed

* `php-parse` will now print messages to stderr, so that stdout only contains the actual result of
  the operation (such as a JSON dump). (#605)

### Fixed

* Fixed attribute assignment for zero-length nop statements, and a related assertion failure in
  the formatting-preserving pretty printer. (#589)

Version 4.2.1 (2019-02-16)
--------------------------

### Added

* [PHP 7.4] Add support for `??=` operator through a new `AssignOp\Coalesce` node. (#575)

Version 4.2.0 (2019-01-12)
--------------------------

### Added

* [PHP 7.4] Add support for typed properties through a new `type` subnode of `Stmt\Property`.
  Additionally `Builder\Property` now has a `setType()` method. (#567)
* Add `kind` attribute to `Cast\Double_`, which allows to distinguish between `(float)`,
  `(double)` and `(real)`. The form of the cast will be preserved by the pretty printer. (#565)

### Fixed

* Remove assertion when pretty printing anonymous class with a name (#554).

Version 4.1.1 (2018-12-26)
--------------------------

### Fixed

* Fix "undefined offset" notice when parsing specific malformed code (#551).

### Added

* Support error recovery for missing return type (`function foo() : {}`) (#544).

Version 4.1.0 (2018-10-10)
--------------------------

### Added

* Added support for PHP 7.3 flexible heredoc/nowdoc strings, completing support for PHP 7.3. There
  are two caveats for this feature:
   * In some rare, pathological cases flexible heredoc/nowdoc strings change the interpretation of
     existing doc strings. PHP-Parser will now use the new interpretation.
   * Flexible heredoc/nowdoc strings require special support from the lexer. Because this is not
     available on PHP versions before 7.3, support has to be emulated. This emulation is not perfect
     and some cases which we do not expect to occur in practice (such as flexible doc strings being
     nested within each other through abuse of variable-variable interpolation syntax) may not be
     recognized correctly.
* Added `DONT_TRAVERSE_CURRENT_AND_CHILDREN` to `NodeTraverser` to skip both traversal of child
  nodes, and prevent subsequent visitors from visiting the current node.

Version 4.0.4 (2018-09-18)
--------------------------

### Added

* The following methods have been added to `BuilderFactory`:
  * `useTrait()` (fluent builder)
  * `traitUseAdaptation()` (fluent builder)
  * `useFunction()` (fluent builder)
  * `useConst()` (fluent builder)
  * `var()`
  * `propertyFetch()`
  
### Deprecated

* `Builder\Param::setTypeHint()` has been deprecated in favor of the newly introduced
  `Builder\Param::setType()`.

Version 4.0.3 (2018-07-15)
--------------------------

### Fixed

* Fixed possible undefined offset notice in formatting-preserving printer. (#513)

### Added

* Improved error recovery inside arrays.
* Preserve trailing comment inside classes. **Note:** This change is possibly BC breaking if your
  code validates that classes can only contain certain statement types. After this change, classes
  can also contain Nop statements, while this was not previously possible. (#509)

Version 4.0.2 (2018-06-03)
--------------------------

### Added

* Improved error recovery inside classes.
* Support error recovery for `foreach` without `as`.
* Support error recovery for parameters without variable (`function (Type ) {}`).
* Support error recovery for functions without body (`function ($foo)`).

Version 4.0.1 (2018-03-25)
--------------------------

### Added

* [PHP 7.3] Added support for trailing commas in function calls.
* [PHP 7.3] Added support for by-reference array destructuring. 
* Added checks to node traverser to prevent replacing a statement with an expression or vice versa.
  This should prevent common mistakes in the implementation of node visitors.
* Added the following methods to `BuilderFactory`, to simplify creation of expressions:
  * `funcCall()`
  * `methodCall()`
  * `staticCall()`
  * `new()`
  * `constFetch()`
  * `classConstFetch()`

Version 4.0.0 (2018-02-28)
--------------------------

* No significant code changes since the beta 1 release.

Version 4.0.0-beta1 (2018-01-27)
--------------------------------

### Fixed

* In formatting-preserving pretty printer: Fixed indentation when inserting into lists. (#466)

### Added

* In formatting-preserving pretty printer: Improved formatting of elements inserted into multi-line
  arrays.

### Removed

* The `Autoloader` class has been removed. It is now required to use the Composer autoloader.

Version 4.0.0-alpha3 (2017-12-26)
---------------------------------

### Fixed

* In the formatting-preserving pretty printer:
  * Fixed comment indentation.
  * Fixed handling of inline HTML in the fallback case.
  * Fixed insertion into list nodes that require creation of a code block.

### Added

* Added support for inserting at the start of list nodes in formatting-preserving pretty printer.

Version 4.0.0-alpha2 (2017-11-10)
---------------------------------

### Added

* In the formatting-preserving pretty printer:
  * Added support for changing modifiers.
  * Added support for anonymous classes.
  * Added support for removing from list nodes.
  * Improved support for changing comments.
* Added start token offsets to comments.

Version 4.0.0-alpha1 (2017-10-18)
---------------------------------

### Added

* Added experimental support for format-preserving pretty-printing. In this mode formatting will be
  preserved for parts of the code which have not been modified.
* Added `replaceNodes` option to `NameResolver`, defaulting to true. If this option is disabled,
  resolved names will be added as `resolvedName` attributes, instead of replacing the original
  names.
* Added `NodeFinder` class, which can be used to find nodes based on a callback or class name. This
  is a utility to avoid custom node visitor implementations for simple search operations.
* Added `ClassMethod::isMagic()` method.
* Added `BuilderFactory` methods: `val()` method for creating an AST for a simple value, `concat()`
  for creating concatenation trees, `args()` for preparing function arguments.
* Added `NameContext` class, which encapsulates the `NameResolver` logic independently of the actual
  AST traversal. This facilitates use in other context, such as class names in doc comments.
  Additionally it provides an API for getting the shortest representation of a name.
* Added `Node::setAttributes()` method.
* Added `JsonDecoder`. This allows conversion JSON back into an AST.
* Added `Name` methods `toLowerString()` and `isSpecialClassName()`.
* Added `Identifier` and `VarLikeIdentifier` nodes, which are used in place of simple strings in
  many places.
* Added `getComments()`, `getStartLine()`, `getEndLine()`, `getStartTokenPos()`, `getEndTokenPos()`,
  `getStartFilePos()` and `getEndFilePos()` methods to `Node`. These provide a more obvious access
  point for the already existing attributes of the same name.
* Added `ConstExprEvaluator` to evaluate constant expressions to PHP values.
* Added `Expr\BinaryOp::getOperatorSigil()`, returning `+` for `Expr\BinaryOp\Plus`, etc.

### Changed

* Many subnodes that previously held simple strings now use `Identifier` (or `VarLikeIdentifier`)
  nodes. Please see the UPGRADE-4.0 file for an exhaustive list of affected nodes and some notes on
  possible impact.
* Expression statements (`expr;`) are now represented using a `Stmt\Expression` node. Previously
  these statements were directly represented as their constituent expression.
* The `name` subnode of `Param` has been renamed to `var` and now contains a `Variable` rather than
  a plain string.
* The `name` subnode of `StaticVar` has been renamed to `var` and now contains a `Variable` rather
  than a plain string.
* The `var` subnode of `ClosureUse` now contains a `Variable` rather than a plain string.
* The `var` subnode of `Catch` now contains a `Variable` rather than a plain string.
* The `alias` subnode of `UseUse` is now `null` if no explicit alias is given. As such,
  `use Foo\Bar` and `use Foo\Bar as Bar` are now represented differently. The `getAlias()` method
  can be used to get the effective alias, even if it is not explicitly given.

### Removed

* Support for running on PHP 5 and HHVM has been removed. You can however still parse code of old
  PHP versions (such as PHP 5.2), while running on PHP 7.
* Removed `type` subnode on `Class`, `ClassMethod` and `Property` nodes. Use `flags` instead.
* The `ClassConst::isStatic()` method has been removed. Constants cannot have a static modifier.
* The `NodeTraverser` no longer accepts `false` as a return value from a `leaveNode()` method.
  `NodeTraverser::REMOVE_NODE` should be returned instead.
* The `Node::setLine()` method has been removed. If you really need to, you can use `setAttribute()`
  instead.
* The misspelled `Class_::VISIBILITY_MODIFER_MASK` constant has been dropped in favor of
  `Class_::VISIBILITY_MODIFIER_MASK`.
* The XML serializer has been removed. As such, the classes `Serializer\XML`, and
  `Unserializer\XML`, as well as the interfaces `Serializer` and `Unserializer` no longer exist.
* The `BuilderAbstract` class has been removed. It's functionality is moved into `BuilderHelpers`.
  However, this is an internal class and should not be used directly.

Version 3.1.5 (2018-02-28)
--------------------------

### Fixed

* Fixed duplicate comment assignment in switch statements. (#469)
* Improve compatibility with PHP-Scoper. (#477)

Version 3.1.4 (2018-01-25)
--------------------------

### Fixed

* Fixed pretty printing of `-(-$x)` and `+(+$x)`. (#459)

Version 3.1.3 (2017-12-26)
--------------------------

### Fixed

* Improve compatibility with php-scoper, by supporting prefixed namespaces in
  `NodeAbstract::getType()`.

Version 3.1.2 (2017-11-04)
--------------------------

### Fixed

* Comments on empty blocks are now preserved on a `Stmt\Nop` node. (#382)

### Added

* Added `kind` attribute for `Stmt\Namespace_` node, which is one of `KIND_SEMICOLON` or
  `KIND_BRACED`. (#417)
* Added `setDocComment()` method to namespace builder. (#437)

Version 3.1.1 (2017-09-02)
--------------------------

### Fixed

* Fixed syntax error on comment after brace-style namespace declaration. (#412)
* Added support for TraitUse statements in trait builder. (#413)

Version 3.1.0 (2017-07-28)
--------------------------

### Added

* [PHP 7.2] Added support for trailing comma in group use statements.
* [PHP 7.2] Added support for `object` type. This means `object` types will now be represented as a
  builtin type (a simple `"object"` string), rather than a class `Name`.

### Fixed

* Floating-point numbers are now printed correctly if the LC_NUMERIC locale uses a comma as decimal
  separator.

### Changed

* `Name::$parts` is no longer deprecated.

Version 3.0.6 (2017-06-28)
--------------------------

### Fixed

* Fixed the spelling of `Class_::VISIBILITY_MODIFIER_MASK`. The previous spelling of
  `Class_::VISIBILITY_MODIFER_MASK` is preserved for backwards compatibility.
* The pretty printing will now preserve comments inside array literals and function calls by
  printing the array items / function arguments on separate lines. Array literals and functions that
  do not contain comments are not affected.

### Added

* Added `Builder\Param::makeVariadic()`.

### Deprecated

* The `Node::setLine()` method has been deprecated.

Version 3.0.5 (2017-03-05)
--------------------------

### Fixed

* Name resolution of `NullableType`s is now performed earlier, so that a fully resolved signature is
  available when a function is entered. (#360)
* `Error` nodes are now considered empty, while previously they extended until the token where the
  error occurred. This made some nodes larger than expected. (#359)
* Fixed notices being thrown during error recovery in some situations. (#362)

Version 3.0.4 (2017-02-10)
--------------------------

### Fixed

* Fixed some extensibility issues in pretty printer (`pUseType()` is now public and `pPrec()` calls
  into `p()`, instead of directly dispatching to the type-specific printing method).
* Fixed notice in `bin/php-parse` script.

### Added

* Error recovery from missing semicolons is now supported in more cases.
* Error recovery from trailing commas in positions where PHP does not support them is now supported.

Version 3.0.3 (2017-02-03)
--------------------------

### Fixed

* In `"$foo[0]"` the `0` is now parsed as an `LNumber` rather than `String`. (#325)
* Ensure integers and floats are always pretty printed preserving semantics, even if the particular
  value can only be manually constructed.
* Throw a `LogicException` when trying to pretty-print an `Error` node. Previously this resulted in
  an undefined method exception or fatal error.

### Added

* [PHP 7.1] Added support for negative interpolated offsets: `"$foo[-1]"`
* Added `preserveOriginalNames` option to `NameResolver`. If this option is enabled, an
  `originalName` attribute, containing the unresolved name, will be added to each resolved name.
* Added `php-parse --with-positions` option, which dumps nodes with position information.

### Deprecated

* The XML serializer has been deprecated. In particular, the classes `Serializer\XML`,
  `Unserializer\XML`, as well as the interfaces `Serializer` and `Unserializer` are deprecated.

Version 3.0.2 (2016-12-06)
--------------------------

### Fixed

* Fixed name resolution of nullable types. (#324)
* Fixed pretty-printing of nullable types.

Version 3.0.1 (2016-12-01)
--------------------------

### Fixed

* Fixed handling of nested `list()`s: If the nested list was unkeyed, it was directly included in
  the list items. If it was keyed, it was wrapped in `ArrayItem`. Now nested `List_` nodes are
  always wrapped in `ArrayItem`s. (#321)

Version 3.0.0 (2016-11-30)
--------------------------

### Added

* Added support for dumping node positions in the NodeDumper through the `dumpPositions` option.
* Added error recovery support for `$`, `new`, `Foo::`.

Version 3.0.0-beta2 (2016-10-29)
--------------------------------

This release primarily improves our support for error recovery.

### Added

* Added `Node::setDocComment()` method.
* Added `Error::getMessageWithColumnInfo()` method.
* Added support for recovery from lexer errors.
* Added support for recovering from "special" errors (i.e. non-syntax parse errors).
* Added precise location information for lexer errors.
* Added `ErrorHandler` interface, and `ErrorHandler\Throwing` and `ErrorHandler\Collecting` as
  specific implementations. These provide a general mechanism for handling error recovery.
* Added optional `ErrorHandler` argument to `Parser::parse()`, `Lexer::startLexing()` and
  `NameResolver::__construct()`.
* The `NameResolver` now adds a `namespacedName` attribute on name nodes that cannot be statically
  resolved (unqualified unaliased function or constant names in namespaces).

### Fixed

* Fixed attribute assignment for `GroupUse` prefix and variables in interpolated strings.

### Changed

* The constants on `NameTraverserInterface` have been moved into the `NameTraverser` class.
* Due to the error handling changes, the `Parser` interface and `Lexer` API have changed.
* The emulative lexer now directly postprocesses tokens, instead of using `~__EMU__~` sequences.
  This changes the protected API of the lexer.
* The `Name::slice()` method now returns `null` for empty slices, previously `new Name([])` was
  used. `Name::concat()` now also supports concatenation with `null`.

### Removed

* Removed `Name::append()` and `Name::prepend()`. These mutable methods have been superseded by
  the immutable `Name::concat()`.
* Removed `Error::getRawLine()` and `Error::setRawLine()`. These methods have been superseded by
  `Error::getStartLine()` and `Error::setStartLine()`.
* Removed support for node cloning in the `NodeTraverser`.
* Removed `$separator` argument from `Name::toString()`.
* Removed `throw_on_error` parser option and `Parser::getErrors()` method. Use the `ErrorHandler`
  mechanism instead.

Version 3.0.0-beta1 (2016-09-16)
--------------------------------

### Added

* [7.1] Function/method and parameter builders now support PHP 7.1 type hints (void, iterable and
  nullable types).
* Nodes and Comments now implement `JsonSerializable`. The node kind is stored in a `nodeType`
  property.
* The `InlineHTML` node now has an `hasLeadingNewline` attribute, that specifies whether the
  preceding closing tag contained a newline. The pretty printer honors this attribute.
* Partial parsing of `$obj->` (with missing property name) is now supported in error recovery mode.
* The error recovery mode is now exposed in the `php-parse` script through the `--with-recovery`
  or `-r` flags.

The following changes are also part of PHP-Parser 2.1.1:

* The PHP 7 parser will now generate a parse error for `$var =& new Obj` assignments.
* Comments on free-standing code blocks will now be retained as comments on the first statement in
  the code block.

Version 3.0.0-alpha1 (2016-07-25)
---------------------------------

### Added

* [7.1] Added support for `void` and `iterable` types. These will now be represented as strings
  (instead of `Name` instances) similar to other builtin types.
* [7.1] Added support for class constant visibility. The `ClassConst` node now has a `flags` subnode
  holding the visibility modifier, as well as `isPublic()`, `isProtected()` and `isPrivate()`
  methods. The constructor changed to accept the additional subnode.
* [7.1] Added support for nullable types. These are represented using a new `NullableType` node
  with a single `type` subnode.
* [7.1] Added support for short array destructuring syntax. This means that `Array` nodes may now
  appear as the left-hand-side of assignments and foreach value targets. Additionally the array
  items may now contain `null` values if elements are skipped.
* [7.1] Added support for keys in list() destructuring. The `List` subnode `vars` has been renamed
  to `items` and now contains `ArrayItem`s instead of plain variables.
* [7.1] Added support for multi-catch. The `Catch` subnode `type` has been renamed to `types` and
  is now an array of `Name`s.
* `Name::slice()` now supports lengths and negative offsets. This brings it in line with
  `array_slice()` functionality.

### Changed

Due to PHP 7.1 support additions described above, the node structure changed as follows:

* `void` and `iterable` types are now stored as strings if the PHP 7 parser is used.
* The `ClassConst` constructor changed to accept an additional `flags` subnode.
* The `Array` subnode `items` may now contain `null` elements (destructuring).
* The `List` subnode `vars` has been renamed to `items` and now contains `ArrayItem`s instead of
  plain variables.
* The `Catch` subnode `type` has been renamed to `types` and is now an array of `Name`s.

Additionally the following changes were made:

* The `type` subnode on `Class`, `ClassMethod` and `Property` has been renamed to `flags`. The
  `type` subnode has retained for backwards compatibility and is populated to the same value as
  `flags`. However, writes to `type` will not update `flags`.
* The `TryCatch` subnode `finallyStmts` has been replaced with a `finally` subnode that holds an
  explicit `Finally` node. This allows for more accurate attribute assignment.
* The `Trait` constructor now has the same form as the `Class` and `Interface` constructors: It
  takes an array of subnodes. Unlike classes/interfaces, traits can only have a `stmts` subnode.
* The `NodeDumper` now prints class/method/property/constant modifiers, as well as the include and
  use type in a textual representation, instead of only showing the number.
* All methods on `PrettyPrinter\Standard` are now protected. Previously most of them were public.

### Removed

* Removed support for running on PHP 5.4. It is however still possible to parse PHP 5.2-5.4 code
  while running on a newer version.
* The deprecated `Comment::setLine()` and `Comment::setText()` methods have been removed.
* The deprecated `Name::set()`, `Name::setFirst()` and `Name::setLast()` methods have been removed.

Version 2.1.1 (2016-09-16)
--------------------------

### Changed

* The pretty printer will now escape all control characters in the range `\x00-\x1F` inside double
  quoted strings. If no special escape sequence is available, an octal escape will be used.
* The quality of the error recovery has been improved. In particular unterminated expressions should
  be handled more gracefully.
* The PHP 7 parser will now generate a parse error for `$var =& new Obj` assignments.
* Comments on free-standing code blocks will no be retained as comments on the first statement in
  the code block.

Version 2.1.0 (2016-04-19)
--------------------------

### Fixed

* Properly support `B""` strings (with uppercase `B`) in a number of places.
* Fixed reformatting of indented parts in a certain non-standard comment style.

### Added

* Added `dumpComments` option to node dumper, to enable dumping of comments associated with nodes.
* Added `Stmt\Nop` node, that is used to collect comments located at the end of a block or at the
  end of a file (without a following node with which they could otherwise be associated).
* Added `kind` attribute to `Expr\Exit` to distinguish between `exit` and `die`.
* Added `kind` attribute to `Scalar\LNumber` to distinguish between decimal, binary, octal and
  hexadecimal numbers.
* Added `kind` attribute to `Expr\Array` to distinguish between `array()` and `[]`.
* Added `kind` attribute to `Scalar\String` and `Scalar\Encapsed` to distinguish between
  single-quoted, double-quoted, heredoc and nowdoc string.
* Added `docLabel` attribute to `Scalar\String` and `Scalar\Encapsed`, if it is a heredoc or
  nowdoc string.
* Added start file offset information to `Comment` nodes.
* Added `setReturnType()` method to function and method builders.
* Added `-h` and `--help` options to `php-parse` script.

### Changed

* Invalid octal literals now throw a parse error in PHP 7 mode.
* The pretty printer takes all the new attributes mentioned in the previous section into account.
* The protected `AbstractPrettyPrinter::pComments()` method no longer returns a trailing newline.
* The bundled autoloader supports library files being stored in a different directory than
  `PhpParser` for easier downstream distribution.

### Deprecated

* The `Comment::setLine()` and `Comment::setText()` methods have been deprecated. Construct new
  objects instead.

### Removed

* The internal (but public) method `Scalar\LNumber::parse()` has been removed. A non-internal
  `LNumber::fromString()` method has been added instead.

Version 2.0.1 (2016-02-28)
--------------------------

### Fixed

* `declare() {}` and `declare();` are not semantically equivalent and will now result in different
  ASTs. The format case will have an empty `stmts` array, while the latter will set `stmts` to
  `null`.
* Magic constants are now supported as semi-reserved keywords.
* A shebang line like `#!/usr/bin/env php` is now allowed at the start of a namespaced file.
  Previously this generated an exception.
* The `prettyPrintFile()` method will not strip a trailing `?>` from the raw data that follows a
  `__halt_compiler()` statement.
* The `prettyPrintFile()` method will not strip an opening `<?php` if the file starts with a
  comment followed by InlineHTML.

Version 2.0.0 (2015-12-04)
--------------------------

### Changed

* String parts of encapsed strings are now represented using `Scalar\EncapsStringPart` nodes.
  Previously raw strings were used. This affects the `parts` child of `Scalar\Encaps` and
  `Expr\ShellExec`. The change has been done to allow assignment of attributes to encapsed string
  parts.

Version 2.0.0-beta1 (2015-10-21)
--------------------------------

### Fixed

* Fixed issue with too many newlines being stripped at the end of heredoc/nowdoc strings in some
  cases. (#227)

### Changed

* Update group use support to be in line with recent PHP 7.0 builds.
* Renamed `php-parse.php` to `php-parse` and registered it as a composer bin.
* Use composer PSR-4 autoloader instead of custom autoloader.
* Specify phpunit as a dev dependency.

### Added

* Added `shortArraySyntax` option to pretty printer, to print all arrays using short syntax.

Version 2.0.0-alpha1 (2015-07-14)
---------------------------------

A more detailed description of backwards incompatible changes can be found in the
[upgrading guide](UPGRADE-2.0.md).

### Removed

* Removed support for running on PHP 5.3. It is however still possible to parse PHP 5.2 and PHP 5.3
  code while running on a newer version.
* Removed legacy class name aliases. This includes the old non-namespaced class names and the old
  names for classes that were renamed for PHP 7 compatibility.
* Removed support for legacy node format. All nodes must have a `getSubNodeNames()` method now.

### Added

* Added support for remaining PHP 7 features that were not present in 1.x:
  * Group use declarations. These are represented using `Stmt\GroupUse` nodes. Furthermore a `type`
    attribute was added to `Stmt\UseUse` to handle mixed group use declarations.
  * Uniform variable syntax.
  * Generalized yield operator.
  * Scalar type declarations. These are presented using `'bool'`, `'int'`, `'float'` and `'string'`
    as the type. The PHP 5 parser also accepts these, however they'll be `Name` instances there.
  * Unicode escape sequences.
* Added `PhpParser\ParserFactory` class, which should be used to create parser instances.
* Added `Name::concat()` which concatenates two names.
* Added `Name->slice()` which takes a subslice of a name.

### Changed

* `PhpParser\Parser` is now an interface, implemented by `Parser\Php5`, `Parser\Php7` and
  `Parser\Multiple`. The `Multiple` parser will try multiple parsers, until one succeeds.
* Token constants are now defined on `PhpParser\Parser\Tokens` rather than `PhpParser\Parser`.
* The `Name->set()`, `Name->append()`, `Name->prepend()` and `Name->setFirst()` methods are
  deprecated in favor of `Name::concat()` and `Name->slice()`.
* The `NodeTraverser` no longer clones nodes by default. The old behavior can be restored by
  passing `true` to the constructor.
* The constructor for `Scalar` nodes no longer has a default value. E.g. `new LNumber()` should now
  be written as `new LNumber(0)`.

---

**This changelog only includes changes from the 2.0 series. For older changes see the
[1.x series changelog](https://github.com/nikic/PHP-Parser/blob/1.x/CHANGELOG.md) and the
[0.9 series changelog](https://github.com/nikic/PHP-Parser/blob/0.9/CHANGELOG.md).**


================================================
FILE: CONTRIBUTING.md
================================================
## Coding Style

This project uses PSR-12 with consistent brace placement. This means that the opening brace is
always on the same line, even for class and method declarations.

## Tools

This project uses PHP-CS-Fixer and PHPStan. You can invoke them using `make`:

```shell
make php-cs-fixer
make phpstan
```

## Adding support for new PHP syntax

1. If necessary, add emulation support for new tokens.
   * Add a new subclass of `Lexer\TokenEmulator`. Take inspiration from existing classes.
   * Add the new class to the array in `Lexer\Emulative`.
   * Add tests for the emulation in `Lexer\EmulativeTest`. You'll want to modify
     `provideTestReplaceKeywords()` for new reserved keywords and `provideTestLexNewFeatures()` for
     other emulations.
2. Add any new node classes that are needed.
3. Add support for the new syntax in `grammar/php.y`. Regenerate the parser by running
   `php grammar/rebuildParsers.php`. Use `--debug` if there are conflicts.
4. Add pretty-printing support by implementing a `pFooBar()` method in `PrettyPrinter\Standard`.
5. Add tests both in `test/code/parser` and `test/code/prettyPrinter`.
6. Add support for formatting-preserving pretty-printing. This is done by modifying the data tables
   at the end of `PrettyPrinterAbstract`. Add a test in `test/code/formatPreservation`.
7. Does the new syntax feature namespaced names? If so, add support for name resolution in
   `NodeVisitor\NameResolver`. Test it in `NodeVisitor\NameResolverTest`.
8. Does the new syntax require any changes to builders? Is so, make them :)


================================================
FILE: LICENSE
================================================
BSD 3-Clause License

Copyright (c) 2011, Nikita Popov
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived from
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: Makefile
================================================
.PHONY: phpstan php-cs-fixer

tools/vendor:
	composer install -d tools

phpstan: tools/vendor
	php tools/vendor/bin/phpstan

php-cs-fixer: tools/vendor
	php tools/vendor/bin/php-cs-fixer fix

tests:
	php vendor/bin/phpunit

================================================
FILE: README.md
================================================
PHP Parser
==========

[![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master)

This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and
manipulation.

[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.4, with limited support for parsing PHP 5.x).

[Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3).

Features
--------

The main features provided by this library are:

 * Parsing PHP 7, and PHP 8 code into an abstract syntax tree (AST).
   * Invalid code can be parsed into a partial AST.
   * The AST contains accurate location information.
 * Dumping the AST in human-readable form.
 * Converting an AST back to PHP code.
   * Formatting can be preserved for partially changed ASTs.
 * Infrastructure to traverse and modify ASTs.
 * Resolution of namespaced names.
 * Evaluation of constant expressions.
 * Builders to simplify AST construction for code generation.
 * Converting an AST into JSON and back.

Quick Start
-----------

Install the library using [composer](https://getcomposer.org):

    php composer.phar require nikic/php-parser

Parse some PHP code into an AST and dump the result in human-readable form:

```php
<?php
use PhpParser\Error;
use PhpParser\NodeDumper;
use PhpParser\ParserFactory;

$code = <<<'CODE'
<?php

function test($foo)
{
    var_dump($foo);
}
CODE;

$parser = (new ParserFactory())->createForNewestSupportedVersion();
try {
    $ast = $parser->parse($code);
} catch (Error $error) {
    echo "Parse error: {$error->getMessage()}\n";
    return;
}

$dumper = new NodeDumper;
echo $dumper->dump($ast) . "\n";
```

This dumps an AST looking something like this:

```
array(
    0: Stmt_Function(
        attrGroups: array(
        )
        byRef: false
        name: Identifier(
            name: test
        )
        params: array(
            0: Param(
                attrGroups: array(
                )
                flags: 0
                type: null
                byRef: false
                variadic: false
                var: Expr_Variable(
                    name: foo
                )
                default: null
            )
        )
        returnType: null
        stmts: array(
            0: Stmt_Expression(
                expr: Expr_FuncCall(
                    name: Name(
                        name: var_dump
                    )
                    args: array(
                        0: Arg(
                            name: null
                            value: Expr_Variable(
                                name: foo
                            )
                            byRef: false
                            unpack: false
                        )
                    )
                )
            )
        )
    )
)
```

Let's traverse the AST and perform some kind of modification. For example, drop all function bodies:

```php
use PhpParser\Node;
use PhpParser\Node\Stmt\Function_;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;

$traverser = new NodeTraverser();
$traverser->addVisitor(new class extends NodeVisitorAbstract {
    public function enterNode(Node $node) {
        if ($node instanceof Function_) {
            // Clean out the function body
            $node->stmts = [];
        }
    }
});

$ast = $traverser->traverse($ast);
echo $dumper->dump($ast) . "\n";
```

This gives us an AST where the `Function_::$stmts` are empty:

```
array(
    0: Stmt_Function(
        attrGroups: array(
        )
        byRef: false
        name: Identifier(
            name: test
        )
        params: array(
            0: Param(
                attrGroups: array(
                )
                type: null
                byRef: false
                variadic: false
                var: Expr_Variable(
                    name: foo
                )
                default: null
            )
        )
        returnType: null
        stmts: array(
        )
    )
)
```

Finally, we can convert the new AST back to PHP code:

```php
use PhpParser\PrettyPrinter;

$prettyPrinter = new PrettyPrinter\Standard;
echo $prettyPrinter->prettyPrintFile($ast);
```

This gives us our original code, minus the `var_dump()` call inside the function:

```php
<?php

function test($foo)
{
}
```

For a more comprehensive introduction, see the documentation.

Documentation
-------------

 1. [Introduction](doc/0_Introduction.markdown)
 2. [Usage of basic components](doc/2_Usage_of_basic_components.markdown)

Component documentation:

 * [Walking the AST](doc/component/Walking_the_AST.markdown)
   * Node visitors
   * Modifying the AST from a visitor
   * Short-circuiting traversals
   * Interleaved visitors
   * Simple node finding API
   * Parent and sibling references
 * [Name resolution](doc/component/Name_resolution.markdown)
   * Name resolver options
   * Name resolution context
 * [Pretty printing](doc/component/Pretty_printing.markdown)
   * Converting AST back to PHP code
   * Customizing formatting
   * Formatting-preserving code transformations
 * [AST builders](doc/component/AST_builders.markdown)
   * Fluent builders for AST nodes
 * [Lexer](doc/component/Lexer.markdown)
   * Emulation
   * Tokens, positions and attributes
 * [Error handling](doc/component/Error_handling.markdown)
   * Column information for errors
   * Error recovery (parsing of syntactically incorrect code)
 * [Constant expression evaluation](doc/component/Constant_expression_evaluation.markdown)
   * Evaluating constant/property/etc initializers
   * Handling errors and unsupported expressions
 * [JSON representation](doc/component/JSON_representation.markdown)
   * JSON encoding and decoding of ASTs
 * [Performance](doc/component/Performance.markdown)
   * Disabling Xdebug
   * Reusing objects
   * Garbage collection impact
 * [Frequently asked questions](doc/component/FAQ.markdown)
   * Parent and sibling references

 [doc_3_x]: https://github.com/nikic/PHP-Parser/tree/3.x/doc
 [doc_4_x]: https://github.com/nikic/PHP-Parser/tree/4.x/doc
 [doc_master]: https://github.com/nikic/PHP-Parser/tree/master/doc


================================================
FILE: UPGRADE-1.0.md
================================================
Upgrading from PHP-Parser 0.9 to 1.0
====================================

### PHP version requirements

PHP-Parser now requires PHP 5.3 or newer to run. It is however still possible to *parse* PHP 5.2 source code, while
running on a newer version.

### Move to namespaced names

The library has been moved to use namespaces with the `PhpParser` vendor prefix. However, the old names using
underscores are still available as aliases, as such most code should continue running on the new version without
further changes.

Old (still works, but discouraged):

```php
$parser = new \PHPParser_Parser(new \PHPParser_Lexer_Emulative);
$prettyPrinter = new \PHPParser_PrettyPrinter_Default;
```

New:

```php
$parser = new \PhpParser\Parser(new PhpParser\Lexer\Emulative);
$prettyPrinter = new \PhpParser\PrettyPrinter\Standard;
```

Note that the `PHPParser` prefix was changed to `PhpParser`. While PHP class names are technically case-insensitive,
the autoloader will not be able to load `PHPParser\Parser` or other case variants.

Due to conflicts with reserved keywords, some class names now end with an underscore, e.g. `PHPParser_Node_Stmt_Class`
is now `PhpParser\Node\Stmt\Class_`. (But as usual, the old name is still available.)

### Changes to `Node::getType()`

The `Node::getType()` method continues to return names using underscores instead of namespace separators and also does
not contain the trailing underscore that may be present in the class name. As such its output will not change in many
cases.

However, some node classes have been moved to a different namespace or renamed, which will result in a different
`Node::getType()` output:

```
Expr_AssignBitwiseAnd => Expr_AssignOp_BitwiseAnd
Expr_AssignBitwiseOr  => Expr_AssignOp_BitwiseOr
Expr_AssignBitwiseXor => Expr_AssignOp_BitwiseXor
Expr_AssignConcat     => Expr_AssignOp_Concat
Expr_AssignDiv        => Expr_AssignOp_Div
Expr_AssignMinus      => Expr_AssignOp_Minus
Expr_AssignMod        => Expr_AssignOp_Mod
Expr_AssignMul        => Expr_AssignOp_Mul
Expr_AssignPlus       => Expr_AssignOp_Plus
Expr_AssignShiftLeft  => Expr_AssignOp_ShiftLeft
Expr_AssignShiftRight => Expr_AssignOp_ShiftRight

Expr_BitwiseAnd       => Expr_BinaryOp_BitwiseAnd
Expr_BitwiseOr        => Expr_BinaryOp_BitwiseOr
Expr_BitwiseXor       => Expr_BinaryOp_BitwiseXor
Expr_BooleanAnd       => Expr_BinaryOp_BooleanAnd
Expr_BooleanOr        => Expr_BinaryOp_BooleanOr
Expr_Concat           => Expr_BinaryOp_Concat
Expr_Div              => Expr_BinaryOp_Div
Expr_Equal            => Expr_BinaryOp_Equal
Expr_Greater          => Expr_BinaryOp_Greater
Expr_GreaterOrEqual   => Expr_BinaryOp_GreaterOrEqual
Expr_Identical        => Expr_BinaryOp_Identical
Expr_LogicalAnd       => Expr_BinaryOp_LogicalAnd
Expr_LogicalOr        => Expr_BinaryOp_LogicalOr
Expr_LogicalXor       => Expr_BinaryOp_LogicalXor
Expr_Minus            => Expr_BinaryOp_Minus
Expr_Mod              => Expr_BinaryOp_Mod
Expr_Mul              => Expr_BinaryOp_Mul
Expr_NotEqual         => Expr_BinaryOp_NotEqual
Expr_NotIdentical     => Expr_BinaryOp_NotIdentical
Expr_Plus             => Expr_BinaryOp_Plus
Expr_ShiftLeft        => Expr_BinaryOp_ShiftLeft
Expr_ShiftRight       => Expr_BinaryOp_ShiftRight
Expr_Smaller          => Expr_BinaryOp_Smaller
Expr_SmallerOrEqual   => Expr_BinaryOp_SmallerOrEqual

Scalar_ClassConst     => Scalar_MagicConst_Class
Scalar_DirConst       => Scalar_MagicConst_Dir
Scalar_FileConst      => Scalar_MagicConst_File
Scalar_FuncConst      => Scalar_MagicConst_Function
Scalar_LineConst      => Scalar_MagicConst_Line
Scalar_MethodConst    => Scalar_MagicConst_Method
Scalar_NSConst        => Scalar_MagicConst_Namespace
Scalar_TraitConst     => Scalar_MagicConst_Trait
```

These changes may affect custom pretty printers and code comparing the return value of `Node::getType()` to specific
strings.

### Miscellaneous

  * The classes `Template` and `TemplateLoader` have been removed. You should use some other [code generation][code_gen]
    project built on top of PHP-Parser instead.

  * The `PrettyPrinterAbstract::pStmts()` method now emits a leading newline if the statement list is not empty.
    Custom pretty printers should remove the explicit newline before `pStmts()` calls.

    Old:

    ```php
    public function pStmt_Trait(PHPParser_Node_Stmt_Trait $node) {
        return 'trait ' . $node->name
             . "\n" . '{' . "\n" . $this->pStmts($node->stmts) . "\n" . '}';
    }
    ```

    New:

    ```php
    public function pStmt_Trait(Stmt\Trait_ $node) {
        return 'trait ' . $node->name
             . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}';
    }
    ```

  [code_gen]: https://github.com/nikic/PHP-Parser/wiki/Projects-using-the-PHP-Parser#code-generation

================================================
FILE: UPGRADE-2.0.md
================================================
Upgrading from PHP-Parser 1.x to 2.0
====================================

### PHP version requirements

PHP-Parser now requires PHP 5.4 or newer to run. It is however still possible to *parse* PHP 5.2 and
PHP 5.3 source code, while running on a newer version.

### Creating a parser instance

Parser instances should now be created through the `ParserFactory`. Old direct instantiation code
will not work, because the parser class was renamed.

Old:

```php
use PhpParser\Parser, PhpParser\Lexer;
$parser = new Parser(new Lexer\Emulative);
```

New:

```php
use PhpParser\ParserFactory;
$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
```

The first argument to `ParserFactory` determines how different PHP versions are handled. The
possible values are:

 * `ParserFactory::PREFER_PHP7`: Try to parse code as PHP 7. If this fails, try to parse it as PHP 5.
 * `ParserFactory::PREFER_PHP5`: Try to parse code as PHP 5. If this fails, try to parse it as PHP 7.
 * `ParserFactory::ONLY_PHP7`: Parse code as PHP 7.
 * `ParserFactory::ONLY_PHP5`: Parse code as PHP 5.

For most practical purposes the difference between `PREFER_PHP7` and `PREFER_PHP5` is mainly whether
a scalar type hint like `string` will be stored as `'string'` (PHP 7) or as `new Name('string')`
(PHP 5).

To use a custom lexer, pass it as the second argument to the `create()` method:

```php
use PhpParser\ParserFactory;
$lexer = new MyLexer;
$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7, $lexer);
```

### Rename of the `PhpParser\Parser` class

`PhpParser\Parser` is now an interface, which is implemented by `Parser\Php5`, `Parser\Php7` and
`Parser\Multiple`. Parser tokens are now defined in `Parser\Tokens`. If you use the `ParserFactory`
described above to create your parser instance, these changes should have no further impact on you.

### Removal of legacy aliases

All legacy aliases for classes have been removed. This includes the old non-namespaced `PHPParser_`
classes, as well as the classes that had to be renamed for PHP 7 support.

### Deprecations

The `set()`, `setFirst()`, `append()` and `prepend()` methods of the `Node\Name` class have been
deprecated. Instead `Name::concat()` and `Name->slice()` should be used.

### Miscellaneous

* The `NodeTraverser` no longer clones nodes by default. If you want to restore the old behavior,
  pass `true` to the constructor.
* The legacy node format has been removed. If you use custom nodes, they are now expected to
  implement a `getSubNodeNames()` method.
* The default value for `Scalar` node constructors was removed. This means that something like
  `new LNumber()` should be replaced by `new LNumber(0)`.
* String parts of encapsed strings are now represented using `Scalar\EncapsStringPart` nodes, while
  previously raw strings were used. This affects the `parts` child of `Scalar\Encaps` and
  `Expr\ShellExec`.

================================================
FILE: UPGRADE-3.0.md
================================================
Upgrading from PHP-Parser 2.x to 3.0
====================================

The backwards-incompatible changes in this release may be summarized as follows:

 * The specific details of the node representation have changed in some cases, primarily to
   accommodate new PHP 7.1 features.
 * There have been significant changes to the error recovery implementation. This may affect you,
   if you used the error recovery mode or have a custom lexer implementation.
 * A number of deprecated methods were removed.

### PHP version requirements

PHP-Parser now requires PHP 5.5 or newer to run. It is however still possible to *parse* PHP 5.2,
5.3 and 5.4 source code, while running on a newer version.

### Changes to the node structure

The following changes are likely to require code changes if the respective nodes are used:

 * The `List` subnode `vars` has been renamed to `items` and now contains `ArrayItem`s instead of
   plain variables.
 * The `Catch` subnode `type` has been renamed to `types` and is now an array of `Name`s.
 * The `TryCatch` subnode `finallyStmts` has been replaced with a `finally` subnode that holds an
   explicit `Finally` node.
 * The `type` subnode on `Class`, `ClassMethod` and `Property` has been renamed to `flags`. The
   `type` subnode has retained for backwards compatibility and is populated to the same value as
   `flags`. However, writes to `type` will not update `flags` and use of `type` is discouraged.

The following changes are unlikely to require code changes:

 * The `ClassConst` constructor changed to accept an additional `flags` subnode.
 * The `Trait` constructor now has the same form as the `Class` and `Interface` constructors: It
   takes an array of subnodes. Unlike classes/interfaces, traits can only have a `stmts` subnode.
 * The `Array` subnode `items` may now contain `null` elements (due to destructuring).
 * `void` and `iterable` types are now stored as strings if the PHP 7 parser is used. Previously
   these would have been represented as `Name` instances.

### Changes to error recovery mode

Previously, error recovery mode was enabled by setting the `throwOnError` option to `false` when
creating the parser, while collected errors were retrieved using the `getErrors()` method:

```php
$lexer = ...;
$parser = (new ParserFactory)->create(ParserFactor::ONLY_PHP7, $lexer, [
    'throwOnError' => true,
]);

$stmts = $parser->parse($code);
$errors = $parser->getErrors();
if ($errors) {
    handleErrors($errors);
}
processAst($stmts);
```

Both the `throwOnError` option and the `getErrors()` method have been removed in PHP-Parser 3.0.
Instead an instance of `ErrorHandler\Collecting` should be passed to the `parse()` method:

```php
$lexer = ...;
$parser = (new ParserFactory)->create(ParserFactor::ONLY_PHP7, $lexer);

$errorHandler = new ErrorHandler\Collecting;
$stmts = $parser->parse($code, $errorHandler);
if ($errorHandler->hasErrors()) {
    handleErrors($errorHandler->getErrors());
}
processAst($stmts);
```

#### Multiple parser fallback in error recovery mode

As a result of this change, if a `Multiple` parser is used (e.g. through the `ParserFactory` using
`PREFER_PHP7` or `PREFER_PHP5`), it will now return the result of the first *non-throwing* parse. As
parsing never throws in error recovery mode, the result from the first parser will always be
returned.

The PHP 7 parser is a superset of the PHP 5 parser, with the exceptions that `=& new` and
`global $$foo->bar` are not supported (other differences are in representation only). The PHP 7
parser will be able to recover from the error in both cases. For this reason, this change will
likely pass unnoticed if you do not specifically test for this syntax.

It is possible to restore the precise previous behavior with the following code:

```php
$lexer = ...;
$parser7 = new Parser\Php7($lexer);
$parser5 = new Parser\Php5($lexer);

$errors7 = new ErrorHandler\Collecting();
$stmts7 = $parser7->parse($code, $errors7);
if ($errors7->hasErrors()) {
    $errors5 = new ErrorHandler\Collecting();
    $stmts5 = $parser5->parse($code, $errors5);
    if (!$errors5->hasErrors()) {
        // If PHP 7 parse has errors but PHP 5 parse has no errors, use PHP 5 result
        return [$stmts5, $errors5];
    }
}
// If PHP 7 succeeds or both fail use PHP 7 result
return [$stmts7, $errors7];
```

#### Error handling in the lexer

In order to support recovery from lexer errors, the signature of the `startLexing()` method changed
to optionally accept an `ErrorHandler`:

```php
// OLD
public function startLexing($code);
// NEW
public function startLexing($code, ErrorHandler $errorHandler = null);
```

If you use a custom lexer with overridden `startLexing()` method, it needs to be changed to accept
the extra parameter. The value should be passed on to the parent method.

#### Error checks in node constructors

The constructors of certain nodes used to contain additional checks for semantic errors, such as
creating a try block without either catch or finally. These checks have been moved from the node
constructors into the parser. This allows recovery from such errors, as well as representing the
resulting (invalid) AST.

This means that certain error conditions are no longer checked for manually constructed nodes.

### Removed methods, arguments, options

The following methods, arguments or options have been removed:

 * `Comment::setLine()`, `Comment::setText()`: Create new `Comment` instances instead.
 * `Name::set()`, `Name::setFirst()`, `Name::setLast()`, `Name::append()`, `Name::prepend()`:
    Use `Name::concat()` in combination with `Name::slice()` instead.
 * `Error::getRawLine()`, `Error::setRawLine()`. Use `Error::getStartLine()` and
   `Error::setStartLine()` instead.
 * `Parser::getErrors()`. Use `ErrorHandler\Collecting` instead.
 * `$separator` argument of `Name::toString()`. Use `strtr()` instead, if you really need it.
 * `$cloneNodes` argument of `NodeTraverser::__construct()`. Explicitly clone nodes in the visitor
   instead.
 * `throwOnError` parser option. Use `ErrorHandler\Collecting` instead.

### Miscellaneous

 * The `NameResolver` will now resolve unqualified function and constant names in the global
   namespace into fully qualified names. For example `foo()` in the global namespace resolves to
   `\foo()`. For names where no static resolution is possible, a `namespacedName` attribute is
   added now, containing the namespaced variant of the name.
 * All methods on `PrettyPrinter\Standard` are now protected. Previously most of them were public.
   The pretty printer should only be invoked using the `prettyPrint()`, `prettyPrintFile()` and
   `prettyPrintExpr()` methods.
 * The node dumper now prints numeric values that act as enums/flags in a string representation.
   If node dumper results are used in tests, updates may be needed to account for this.
 * The constants on `NameTraverserInterface` have been moved into the `NameTraverser` class.
 * The emulative lexer now directly postprocesses tokens, instead of using `~__EMU__~` sequences.
   This changes the protected API of the emulative lexer.
 * The `Name::slice()` method now returns `null` for empty slices, previously `new Name([])` was
   used. `Name::concat()` now also supports concatenation with `null`.


================================================
FILE: UPGRADE-4.0.md
================================================
Upgrading from PHP-Parser 3.x to 4.0
====================================

### PHP version requirements

PHP-Parser now requires PHP 7.0 or newer to run. It is however still possible to *parse* PHP 5.2-5.6
source code, while running on a newer version.

HHVM is no longer actively supported.

### Changes to the node structure

* Many subnodes that previously held simple strings now store `Identifier` nodes instead (or
  `VarLikeIdentifier` nodes if they have form `$ident`). The constructors of the affected nodes will
  automatically convert strings to `Identifier`s and `Identifier`s implement `__toString()`. As such
  some code continues to work without changes, but anything using `is_string()`, type-strict
  comparisons or strict-mode may require adjustment. The following is an exhaustive list of all
  affected subnodes:

   * `Const_::$name`
   * `NullableType::$type` (for simple types)
   * `Param::$type` (for simple types)
   * `Expr\ClassConstFetch::$name`
   * `Expr\Closure::$returnType` (for simple types)
   * `Expr\MethodCall::$name`
   * `Expr\PropertyFetch::$name`
   * `Expr\StaticCall::$name`
   * `Expr\StaticPropertyFetch::$name` (uses `VarLikeIdentifier`)
   * `Stmt\Class_::$name`
   * `Stmt\ClassMethod::$name`
   * `Stmt\ClassMethod::$returnType` (for simple types)
   * `Stmt\Function_::$name`
   * `Stmt\Function_::$returnType` (for simple types)
   * `Stmt\Goto_::$name`
   * `Stmt\Interface_::$name`
   * `Stmt\Label::$name`
   * `Stmt\PropertyProperty::$name` (uses `VarLikeIdentifier`)
   * `Stmt\TraitUseAdaptation\Alias::$method`
   * `Stmt\TraitUseAdaptation\Alias::$newName`
   * `Stmt\TraitUseAdaptation\Precedence::$method`
   * `Stmt\Trait_::$name`
   * `Stmt\UseUse::$alias`

* Expression statements (`expr;`) are now represented using a `Stmt\Expression` node. Previously
  these statements were directly represented as their constituent expression.
* The `name` subnode of `Param` has been renamed to `var` and now contains a `Variable` rather than
  a plain string.
* The `name` subnode of `StaticVar` has been renamed to `var` and now contains a `Variable` rather
  than a plain string.
* The `var` subnode of `ClosureUse` now contains a `Variable` rather than a plain string.
* The `var` subnode of `Catch_` now contains a `Variable` rather than a plain string.
* The `alias` subnode of `UseUse` is now `null` if no explicit alias is given. As such,
  `use Foo\Bar` and `use Foo\Bar as Bar` are now represented differently. The `getAlias()` method
  can be used to get the effective alias, even if it is not explicitly given.

### Miscellaneous

* The indentation handling in the pretty printer has been changed (this is only relevant if you
  extend the pretty printer). Previously indentation was automatic, and parts were excluded using
  `pNoindent()`. Now no-indent is the default and newlines that require indentation should use
  `$this->nl`.

### Removed functionality

* Removed `type` subnode on `Class_`, `ClassMethod` and `Property` nodes. Use `flags` instead.
* The `ClassConst::isStatic()` method has been removed. Constants cannot have a static modifier.
* The `NodeTraverser` no longer accepts `false` as a return value from a `leaveNode()` method.
  `NodeTraverser::REMOVE_NODE` should be returned instead.
* The `Node::setLine()` method has been removed. If you really need to, you can use `setAttribute()`
  instead.
* The misspelled `Class_::VISIBILITY_MODIFER_MASK` constant has been dropped in favor of
  `Class_::VISIBILITY_MODIFIER_MASK`.
* The XML serializer has been removed. As such, the classes `Serializer\XML`, and
  `Unserializer\XML`, as well as the interfaces `Serializer` and `Unserializer` no longer exist.
* The `BuilderAbstract` class has been removed. It's functionality is moved into `BuilderHelpers`.
  However, this is an internal class and should not be used directly.
* The `Autoloader` class has been removed in favor of relying on the Composer autoloader.


================================================
FILE: UPGRADE-5.0.md
================================================
Upgrading from PHP-Parser 4.x to 5.0
====================================

### PHP version requirements

PHP-Parser now requires PHP 7.4 or newer to run. It is however still possible to *parse* code for older versions, while running on a newer version.

### PHP 5 parsing support

The dedicated parser for PHP 5 has been removed. The PHP 7 parser now accepts a `PhpVersion` argument, which can be used to improve compatibility with older PHP versions.

In particular, if an older `PhpVersion` is specified, then:

 * For versions before PHP 7.0, `$foo =& new Bar()` assignments are allowed without error.
 * For versions before PHP 7.0, invalid octal literals `089` are allowed without error.
 * For versions before PHP 7.0, unicode escape sequences `\u{123}` in strings are not parsed.
 * Type hints are interpreted as a class `Name` or as a built-in `Identifier` depending on PHP
   version, for example `int` is treated as a class name on PHP 5.6 and as a built-in on PHP 7.0.

However, some aspects of PHP 5 parsing are no longer supported:

 * Some variables like `$$foo[0]` are valid in both PHP 5 and PHP 7, but have different interpretation. In that case, the PHP 7 AST will always be constructed (`($$foo)[0]` rather than `${$foo[0]}`).
 * Declarations of the form `global $$var[0]` are not supported in PHP 7 and will cause a parse error. In error recovery mode, it is possible to continue parsing after such declarations.
 * The PHP 7 parser will accept many constructs that are not valid in PHP 5. However, this was also true of the dedicated PHP 5 parser.

The following symbols are affected by this removal:

 * The `PhpParser\Parser\Php5` class has been removed.
 * The `PhpParser\Parser\Multiple` class has been removed. While not strictly related to PHP 5 support, this functionality is no longer useful without it.
 * The `PhpParser\ParserFactory::ONLY_PHP5` and `PREFER_PHP5` options have been removed.

### Changes to the parser factory

The `ParserFactory::create()` method has been removed in favor of three new methods that provide more fine-grained control over the PHP version being targeted:

 * `createForNewestSupportedVersion()`: Use this if you don't know the PHP version of the code you're parsing. It's better to assume a too new version than a too old one.
 * `createForHostVersion()`: Use this if you're parsing code for the PHP version you're running on.
 * `createForVersion()`: Use this if you know the PHP version of the code you want to parse.

The `createForNewestSupportedVersion()` and `createForHostVersion()` are available since PHP-Parser 4.18.0, to allow libraries to support PHP-Parser 4 and 5 at the same time more easily.

In all cases, the PHP version is a fairly weak hint that is only used on a best-effort basis. The parser will usually accept code for newer versions if it does not have any backwards-compatibility implications.

For example, if you specify version `"8.0"`, then `class ReadOnly {}` is treated as a valid class declaration, while using `public readonly int $prop` will lead to a parse error. However, `final public const X = Y;` will be accepted in both cases.

```php
use PhpParser\ParserFactory;
use PhpParser\PhpVersion;

$factory = new ParserFactory();

# Before
$parser = $factory->create(ParserFactory::PREFER_PHP7);

# After (this is roughly equivalent to PREFER_PHP7 behavior)
$parser = $factory->createForNewestSupportedVersion();
# Or
$parser = $factory->createForHostVersion();

# Before
$parser = $factory->create(ParserFactory::ONLY_PHP5);
# After (supported on a best-effort basis)
$parser = $factory->createForVersion(PhpVersion::fromString("5.6"));
```

### Changes to the throw representation

Previously, `throw` statements like `throw $e;` were represented using the `Stmt\Throw_` class,
while uses inside other expressions (such as `$x ?? throw $e`) used the `Expr\Throw_` class.

Now, `throw $e;` is represented as a `Stmt\Expression` that contains an `Expr\Throw_`. The
`Stmt\Throw_` class has been removed.

```php
# Code
throw $e;

# Before
Stmt_Throw(
    expr: Expr_Variable(
        name: e
    )
)

# After
Stmt_Expression(
    expr: Expr_Throw(
        expr: Expr_Variable(
            name: e
        )
    )
)
```

### Changes to the array destructuring representation

Previously, the `list($x) = $y` destructuring syntax was represented using a `Node\Expr\List_`
node, while `[$x] = $y` used a `Node\Expr\Array_` node, the same used for the creation (rather than
destructuring) of arrays.

Now, destructuring is always represented using `Node\Expr\List_`. The `kind` attribute with value
`Node\Expr\List_::KIND_LIST` or `Node\Expr\List_::KIND_ARRAY` specifies which syntax was actually
used.

```php
# Code
[$x] = $y;

# Before
Expr_Assign(
   var: Expr_Array(
       items: array(
           0: Expr_ArrayItem(
               key: null
               value: Expr_Variable(
                   name: x
               )
               byRef: false
               unpack: false
           )
       )
   )
   expr: Expr_Variable(
       name: y
   )
)

# After
Expr_Assign(
   var: Expr_List(
       items: array(
           0: ArrayItem(
               key: null
               value: Expr_Variable(
                   name: x
               )
               byRef: false
               unpack: false
           )
       )
   )
   expr: Expr_Variable(
       name: y
   )
)
```

### Changes to the name representation

Previously, `Name` nodes had a `parts` subnode, which stores an array of name parts, split by
namespace separators. Now, `Name` nodes instead have a `name` subnode, which stores a plain string.

For example, the name `Foo\Bar` was previously represented by `Name(parts: ['Foo', 'Bar'])` and is
now represented by `Name(name: 'Foo\Bar')` instead.

It is possible to convert the name to the previous representation using `$name->getParts()`. The
`Name` constructor continues to accept both the string and the array representation.

The `Name::getParts()` method is available since PHP-Parser 4.16.0, to allow libraries to support
PHP-Parser 4 and 5 at the same time more easily.

### Changes to the block representation

Previously, code blocks `{ ... }` were always flattened into their parent statement list. For
example `while ($x) { $a; { $b; } $c; }` would produce the same node structure as
`if ($x) { $a; $b; $c; }`, namely a `Stmt\While_` node whose `stmts` subnode is an array of three
statements.

Now, the nested `{ $b; }` block is represented using an explicit `Stmt\Block` node. However, the
outer `{ $a; { $b; } $c; }` block is still represented using a simple array in the `stmts` subnode.

```php
# Code
while ($x) { $a; { $b; } $c; }

# Before
Stmt_While(
    cond: Expr_Variable(
        name: x
    )
    stmts: array(
        0: Stmt_Expression(
            expr: Expr_Variable(
                name: a
            )
        )
        1: Stmt_Expression(
            expr: Expr_Variable(
                name: b
            )
        )
        2: Stmt_Expression(
            expr: Expr_Variable(
                name: c
            )
        )
    )
)

# After
Stmt_While(
    cond: Expr_Variable(
        name: x
    )
    stmts: array(
        0: Stmt_Expression(
            expr: Expr_Variable(
                name: a
            )
        )
        1: Stmt_Block(
            stmts: array(
                0: Stmt_Expression(
                    expr: Expr_Variable(
                        name: b
                    )
                )
            )
        )
        2: Stmt_Expression(
            expr: Expr_Variable(
                name: c
            )
        )
    )
)
```

### Changes to comment assignment

Previously, comments were assigned to all nodes starting at the same position. Now they will be
assigned to the outermost node only.

```php
# Code
// Comment
$a + $b;

# Before
Stmt_Expression(
    expr: Expr_BinaryOp_Plus(
        left: Expr_Variable(
            name: a
            comments: array(
                0: // Comment
            )
        )
        right: Expr_Variable(
            name: b
        )
        comments: array(
            0: // Comment
        )
    )
    comments: array(
        0: // Comment
    )
)

# After
Stmt_Expression(
    expr: Expr_BinaryOp_Plus(
        left: Expr_Variable(
            name: a
        )
        right: Expr_Variable(
            name: b
        )
    )
    comments: array(
        0: // Comment
    )
)
```

### Renamed nodes

A number of AST nodes have been renamed or moved in the AST hierarchy:

 * `Node\Scalar\LNumber` is now `Node\Scalar\Int_`.
 * `Node\Scalar\DNumber` is now `Node\Scalar\Float_`.
 * `Node\Scalar\Encapsed` is now `Node\Scalar\InterpolatedString`.
 * `Node\Scalar\EncapsedStringPart` is now `Node\InterpolatedStringPart` and no longer extends
   `Node\Scalar` or `Node\Expr`.
 * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`.
 * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`.
 * `Node\Stmt\DeclareDeclare` is now `Node\DeclareItem` and no longer extends `Node\Stmt`.
 * `Node\Stmt\PropertyProperty` is now `Node\PropertyItem` and no longer extends `Node\Stmt`.
 * `Node\Stmt\StaticVar` is now `Node\StaticVar` and no longer extends `Node\Stmt`.
 * `Node\Stmt\UseUse` is now `Node\UseItem` and no longer extends `Node\Stmt`.

The old class names have been retained as aliases for backwards compatibility. However, the `Node::getType()` method will now always return the new name (e.g. `ClosureUse` instead of `Expr_ClosureUse`).

### Modifiers

Modifier flags (as used by the `$flags` subnode of `Class_`, `ClassMethod`, `Property`, etc.) are now available as class constants on a separate `PhpParser\Modifiers` class, instead of being part of `PhpParser\Node\Stmt\Class_`, to make it clearer that these are used by many different nodes. The old constants are deprecated, but are still available.

```php
PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC    -> PhpParser\Modifiers::PUBLIC
PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED -> PhpParser\Modifiers::PROTECTED
PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE   -> PhpParser\Modifiers::PRIVATE
PhpParser\Node\Stmt\Class_::MODIFIER_STATIC    -> PhpParser\Modifiers::STATIC
PhpParser\Node\Stmt\Class_::MODIFIER_ABSTRACT  -> PhpParser\Modifiers::ABSTRACT
PhpParser\Node\Stmt\Class_::MODIFIER_FINAL     -> PhpParser\Modifiers::FINAL
PhpParser\Node\Stmt\Class_::MODIFIER_READONLY  -> PhpParser\Modifiers::READONLY
PhpParser\Node\Stmt\Class_::VISIBILITY_MODIFIER_MASK -> PhpParser\Modifiers::VISIBILITY_MASK
```

### Changes to node constructors

Node constructor arguments accepting types no longer accept plain strings. Either an `Identifier` or `Name` (or `ComplexType`) should be passed instead. This affects the following constructor arguments:

* The `'returnType'` key of `$subNodes` argument of `Node\Expr\ArrowFunction`.
* The `'returnType'` key of `$subNodes` argument of `Node\Expr\Closure`.
* The `'returnType'` key of `$subNodes` argument of `Node\Stmt\ClassMethod`.
* The `'returnType'` key of `$subNodes` argument of `Node\Stmt\Function_`.
* The `$type` argument of `Node\NullableType`.
* The `$type` argument of `Node\Param`.
* The `$type` argument of `Node\Stmt\Property`.
* The `$type` argument of `Node\ClassConst`.

To follow the previous behavior, an `Identifier` should be passed, which indicates a built-in type.

### Changes to the pretty printer

A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting.

Return types are now formatted without a space before the `:`:

```php
# Before
function test() : Type
{
}

# After
function test(): Type
{
}
```

`abstract` and `final` are now printed before visibility modifiers:

```php
# Before
public abstract function test();

# After
abstract public function test();
```

A space is now printed between `use` and the following `(` for closures:

```php
# Before
function () use($var) {
};

# After
function () use ($var) {
};
```

Backslashes in single-quoted strings are now only printed if they are necessary:

```php
# Before
'Foo\\Bar';
'\\\\';

# After
'Foo\Bar';
'\\\\';
```

`else if` structures will now omit redundant parentheses:

```php
# Before
else {
    if ($x) {
        // ...
    }
}

# After
else if ($x) {
     // ...
}
```

The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defaults to PHP 7.4. The pretty printer will make formatting choices to make the code valid for that version. It currently controls the following behavior:

* For PHP >= 7.0 (default), short array syntax `[]` will be used by default. This does not affect nodes that specify an explicit array syntax using the `kind` attribute.
* For PHP >= 7.0 (default), parentheses around `yield` expressions will only be printed when necessary. Previously, parentheses were always printed, even if `yield` was used as a statement.
* For PHP >= 7.1 (default), the short array syntax `[]` will be used for destructuring by default (instead of `list()`). This does not affect nodes that specify an explicit syntax using the `kind` attribute.
* For PHP >= 7.3 (default), a newline is no longer forced after heredoc/nowdoc strings, as the requirement for this has been removed with the introduction of flexible heredoc/nowdoc strings.
* For PHP >= 7.3 (default), heredoc/nowdoc strings are now indented just like regular code. This was allowed with the introduction of flexible heredoc/nowdoc strings.

### Changes to precedence handling in the pretty printer

The pretty printer now more accurately models operator precedence. Especially for unary operators, less unnecessary parentheses will be printed. Conversely, many bugs where semantically meaningful parentheses were omitted have been fixed.

To support these changes, precedence is now handled differently in the pretty printer. The internal `p()` method, which is used to recursively print nodes, now has the following signature:
```php
protected function p(
    Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE,
    bool $parentFormatPreserved = false
): string;
```

The `$precedence` is the precedence of the direct parent operator (if any), while `$lhsPrecedence` is that precedence of the nearest binary operator on whose left-hand-side the node occurs. For unary operators, only the `$lhsPrecedence` is relevant.

Recursive calls in pretty-printer methods should generally continue calling `p()` without additional parameters. However, pretty-printer methods for operators that participate in precedence resolution need to be adjusted. For example, typical implementations for operators look as follows now:

```php
protected function pExpr_BinaryOp_Plus(
    BinaryOp\Plus $node, int $precedence, int $lhsPrecedence
): string {
    return $this->pInfixOp(
        BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence);
}

protected function pExpr_UnaryPlus(
    Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence
): string {
    return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence);
}
```

The new `$precedence` and `$lhsPrecedence` arguments need to be passed down to the `pInfixOp()`, `pPrefixOp()` and `pPostfixOp()` methods.

### Changes to the node traverser

If there are multiple visitors, the node traverser will now call `leaveNode()` and `afterTraverse()` methods in the reverse order of the corresponding `enterNode()` and `beforeTraverse()` calls:

```php
# Before
$visitor1->enterNode($node);
$visitor2->enterNode($node);
$visitor1->leaveNode($node);
$visitor2->leaveNode($node);

# After
$visitor1->enterNode($node);
$visitor2->enterNode($node);
$visitor2->leaveNode($node);
$visitor1->leaveNode($node);
```

Additionally, the special `NodeVisitor` return values have been moved from `NodeTraverser` to `NodeVisitor`. The old names are deprecated, but still available.

```php
PhpParser\NodeTraverser::REMOVE_NODE -> PhpParser\NodeVisitor::REMOVE_NODE
PhpParser\NodeTraverser::DONT_TRAVERSE_CHILDREN -> PhpParser\NodeVisitor::DONT_TRAVERSE_CHILDREN
PhpParser\NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN -> PhpParser\NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN
PhpParser\NodeTraverser::STOP_TRAVERSAL -> PhpParser\NodeVisitor::STOP_TRAVERSAL
```

Visitors can now also be passed directly to the `NodeTraverser` constructor:

```php
# Before (and still supported)
$traverser = new NodeTraverser();
$traverser->addVisitor(new NameResolver());

# After
$traverser = new NodeTraverser(new NameResolver());
```

### Changes to token representation

Tokens are now internally represented using the `PhpParser\Token` class, which exposes the same base interface as
the `PhpToken` class introduced in PHP 8.0. On PHP 8.0 or newer, `PhpParser\Token` extends from `PhpToken`, otherwise
it extends from a polyfill implementation. The most important parts of the interface may be summarized as follows:

```php
class Token {
    public int $id;
    public string $text;
    public int $line;
    public int $pos;

    public function is(int|string|array $kind): bool;
}
```

The token array is now an array of `Token`s, rather than an array of arrays and strings.
Additionally, the token array is now terminated by a sentinel token with ID 0.

### Changes to the lexer

The lexer API is reduced to a single `Lexer::tokenize()` method, which returns an array of tokens. The `startLexing()` and `getNextToken()` methods have been removed.

Responsibility for determining start and end attributes for nodes has been moved from the lexer to the parser. The lexer no longer accepts an options array. The `usedAttributes` option has been removed without replacement, and the parser will now unconditionally add the `comments`, `startLine`, `endLine`, `startFilePos`, `endFilePos`, `startTokenPos` and `endTokenPos` attributes.

There should no longer be a need to directly interact with the `Lexer` for end users, as the `ParserFactory` will create an appropriate instance, and no additional configuration of the lexer is necessary. To use formatting-preserving pretty printing, the setup boilerplate changes as follows:

```php
# Before

$lexer = new Lexer\Emulative([
    'usedAttributes' => [
        'comments',
        'startLine', 'endLine',
        'startTokenPos', 'endTokenPos',
    ],
]);

$parser = new Parser\Php7($lexer);
$oldStmts = $parser->parse($code);
$oldTokens = $lexer->getTokens();

$traverser = new NodeTraverser();
$traverser->addVisitor(new NodeVisitor\CloningVisitor());
$newStmts = $traverser->traverse($oldStmts);

# After

$parser = (new ParserFactory())->createForNewestSupportedVersion();
$oldStmts = $parser->parse($code);
$oldTokens = $parser->getTokens();

$traverser = new NodeTraverser(new NodeVisitor\CloningVisitor());
$newStmts = $traverser->traverse($oldStmts);
```

### Miscellaneous changes

 * The deprecated `Builder\Param::setTypeHint()` method has been removed in favor of `Builder\Param::setType()`.
 * The deprecated `Error` constructor taking a start line has been removed. Pass `['startLine' => $startLine]` attributes instead.
 * The deprecated `Comment::getLine()`, `Comment::getTokenPos()` and `Comment::getFilePos()` methods have been removed. Use `Comment::getStartLine()`, `Comment::getStartTokenPos()` and `Comment::getStartFilePos()` instead.
 * `Comment::getReformattedText()` now normalizes CRLF newlines to LF newlines.
 * The `Node::getLine()` method has been deprecated. Use `Node::getStartLine()` instead.


================================================
FILE: bin/php-parse
================================================
#!/usr/bin/env php
<?php

foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {
    if (file_exists($file)) {
        require $file;
        break;
    }
}

ini_set('xdebug.max_nesting_level', 3000);

// Disable Xdebug var_dump() output truncation
ini_set('xdebug.var_display_max_children', -1);
ini_set('xdebug.var_display_max_data', -1);
ini_set('xdebug.var_display_max_depth', -1);

list($operations, $files, $attributes) = parseArgs($argv);

/* Dump nodes by default */
if (empty($operations)) {
    $operations[] = 'dump';
}

if (empty($files)) {
    showHelp("Must specify at least one file.");
}

$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version']);
$dumper = new PhpParser\NodeDumper([
    'dumpComments' => true,
    'dumpPositions' => $attributes['with-positions'],
]);
$prettyPrinter = new PhpParser\PrettyPrinter\Standard;

$traverser = new PhpParser\NodeTraverser();
$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver);

foreach ($files as $file) {
    if ($file === '-') {
        $code = file_get_contents('php://stdin');
        fwrite(STDERR, "====> Stdin:\n");
    } else if (strpos($file, '<?php') === 0) {
        $code = $file;
        fwrite(STDERR, "====> Code $code\n");
    } else {
        if (!file_exists($file)) {
            fwrite(STDERR, "File $file does not exist.\n");
            exit(1);
        }

        $code = file_get_contents($file);
        fwrite(STDERR, "====> File $file:\n");
    }

    if ($attributes['with-recovery']) {
        $errorHandler = new PhpParser\ErrorHandler\Collecting;
        $stmts = $parser->parse($code, $errorHandler);
        foreach ($errorHandler->getErrors() as $error) {
            $message = formatErrorMessage($error, $code, $attributes['with-column-info']);
            fwrite(STDERR, $message . "\n");
        }
        if (null === $stmts) {
            continue;
        }
    } else {
        try {
            $stmts = $parser->parse($code);
        } catch (PhpParser\Error $error) {
            $message = formatErrorMessage($error, $code, $attributes['with-column-info']);
            fwrite(STDERR, $message . "\n");
            exit(1);
        }
    }

    foreach ($operations as $operation) {
        if ('dump' === $operation) {
            fwrite(STDERR, "==> Node dump:\n");
            echo $dumper->dump($stmts, $code), "\n";
        } elseif ('pretty-print' === $operation) {
            fwrite(STDERR, "==> Pretty print:\n");
            echo $prettyPrinter->prettyPrintFile($stmts), "\n";
        } elseif ('json-dump' === $operation) {
            fwrite(STDERR, "==> JSON dump:\n");
            echo json_encode($stmts, JSON_PRETTY_PRINT), "\n";
        } elseif ('var-dump' === $operation) {
            fwrite(STDERR, "==> var_dump():\n");
            var_dump($stmts);
        } elseif ('resolve-names' === $operation) {
            fwrite(STDERR, "==> Resolved names.\n");
            $stmts = $traverser->traverse($stmts);
        }
    }
}

function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) {
    if ($withColumnInfo && $e->hasColumnInfo()) {
        return $e->getMessageWithColumnInfo($code);
    } else {
        return $e->getMessage();
    }
}

function showHelp($error = '') {
    if ($error) {
        fwrite(STDERR, $error . "\n\n");
    }
    fwrite($error ? STDERR : STDOUT, <<<'OUTPUT'
Usage: php-parse [operations] file1.php [file2.php ...]
   or: php-parse [operations] "<?php code"
Turn PHP source code into an abstract syntax tree.

Operations is a list of the following options (--dump by default):

    -d, --dump              Dump nodes using NodeDumper
    -p, --pretty-print      Pretty print file using PrettyPrinter\Standard
    -j, --json-dump         Print json_encode() result
        --var-dump          var_dump() nodes (for exact structure)
    -N, --resolve-names     Resolve names using NodeVisitor\NameResolver
    -c, --with-column-info  Show column-numbers for errors (if available)
    -P, --with-positions    Show positions in node dumps
    -r, --with-recovery     Use parsing with error recovery
        --version=VERSION   Target specific PHP version (default: newest)
    -h, --help              Display this page

Example:
    php-parse -d -p -N -d file.php

    Dumps nodes, pretty prints them, then resolves names and dumps them again.


OUTPUT
    );
    exit($error ? 1 : 0);
}

function parseArgs($args) {
    $operations = [];
    $files = [];
    $attributes = [
        'with-column-info' => false,
        'with-positions' => false,
        'with-recovery' => false,
        'version' => PhpParser\PhpVersion::getNewestSupported(),
    ];

    array_shift($args);
    $parseOptions = true;
    foreach ($args as $arg) {
        if (!$parseOptions) {
            $files[] = $arg;
            continue;
        }

        switch ($arg) {
            case '--dump':
            case '-d':
                $operations[] = 'dump';
                break;
            case '--pretty-print':
            case '-p':
                $operations[] = 'pretty-print';
                break;
            case '--json-dump':
            case '-j':
                $operations[] = 'json-dump';
                break;
            case '--var-dump':
                $operations[] = 'var-dump';
                break;
            case '--resolve-names':
            case '-N':
                $operations[] = 'resolve-names';
                break;
            case '--with-column-info':
            case '-c':
                $attributes['with-column-info'] = true;
                break;
            case '--with-positions':
            case '-P':
                $attributes['with-positions'] = true;
                break;
            case '--with-recovery':
            case '-r':
                $attributes['with-recovery'] = true;
                break;
            case '--help':
            case '-h':
                showHelp();
                break;
            case '--':
                $parseOptions = false;
                break;
            default:
                if (preg_match('/^--version=(.*)$/', $arg, $matches)) {
                    $attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]);
                } elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) {
                    showHelp("Invalid operation $arg.");
                } else {
                    $files[] = $arg;
                }
        }
    }

    return [$operations, $files, $attributes];
}


================================================
FILE: composer.json
================================================
{
    "name": "nikic/php-parser",
    "type": "library",
    "description": "A PHP parser written in PHP",
    "keywords": [
        "php",
        "parser"
    ],
    "license": "BSD-3-Clause",
    "authors": [
        {
            "name": "Nikita Popov"
        }
    ],
    "require": {
        "php": ">=7.4",
        "ext-tokenizer": "*",
        "ext-json": "*",
        "ext-ctype": "*"
    },
    "require-dev": {
        "phpunit/phpunit": "^9.0",
        "ircmaxell/php-yacc": "^0.0.7"
    },
    "extra": {
        "branch-alias": {
            "dev-master": "5.x-dev"
        }
    },
    "autoload": {
        "psr-4": {
            "PhpParser\\": "lib/PhpParser"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "PhpParser\\": "test/PhpParser/"
        }
    },
    "bin": [
        "bin/php-parse"
    ]
}


================================================
FILE: doc/0_Introduction.markdown
================================================
Introduction
============

This project is a PHP parser **written in PHP itself**.

What is this for?
-----------------

A parser is useful for [static analysis][0], manipulation of code and basically any other
application dealing with code programmatically. A parser constructs an [Abstract Syntax Tree][1]
(AST) of the code and thus allows dealing with it in an abstract and robust way.

There are other ways of processing source code. One that PHP supports natively is using the
token stream generated by [`token_get_all`][2]. The token stream is much more low level than
the AST and thus has different applications: It allows to also analyze the exact formatting of
a file. On the other hand, the token stream is much harder to deal with for more complex analysis.
For example, an AST abstracts away the fact that, in PHP, variables can be written as `$foo`, but also
as `$$bar`, `${'foobar'}` or even `${!${''}=barfoo()}`. You don't have to worry about recognizing
all the different syntaxes from a stream of tokens.

Another question is: Why would I want to have a PHP parser *written in PHP*? Well, PHP might not be
a language especially suited for fast parsing, but processing the AST is much easier in PHP than it
would be in other, faster languages like C. Furthermore the people most likely wanting to do
programmatic PHP code analysis are incidentally PHP developers, not C developers.

What can it parse?
------------------

The parser supports parsing PHP 7 and PHP 8 code, with the following exceptions:

 * Namespaced names containing whitespace (e.g. `Foo \ Bar` instead of `Foo\Bar`) are not supported.
   These are illegal in PHP 8, but are legal in earlier versions. However, PHP-Parser does not
   support them for any version.

PHP-Parser 4.x had full support for parsing PHP 5. PHP-Parser 5.x has only limited support, with the
following caveats:

 * Some variable expressions like `$$foo[0]` are valid in both PHP 5 and PHP 7, but have different 
   interpretation. In such cases, the PHP 7 AST will always be constructed (using `($$foo)[0]`
   rather than `${$foo[0]}`).
 * Declarations of the form `global $$var[0]` are not supported in PHP 7 and will cause a parse 
   error. In error recovery mode, it is possible to continue parsing after such declarations.

As the parser is based on the tokens returned by `token_get_all` (which is only able to lex the PHP
version it runs on), additionally a wrapper for emulating tokens from newer versions is provided.
This allows to parse PHP 8.4 source code running on PHP 7.4, for example. This emulation is not
perfect, but works well in practice.

Finally, it should be noted that the parser aims to accept all valid code, not reject all invalid
code. It will generally accept code that is only valid in newer versions (even when targeting an
older one), and accept code that is syntactically correct, but would result in a compiler error.

What output does it produce?
----------------------------

The parser produces an [Abstract Syntax Tree][1] (AST) also known as a node tree. How this looks
can best be seen in an example. The program `<?php echo 'Hi', 'World';` will give you a node tree
roughly looking like this:

```
array(
    0: Stmt_Echo(
        exprs: array(
            0: Scalar_String(
                value: Hi
            )
            1: Scalar_String(
                value: World
            )
        )
    )
)
```

This matches the structure of the code: An echo statement, which takes two strings as expressions,
with the values `Hi` and `World`.

You can also see that the AST does not contain any whitespace information (but most comments are saved).
However, it does retain accurate position information, which can be used to inspect precise formatting.

What else can it do?
--------------------

Apart from the parser itself, this package also bundles support for some other, related features:

 * Support for pretty printing, which is the act of converting an AST into PHP code. Please note
   that "pretty printing" does not imply that the output is especially pretty. It's just how it's
   called ;)
 * Support for serializing and unserializing the node tree to JSON.
 * Support for dumping the node tree in a human-readable form (see the section above for an
   example of how the output looks like).
 * Infrastructure for traversing and changing the AST (node traverser and node visitors).
 * A node visitor for resolving namespaced names.

 [0]: http://en.wikipedia.org/wiki/Static_program_analysis
 [1]: http://en.wikipedia.org/wiki/Abstract_syntax_tree
 [2]: http://php.net/token_get_all


================================================
FILE: doc/2_Usage_of_basic_components.markdown
================================================
Usage of basic components
=========================

This document explains how to use the parser, the pretty printer and the node traverser.

Bootstrapping
-------------

To bootstrap the library, include the autoloader generated by composer:

```php
require 'path/to/vendor/autoload.php';
```

Additionally, you may want to set the `xdebug.max_nesting_level` ini option to a higher value:

```php
ini_set('xdebug.max_nesting_level', 3000);
```

This ensures that there will be no errors when traversing highly nested node trees. However, it is
preferable to disable Xdebug completely, as it can easily make this library more than five times
slower.

Parsing
-------

In order to parse code, you first have to create a parser instance:

```php
use PhpParser\ParserFactory;
use PhpParser\PhpVersion;

// Parser for the version you are running on.
$parser = (new ParserFactory())->createForHostVersion();

// Parser for the newest PHP version supported by the PHP-Parser library.
$parser = (new ParserFactory())->createForNewestSupportedVersion();

// Parser for a specific PHP version.
$parser = (new ParserFactory())->createForVersion(PhpVersion::fromString('8.1'));
```

Which version you should target depends on your use case. In many cases you will want to use the
host version, as people typically analyze code for the version they are running on. However, when
analyzing arbitrary code you are usually best off using the newest supported version, which tends
to accept the widest range of code (unless there are breaking changes in PHP).

The `createXYZ()` methods optionally accept an array of lexer options. Some use cases that require
customized lexer options are discussed in the [lexer documentation](component/Lexer.markdown).

Subsequently, you can pass PHP code (including the opening `<?php` tag) to the `parse()` method in
order to create a syntax tree. If a syntax error is encountered, a `PhpParser\Error` exception will
be thrown by default:

```php
<?php
use PhpParser\Error;
use PhpParser\ParserFactory;

$code = <<<'CODE'
<?php
function printLine($msg) {
    echo $msg, "\n";
}
printLine('Hello World!!!');
CODE;

$parser = (new ParserFactory())->createForHostVersion();

try {
    $stmts = $parser->parse($code);
    // $stmts is an array of statement nodes
} catch (Error $e) {
    echo 'Parse Error: ', $e->getMessage(), "\n";
}
```

A parser instance can be reused to parse multiple files.

Node dumping
------------

To dump the abstract syntax tree in human-readable form, a `NodeDumper` can be used:

```php
<?php
use PhpParser\NodeDumper;

$nodeDumper = new NodeDumper;
echo $nodeDumper->dump($stmts), "\n";
```

For the sample code from the previous section, this will produce the following output:

```
array(
    0: Stmt_Function(
        attrGroups: array(
        )
        byRef: false
        name: Identifier(
            name: printLine
        )
        params: array(
            0: Param(
                attrGroups: array(
                )
                flags: 0
                type: null
                byRef: false
                variadic: false
                var: Expr_Variable(
                    name: msg
                )
                default: null
            )
        )
        returnType: null
        stmts: array(
            0: Stmt_Echo(
                exprs: array(
                    0: Expr_Variable(
                        name: msg
                    )
                    1: Scalar_String(
                        value:

                    )
                )
            )
        )
    )
    1: Stmt_Expression(
        expr: Expr_FuncCall(
            name: Name(
                name: printLine
            )
            args: array(
                0: Arg(
                    name: null
                    value: Scalar_String(
                        value: Hello World!!!
                    )
                    byRef: false
                    unpack: false
                )
            )
        )
    )
)
```

You can also use the `php-parse` script to obtain such a node dump by calling it either with a file
name or code string:

```sh
vendor/bin/php-parse file.php
vendor/bin/php-parse "<?php foo();"
```

This can be very helpful if you want to quickly check how certain syntax is represented in the AST.

Node tree structure
-------------------

Looking at the node dump above, you can see that `$stmts` for this example code is an array of two
nodes, a `Stmt_Function` and a `Stmt_Expression`. The corresponding class names are:

 * `Stmt_Function -> PhpParser\Node\Stmt\Function_`
 * `Stmt_Expression -> PhpParser\Node\Stmt\Expression`

The additional `_` at the end of the first class name is necessary, because `Function` is a
reserved keyword. Many node class names in this library have a trailing `_` to avoid clashing with
a keyword.

As PHP is a large language there are approximately 140 different nodes. In order to make working
with them easier they are grouped into three categories:

 * `PhpParser\Node\Stmt`s are statement nodes, i.e. language constructs that do not return
   a value and can not occur in an expression. For example a class definition is a statement.
   It doesn't return a value, and you can't write something like `func(class A {});`.
 * `PhpParser\Node\Expr`s are expression nodes, i.e. language constructs that return a value
   and thus can occur in other expressions. Examples of expressions are `$var`
   (`PhpParser\Node\Expr\Variable`) and `func()` (`PhpParser\Node\Expr\FuncCall`).
 * `PhpParser\Node\Scalar`s are nodes representing scalar values, like `'string'`
   (`PhpParser\Node\Scalar\String_`), `0` (`PhpParser\Node\Scalar\LNumber`) or magic constants
   like `__FILE__` (`PhpParser\Node\Scalar\MagicConst\File`). All `PhpParser\Node\Scalar`s extend
   `PhpParser\Node\Expr`, as scalars are expressions, too.
 * There are some nodes not in either of these groups, for example names (`PhpParser\Node\Name`)
   and call arguments (`PhpParser\Node\Arg`).

The `Node\Stmt\Expression` node is somewhat confusing in that it contains both the terms "statement"
and "expression". This node distinguishes `expr`, which is a `Node\Expr`, from `expr;`, which is
an "expression statement" represented by `Node\Stmt\Expression` and containing `expr` as a sub-node.

Every node has a (possibly zero) number of subnodes. You can access subnodes by writing
`$node->subNodeName`. The `Stmt\Echo_` node has only one subnode `exprs`. So in order to access it
in the above example you would write `$stmts[0]->exprs`. If you wanted to access the name of the function
call, you would write `$stmts[0]->exprs[1]->name`.

All nodes also define a `getType()` method that returns the node type. The type is the class name
without the `PhpParser\Node\` prefix and `\` replaced with `_`. It also does not contain a trailing
`_` for reserved-keyword class names.

It is possible to associate custom metadata with a node using the `setAttribute()` method. This data
can then be retrieved using `hasAttribute()`, `getAttribute()` and `getAttributes()`.

By default, the parser adds the `startLine`, `endLine`, `startTokenPos`, `endTokenPos`,
`startFilePos`, `endFilePos` and `comments` attributes. `comments` is an array of
`PhpParser\Comment[\Doc]` instances.

The pre-defined attributes can also be accessed using `getStartLine()` instead of
`getAttribute('startLine')`, and so on. The last doc comment from the `comments` attribute can be
obtained using `getDocComment()`.

Pretty printer
--------------

The pretty printer component compiles the AST back to PHP code according to a specified scheme.
Currently, there is only one scheme available, namely `PhpParser\PrettyPrinter\Standard`.

```php
use PhpParser\Error;
use PhpParser\ParserFactory;
use PhpParser\PrettyPrinter;

$code = "<?php echo 'Hi ', hi\\getTarget();";

$parser = (new ParserFactory())->createForHostVersion();
$prettyPrinter = new PrettyPrinter\Standard();

try {
    // parse
    $stmts = $parser->parse($code);

    // change
    $stmts[0]         // the echo statement
          ->exprs     // sub expressions
          [0]         // the first of them (the string node)
          ->value     // it's value, i.e. 'Hi '
          = 'Hello '; // change to 'Hello '

    // pretty print
    $code = $prettyPrinter->prettyPrint($stmts);

    echo $code;
} catch (Error $e) {
    echo 'Parse Error: ', $e->getMessage(), "\n";
}
```

The above code will output:

    echo 'Hello ', hi\getTarget();

As you can see, the source code was first parsed using `PhpParser\Parser->parse()`, then changed and then
again converted to code using `PhpParser\PrettyPrinter\Standard->prettyPrint()`.

The `prettyPrint()` method pretty prints a statements array. It is also possible to pretty print only a
single expression using `prettyPrintExpr()`.

The `prettyPrintFile()` method can be used to print an entire file. This will include the opening `<?php` tag
and handle inline HTML as the first/last statement more gracefully.

There is also a pretty-printing mode which retains formatting for parts of the AST that have not
been changed, which requires additional setup.

> Read more: [Pretty printing documentation](component/Pretty_printing.markdown)

Node traversal
--------------

The above pretty printing example used the fact that the source code was known and thus it was easy to
write code that accesses a certain part of a node tree and changes it. Normally this is not the case.
Usually you want to change / analyze code in a generic way, where you don't know how the node tree is
going to look like.

For this purpose the parser provides a component for traversing and visiting the node tree. The basic
structure of a program using this `PhpParser\NodeTraverser` looks like this:

```php
use PhpParser\NodeTraverser;
use PhpParser\ParserFactory;
use PhpParser\PrettyPrinter;

$parser        = (new ParserFactory())->createForHostVersion();
$traverser     = new NodeTraverser;
$prettyPrinter = new PrettyPrinter\Standard;

// add your visitor
$traverser->addVisitor(new MyNodeVisitor);

try {
    $code = file_get_contents($fileName);

    // parse
    $stmts = $parser->parse($code);

    // traverse
    $stmts = $traverser->traverse($stmts);

    // pretty print
    $code = $prettyPrinter->prettyPrintFile($stmts);

    echo $code;
} catch (PhpParser\Error $e) {
    echo 'Parse Error: ', $e->getMessage();
}
```

The corresponding node visitor might look like this:

```php
use PhpParser\Node;
use PhpParser\NodeVisitorAbstract;

class MyNodeVisitor extends NodeVisitorAbstract {
    public function leaveNode(Node $node) {
        if ($node instanceof Node\Scalar\String_) {
            $node->value = 'foo';
        }
    }
}
```

The above node visitor would change all string literals in the program to `'foo'`.

All visitors must implement the `PhpParser\NodeVisitor` interface, which defines the following four
methods:

```php
public function beforeTraverse(array $nodes);
public function enterNode(\PhpParser\Node $node);
public function leaveNode(\PhpParser\Node $node);
public function afterTraverse(array $nodes);
```

The `beforeTraverse()` method is called once before the traversal begins and is passed the nodes the
traverser was called with. This method can be used for resetting values before traversal or
preparing the tree for traversal.

The `afterTraverse()` method is similar to the `beforeTraverse()` method, with the only difference that
it is called once after the traversal.

The `enterNode()` and `leaveNode()` methods are called on every node, the former when it is entered,
i.e. before its subnodes are traversed, the latter when it is left.

All four methods can either return the changed node or not return at all (i.e. `null`) in which
case the current node is not changed.

The `enterNode()` method can additionally return the value `NodeVisitor::DONT_TRAVERSE_CHILDREN`,
which instructs the traverser to skip all children of the current node. To furthermore prevent subsequent
visitors from visiting the current node, `NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN` can be used instead.

Both methods can additionally return the following values:

 * `NodeVisitor::STOP_TRAVERSAL`, in which case no further nodes will be visited.
 * `NodeVisitor::REMOVE_NODE`, in which case the current node will be removed from the parent array.
 * `NodeVisitor::REPLACE_WITH_NULL`, in which case the current node will be replaced with `null`.
 * An array of nodes, which will be merged into the parent array at the offset of the current node.
   I.e. if in `array(A, B, C)` the node `B` should be replaced with `array(X, Y, Z)` the result will
   be `array(A, X, Y, Z, C)`.

Instead of manually implementing the `NodeVisitor` interface you can also extend the `NodeVisitorAbstract`
class, which will define empty default implementations for all the above methods.

> Read more: [Walking the AST](component/Walking_the_AST.markdown)

The NameResolver node visitor
-----------------------------

One visitor that is already bundled with the package is `PhpParser\NodeVisitor\NameResolver`. This visitor
helps you work with namespaced code by trying to resolve most names to fully qualified ones.

For example, consider the following code:

    use A as B;
    new B\C();

In order to know that `B\C` really is `A\C` you would need to track aliases and namespaces yourself.
The `NameResolver` takes care of that and resolves names as far as possible.

After running it, most names will be fully qualified. The only names that will stay unqualified are
unqualified function and constant names. These are resolved at runtime and thus the visitor can't
know which function they are referring to. In most cases this is a non-issue as the global functions
are meant.

Additionally, the `NameResolver` adds a `namespacedName` subnode to class, function and constant
declarations that contains the namespaced name instead of only the shortname that is available via
`name`.

> Read more: [Name resolution documentation](component/Name_resolution.markdown)

Example: Converting namespaced code to pseudo namespaces
--------------------------------------------------------

A small example to understand the concept: We want to convert namespaced code to pseudo namespaces,
so it works on 5.2, i.e. names like `A\\B` should be converted to `A_B`. Note that such conversions
are fairly complicated if you take PHP's dynamic features into account, so our conversion will
assume that no dynamic features are used.

We start off with the following base code:

```php
use PhpParser\ParserFactory;
use PhpParser\PrettyPrinter;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;

$inDir  = '/some/path';
$outDir = '/some/other/path';

$parser        = (new ParserFactory())->createForNewestSupportedVersion();
$traverser     = new NodeTraverser;
$prettyPrinter = new PrettyPrinter\Standard;

$traverser->addVisitor(new NameResolver); // we will need resolved names
$traverser->addVisitor(new NamespaceConverter); // our own node visitor

// iterate over all .php files in the directory
$files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($inDir));
$files = new \RegexIterator($files, '/\.php$/');

foreach ($files as $file) {
    try {
        // read the file that should be converted
        $code = file_get_contents($file->getPathName());

        // parse
        $stmts = $parser->parse($code);

        // traverse
        $stmts = $traverser->traverse($stmts);

        // pretty print
        $code = $prettyPrinter->prettyPrintFile($stmts);

        // write the converted file to the target directory
        file_put_contents(
            substr_replace($file->getPathname(), $outDir, 0, strlen($inDir)),
            $code
        );
    } catch (PhpParser\Error $e) {
        echo 'Parse Error: ', $e->getMessage();
    }
}
```

Now lets start with the main code, the `NamespaceConverter`. One thing it needs to do
is convert `A\\B` style names to `A_B` style ones.

```php
use PhpParser\Node;

class NamespaceConverter extends \PhpParser\NodeVisitorAbstract
{
    public function leaveNode(Node $node) {
        if ($node instanceof Node\Name) {
            return new Node\Name(str_replace('\\', '_', $node->toString()));
        }
    }
}
```

The above code profits from the fact that the `NameResolver` already resolved all names as far as
possible, so we don't need to do that. We only need to create a string with the name parts separated
by underscores instead of backslashes. This is what `str_replace('\\', '_', $node->toString())` does. (If you want to
create a name with backslashes either write `$node->toString()` or `(string) $node`.) Then we create
a new name from the string and return it. Returning a new node replaces the old node.

Another thing we need to do is change the class/function/const declarations. Currently they contain
only the shortname (i.e. the last part of the name), but they need to contain the complete name including
the namespace prefix:

```php
use PhpParser\Node;
use PhpParser\Node\Stmt;

class NodeVisitor_NamespaceConverter extends \PhpParser\NodeVisitorAbstract
{
    public function leaveNode(Node $node) {
        if ($node instanceof Node\Name) {
            return new Node\Name(str_replace('\\', '_', $node->toString()));
        } elseif ($node instanceof Stmt\Class_
                  || $node instanceof Stmt\Interface_
                  || $node instanceof Stmt\Function_) {
            $node->name = str_replace('\\', '_', $node->namespacedName->toString());
        } elseif ($node instanceof Stmt\Const_) {
            foreach ($node->consts as $const) {
                $const->name = str_replace('\\', '_', $const->namespacedName->toString());
            }
        }
    }
}
```

There is not much more to it than converting the namespaced name to string with `_` as separator.

The last thing we need to do is remove the `namespace` and `use` statements:

```php
use PhpParser\Node;
use PhpParser\Node\Stmt;
use PhpParser\NodeVisitor;

class NodeVisitor_NamespaceConverter extends \PhpParser\NodeVisitorAbstract
{
    public function leaveNode(Node $node) {
        if ($node instanceof Node\Name) {
            return new Node\Name(str_replace('\\', '_', $node->toString()));
        } elseif ($node instanceof Stmt\Class_
                  || $node instanceof Stmt\Interface_
                  || $node instanceof Stmt\Function_) {
            $node->name = str_replace('\\', '_', $node->namespacedName->toString();
        } elseif ($node instanceof Stmt\Const_) {
            foreach ($node->consts as $const) {
                $const->name = str_replace('\\', '_', $const->namespacedName->toString());
            }
        } elseif ($node instanceof Stmt\Namespace_) {
            // returning an array merges is into the parent array
            return $node->stmts;
        } elseif ($node instanceof Stmt\Use_) {
            // remove use nodes altogether
            return NodeVisitor::REMOVE_NODE;
        }
    }
}
```

That's all.


================================================
FILE: doc/README.md
================================================
Table of Contents
=================

Guide
-----

  1. [Introduction](0_Introduction.markdown)
  2. [Usage of basic components](2_Usage_of_basic_components.markdown)

Component documentation
-----------------------

  * [Walking the AST](component/Walking_the_AST.markdown)
    * Node visitors
    * Modifying the AST from a visitor
    * Short-circuiting traversals
    * Interleaved visitors
    * Simple node finding API
    * Parent and sibling references
  * [Name resolution](component/Name_resolution.markdown)
    * Name resolver options
    * Name resolution context
  * [Pretty printing](component/Pretty_printing.markdown)
    * Converting AST back to PHP code
    * Customizing formatting
    * Formatting-preserving code transformations
  * [AST builders](component/AST_builders.markdown)
    * Fluent builders for AST nodes
  * [Lexer](component/Lexer.markdown)
    * Emulation
    * Tokens, positions and attributes
  * [Error handling](component/Error_handling.markdown)
    * Column information for errors
    * Error recovery (parsing of syntactically incorrect code)
  * [Constant expression evaluation](component/Constant_expression_evaluation.markdown)
    * Evaluating constant/property/etc initializers
    * Handling errors and unsupported expressions
  * [JSON representation](component/JSON_representation.markdown)
    * JSON encoding and decoding of ASTs
  * [Performance](component/Performance.markdown)
    * Disabling Xdebug
    * Reusing objects
    * Garbage collection impact
  * [Frequently asked questions](component/FAQ.markdown)
    * Parent and sibling references


================================================
FILE: doc/component/AST_builders.markdown
================================================
AST builders
============

When PHP-Parser is used to generate (or modify) code by first creating an Abstract Syntax Tree and
then using the [pretty printer](Pretty_printing.markdown) to convert it to PHP code, it can often
be tedious to manually construct AST nodes. The project provides a number of utilities to simplify
the construction of common AST nodes.

Fluent builders
---------------

The library comes with a number of builders, which allow creating node trees using a fluent
interface. Builders are created using the `BuilderFactory` and the final constructed node is
accessed through `getNode()`. Fluent builders are available for
the following syntactic elements:

 * namespaces and use statements
 * classes, interfaces, traits and enums
 * methods, functions and parameters
 * properties, class constants and enum cases
 * trait uses and trait use adaptations

Here is an example:

```php
use PhpParser\BuilderFactory;
use PhpParser\PrettyPrinter;
use PhpParser\Node;

$factory = new BuilderFactory;
$node = $factory->namespace('Name\Space')
    ->addStmt($factory->use('Some\Other\Thingy')->as('SomeClass'))
    ->addStmt($factory->useFunction('strlen'))
    ->addStmt($factory->useConst('PHP_VERSION'))
    ->addStmt($factory->class('SomeOtherClass')
        ->extend('SomeClass')
        ->implement('A\Few', '\Interfaces')
        ->makeAbstract() // ->makeFinal()

        ->addStmt($factory->useTrait('FirstTrait'))

        ->addStmt($factory->useTrait('SecondTrait', 'ThirdTrait')
            ->and('AnotherTrait')
            ->with($factory->traitUseAdaptation('foo')->as('bar'))
            ->with($factory->traitUseAdaptation('AnotherTrait', 'baz')->as('test'))
            ->with($factory->traitUseAdaptation('AnotherTrait', 'func')->insteadof('SecondTrait')))

        ->addStmt($factory->method('someMethod')
            ->makePublic()
            ->makeAbstract() // ->makeFinal()
            ->setReturnType('bool') // ->makeReturnByRef()
            ->addParam($factory->param('someParam')->setType('SomeClass'))
            ->setDocComment('/**
                              * This method does something.
                              *
                              * @param SomeClass And takes a parameter
                              */')
        )

        ->addStmt($factory->method('anotherMethod')
            ->makeProtected() // ->makePublic() [default], ->makePrivate()
            ->addParam($factory->param('someParam')->setDefault('test'))
            // it is possible to add manually created nodes
            ->addStmt(new Node\Expr\Print_(new Node\Expr\Variable('someParam')))
        )

        // properties will be correctly reordered above the methods
        ->addStmt($factory->property('someProperty')->makeProtected())
        ->addStmt($factory->property('anotherProperty')->makePrivate()->setDefault(array(1, 2, 3)))
    )

    ->getNode()
;

$stmts = array($node);
$prettyPrinter = new PrettyPrinter\Standard();
echo $prettyPrinter->prettyPrintFile($stmts);
```

This will produce the following output with the standard pretty printer:

```php
<?php

namespace Name\Space;

use Some\Other\Thingy as SomeClass;
use function strlen;
use const PHP_VERSION;
abstract class SomeOtherClass extends SomeClass implements A\Few, \Interfaces
{
    use FirstTrait;
    use SecondTrait, ThirdTrait, AnotherTrait {
        foo as bar;
        AnotherTrait::baz as test;
        AnotherTrait::func insteadof SecondTrait;
    }
    protected $someProperty;
    private $anotherProperty = [1, 2, 3];
    /**
     * This method does something.
     *
     * @param SomeClass And takes a parameter
     */
    abstract public function someMethod(SomeClass $someParam): bool;
    protected function anotherMethod($someParam = 'test')
    {
        print $someParam;
    }
}
```

Additional helper methods
-------------------------

The `BuilderFactory` also provides a number of additional helper methods, which directly return
nodes. The following methods are currently available:

 * `val($value)`: Creates an AST node for a literal value like `42` or `[1, 2, 3]`.
 * `var($name)`: Creates variable node.
 * `args(array $args)`: Creates an array of function/method arguments, including the required `Arg`
   wrappers. Also converts literals to AST nodes.
 * `funcCall($name, array $args = [])`: Create a function call node. Converts `$name` to a `Name`
   node and normalizes arguments.
 * `methodCall(Expr $var, $name, array $args = [])`: Create a method call node. Converts `$name` to
   an `Identifier` node and normalizes arguments.
 * `staticCall($class, $name, array $args = [])`: Create a static method call node. Converts
   `$class` to a `Name` node, `$name` to an `Identifier` node and normalizes arguments.
 * `new($class, array $args = [])`: Create a "new" (object creation) node. Converts `$class` to a
   `Name` node.
 * `constFetch($name)`: Create a constant fetch node. Converts `$name` to a `Name` node.
 * `classConstFetch($class, $name)`: Create a class constant fetch node. Converts `$class` to a
   `Name` node and `$name` to an `Identifier` node.
 * `propertyFetch($var, $name)`: Creates a property fetch node. Converts `$name` to an `Identifier`
   node.
 * `concat(...$exprs)`: Create a tree of `BinaryOp\Concat` nodes for the given expressions.
 * `attribute($name, $args)`: Create a `Attribute` node. Converts `$name` to a `Name` node and
   normalizes arguments.

These methods may be expanded on an as-needed basis. Please open an issue or PR if a common
operation is missing.


================================================
FILE: doc/component/Constant_expression_evaluation.markdown
================================================
Constant expression evaluation
==============================

Initializers for constants, properties, parameters, etc. have limited support for expressions. For
example:

```php
<?php
class Test {
    const SECONDS_IN_HOUR = 60 * 60;
    const SECONDS_IN_DAY = 24 * self::SECONDS_IN_HOUR;
}
```

PHP-Parser supports evaluation of such constant expressions through the `ConstExprEvaluator` class:

```php
<?php

use PhpParser\{ConstExprEvaluator, ConstExprEvaluationException};

$evaluator = new ConstExprEvaluator();
try {
    $value = $evaluator->evaluateSilently($someExpr);
} catch (ConstExprEvaluationException $e) {
    // Either the expression contains unsupported expression types,
    // or an error occurred during evaluation
}
```

Error handling
--------------

The constant evaluator provides two methods, `evaluateDirectly()` and `evaluateSilently()`, which
differ in error behavior. `evaluateDirectly()` will evaluate the expression as PHP would, including
any generated warnings or Errors. `evaluateSilently()` will instead convert warnings and Errors into
a `ConstExprEvaluationException`. For example:

```php
<?php

use PhpParser\{ConstExprEvaluator, ConstExprEvaluationException};
use PhpParser\Node\{Expr, Scalar};

$evaluator = new ConstExprEvaluator();

// 10 / 0
$expr = new Expr\BinaryOp\Div(new Scalar\Int_(10), new Scalar\Int_(0));

var_dump($evaluator->evaluateDirectly($expr)); // float(INF)
// Warning: Division by zero

try {
    $evaluator->evaluateSilently($expr);
} catch (ConstExprEvaluationException $e) {
    var_dump($e->getPrevious()->getMessage()); // Division by zero
}
```

For the purposes of static analysis, you will likely want to use `evaluateSilently()` and leave
erroring expressions unevaluated.

Unsupported expressions and evaluator fallback
----------------------------------------------

The constant expression evaluator supports all expression types that are permitted in constant
expressions, apart from the following:

 * `Scalar\MagicConst\*`
 * `Expr\ConstFetch` (only null/false/true are handled)
 * `Expr\ClassConstFetch`
 * `Expr\New_` (since PHP 8.1)
 * `Expr\PropertyFetch` (since PHP 8.2)

Handling these expression types requires non-local information, such as which global constants are
defined. By default, the evaluator will throw a `ConstExprEvaluationException` when it encounters
an unsupported expression type.

It is possible to override this behavior and support resolution for these expression types by
specifying an evaluation fallback function:

```php
<?php

use PhpParser\{ConstExprEvaluator, ConstExprEvaluationException};
use PhpParser\Node\Expr;

$evaluator = new ConstExprEvaluator(function(Expr $expr) {
    if ($expr instanceof Expr\ConstFetch) {
        return fetchConstantSomehow($expr);
    }
    if ($expr instanceof Expr\ClassConstFetch) {
        return fetchClassConstantSomehow($expr);
    }
    // etc.
    throw new ConstExprEvaluationException(
        "Expression of type {$expr->getType()} cannot be evaluated");
});

try {
    $evaluator->evaluateSilently($someExpr);
} catch (ConstExprEvaluationException $e) {
    // Handle exception
}
```

Implementers are advised to ensure that evaluation of indirect constant references cannot lead to
infinite recursion. For example, the following code could lead to infinite recursion if constant
lookup is implemented naively.

```php
<?php
class Test {
    const A = self::B;
    const B = self::A;
}
```


================================================
FILE: doc/component/Error_handling.markdown
================================================
Error handling
==============

Errors during parsing or analysis are represented using the `PhpParser\Error` exception class. In addition to an error
message, an error can also store additional information about the location the error occurred at.

How much location information is available depends on the origin of the error. At a minimum the start line of the error
is usually available.

Column information
------------------

Before using column information, its availability needs to be checked with `$e->hasColumnInfo()`, as the precise
location of an error cannot always be determined. The methods for retrieving column information also have to be passed
the source code of the parsed file. An example for printing an error:

```php
if ($e->hasColumnInfo()) {
    echo $e->getRawMessage() . ' from ' . $e->getStartLine() . ':' . $e->getStartColumn($code)
        . ' to ' . $e->getEndLine() . ':' . $e->getEndColumn($code);
    // or:
    echo $e->getMessageWithColumnInfo($code);
} else {
    echo $e->getMessage();
}
```

Both line numbers and column numbers are 1-based. EOF errors will be located at the position one past the end of the
file.

Error recovery
--------------

The error behavior of the parser (and other components) is controlled by an `ErrorHandler`. Whenever an error is
encountered, `ErrorHandler::handleError()` is invoked. The default error handling strategy is `ErrorHandler\Throwing`,
which will immediately throw when an error is encountered.

To instead collect all encountered errors into an array, while trying to continue parsing the rest of the source code,
an instance of `ErrorHandler\Collecting` can be passed to the `Parser::parse()` method. A usage example:

```php
$parser = (new PhpParser\ParserFactory())->createForHostVersion();
$errorHandler = new PhpParser\ErrorHandler\Collecting;

$stmts = $parser->parse($code, $errorHandler);

if ($errorHandler->hasErrors()) {
    foreach ($errorHandler->getErrors() as $error) {
        // $error is an ordinary PhpParser\Error
    }
}

if (null !== $stmts) {
    // $stmts is a best-effort partial AST
}
```

The partial AST may contain `Expr\Error` nodes that indicate that an error occurred while parsing an expression.

The `NameResolver` visitor also accepts an `ErrorHandler` as a constructor argument.


================================================
FILE: doc/component/FAQ.markdown
================================================
Frequently Asked Questions
==========================

 * [How can the parent of a node be obtained?](#how-can-the-parent-of-a-node-be-obtained)
 * [How can the next/previous sibling of a node be obtained?](#how-can-the-nextprevious-sibling-of-a-node-be-obtained)

How can the parent of a node be obtained?
-----

The AST does not store parent nodes by default. However, the `ParentConnectingVisitor` can be used to achieve this:

```php
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\ParentConnectingVisitor;
use PhpParser\ParserFactory;

$code = '...';

$traverser = new NodeTraverser(new ParentConnectingVisitor);

$parser = (new ParserFactory())->createForHostVersion();
$ast    = $parser->parse($code);
$ast    = $traverser->traverse($ast);
```

After running this visitor, the parent node can be obtained through `$node->getAttribute('parent')`.

How can the next/previous sibling of a node be obtained?
-----

Again, siblings are not stored by default, but the `NodeConnectingVisitor` can be used to store
the previous / next node with a common parent as well:

```php
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NodeConnectingVisitor;
use PhpParser\ParserFactory;

$code = '...';

$traverser = new NodeTraverser(new NodeConnectingVisitor);

$parser = (new ParserFactory())->createForHostVersion();
$ast    = $parser->parse($code);
$ast    = $traverser->traverse($ast);
```

After running this visitor, the parent node can be obtained through `$node->getAttribute('parent')`,
the previous node can be obtained through `$node->getAttribute('previous')`, and the next node can be
obtained through `$node->getAttribute('next')`.

`ParentConnectingVisitor` and `NodeConnectingVisitor` should not be used at the same time. The latter
includes the functionality of the former.


How can I limit the impact of cyclic references in the AST?
-----

NodeConnectingVisitor adds a parent reference, which introduces a cycle. This means that the AST can now only be collected by the cycle garbage collector.
This in turn can lead to performance and/or memory issues. 

To break the cyclic references between AST nodes `NodeConnectingVisitor` supports a boolean `$weakReferences` constructor parameter.
When set to `true`, all attributes added by `NodeConnectingVisitor` will be wrapped into a `WeakReference` object.

After enabling this parameter, the parent node can be obtained through `$node->getAttribute('weak_parent')`,
the previous node can be obtained through `$node->getAttribute('weak_previous')`, and the next node can be
obtained through `$node->getAttribute('weak_next')`.

================================================
FILE: doc/component/JSON_representation.markdown
================================================
JSON representation
===================

Nodes (and comments) implement the `JsonSerializable` interface. As such, it is possible to JSON
encode the AST directly using `json_encode()`:

```php
<?php

use PhpParser\ParserFactory;

$code = <<<'CODE'
<?php

/** @param string $msg */
function printLine($msg) {
    echo $msg, "\n";
}
CODE;

$parser = (new ParserFactory())->createForHostVersion();

try {
    $stmts = $parser->parse($code);

    echo json_encode($stmts, JSON_PRETTY_PRINT), "\n";
} catch (PhpParser\Error $e) {
    echo 'Parse Error: ', $e->getMessage();
}
```

This will result in the following output (which includes attributes):

```json
[
    {
        "nodeType": "Stmt_Function",
        "attributes": {
            "startLine": 4,
            "comments": [
                {
                    "nodeType": "Comment_Doc",
                    "text": "\/** @param string $msg *\/",
                    "line": 3,
                    "filePos": 7,
                    "tokenPos": 2,
                    "endLine": 3,
                    "endFilePos": 31,
                    "endTokenPos": 2
                }
            ],
            "endLine": 6
        },
        "byRef": false,
        "name": {
            "nodeType": "Identifier",
            "attributes": {
                "startLine": 4,
                "endLine": 4
            },
            "name": "printLine"
        },
        "params": [
            {
                "nodeType": "Param",
                "attributes": {
                    "startLine": 4,
                    "endLine": 4
                },
                "type": null,
                "byRef": false,
                "variadic": false,
                "var": {
                    "nodeType": "Expr_Variable",
                    "attributes": {
                        "startLine": 4,
                        "endLine": 4
                    },
                    "name": "msg"
                },
                "default": null,
                "flags": 0,
                "attrGroups": []
            }
        ],
        "returnType": null,
        "stmts": [
            {
                "nodeType": "Stmt_Echo",
                "attributes": {
                    "startLine": 5,
                    "endLine": 5
                },
                "exprs": [
                    {
                        "nodeType": "Expr_Variable",
                        "attributes": {
                            "startLine": 5,
                            "endLine": 5
                        },
                        "name": "msg"
                    },
                    {
                        "nodeType": "Scalar_String",
                        "attributes": {
                            "startLine": 5,
                            "endLine": 5,
                            "kind": 2,
                            "rawValue": "\"\\n\""
                        },
                        "value": "\n"
                    }
                ]
            }
        ],
        "attrGroups": [],
        "namespacedName": null
    }
]
```

The JSON representation may be converted back into an AST using the `JsonDecoder`:

```php
<?php

$jsonDecoder = new PhpParser\JsonDecoder();
$ast = $jsonDecoder->decode($json);
```

Note that not all ASTs can be represented using JSON. In particular:

 * JSON only supports UTF-8 strings.
 * JSON does not support non-finite floating-point numbers. This can occur if the original source
   code contains non-representable floating-pointing literals such as `1e1000`.

If the node tree is not representable in JSON, the initial `json_encode()` call will fail.

From the command line, a JSON dump can be obtained using `vendor/bin/php-parse -j file.php`.


================================================
FILE: doc/component/Lexer.markdown
================================================
Lexer component documentation
=============================

The lexer is responsible for providing tokens to the parser. Typical use of the library does not require direct
interaction with the lexer, as an appropriate lexer is created by `PhpParser\ParserFactory`. The tokens produced
by the lexer can then be retrieved using `PhpParser\Parser::getTokens()`.

Emulation
---------

While this library implements a custom parser, it relies on PHP's `ext/tokenizer` extension to perform lexing. However,
this extension only supports lexing code for the PHP version you are running on, while this library also wants to support
parsing newer code. For that reason, the lexer performs additional "emulation" in three layers:

First, PhpParser uses the `PhpToken` based representation introduced in PHP 8.0, rather than the array-based tokens from
previous versions. The `PhpParser\Token` class either extends `PhpToken` (on PHP 8.0) or a polyfill implementation. The
polyfill implementation will also perform two emulations that are required by the parser and cannot be disabled:

 * Single-line comments use the PHP 8.0 representation that does not include a trailing newline. The newline will be
   part of a following `T_WHITESPACE` token.
 * Namespaced names use the PHP 8.0 representation using `T_NAME_FULLY_QUALIFIED`, `T_NAME_QUALIFIED` and
   `T_NAME_RELATIVE` tokens, rather than the previous representation using a sequence of `T_STRING` and `T_NS_SEPARATOR`.
   This means that certain code that is legal on older versions (namespaced names including whitespace, such as `A \ B`)
   will not be accepted by the parser.

Second, the `PhpParser\Lexer` base class will convert `&` tokens into the PHP 8.1 representation of either
`T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG` or `T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG`. This is required by the parser
and cannot be disabled.

Finally, `PhpParser\Lexer\Emulative` performs other, optional emulations. This lexer is parameterized by `PhpVersion`
and will try to emulate `ext/tokenizer` output for that version. This is done using separate `TokenEmulator`s for each
emulated feature.

Emulation is usually used to support newer PHP versions, but there is also very limited support for reverse emulation to
older PHP versions, which can make keywords from newer versions non-reserved.

Tokens, positions and attributes
--------------------------------

The `Lexer::tokenize()` method returns an array of `PhpParser\Token`s. The most important parts of the interface can be
summarized as follows:

```php
class Token {
    /** @var int Token ID, either T_* or ord($char) for single-character tokens. */
    public int $id;
    /** @var string The textual content of the token. */
    public string $text;
    /** @var int The 1-based starting line of the token (or -1 if unknown). */
    public int $line;
    /** @var int The 0-based starting position of the token (or -1 if unknown). */
    public int $pos;

    /** @param int|string|(int|string)[] $kind Token ID or text (or array of them) */
    public function is($kind): bool;
}
```

Unlike PHP's own `PhpToken::tokenize()` output, the token array is terminated by a sentinel token with ID 0.

The lexer is normally invoked implicitly by the parser. In that case, the tokens for the last parse can be retrieved
using `Parser::getTokens()`.

Nodes in the AST produced by the parser always corresponds to some range of tokens. The parser adds a number of
positioning attributes to allow mapping nodes back to lines, tokens or file offsets:

 * `startLine`: Line in which the node starts. Used by `$node->getStartLine()`.
 * `endLine`: Line in which the node ends. Used by `$node->getEndLine()`.
 * `startTokenPos`: Offset into the token array of the first token in the node. Used by `$node->getStartTokenPos()`.
 * `endTokenPos`: Offset into the token array of the last token in the node. Used by `$node->getEndTokenPos()`.
 * `startFilePos`: Offset into the code string of the first character that is part of the node. Used by `$node->getStartFilePos()`.
 * `endFilePos`: Offset into the code string of the last character that is part of the node. Used by `$node->getEndFilePos()`.

Note that `start`/`end` here are closed rather than half-open ranges. This means that a node consisting of a single
token will have `startTokenPos == endTokenPos` rather than `startTokenPos + 1 == endTokenPos`. This also means that a
zero-length node will have `startTokenPos -1 == endTokenPos`.

### Using token positions

> **Note:** The example in this section is outdated in that this information is directly available in the AST: While
> `$property->isPublic()` does not distinguish between `public` and `var`, directly checking `$property->flags` for
> the `$property->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0` allows making this distinction without resorting to
> tokens. However, the general idea behind the example still applies in other cases.

The token offset information is useful if you wish to examine the exact formatting used for a node. For example the AST
does not distinguish whether a property was declared using `public` or using `var`, but you can retrieve this
information based on the token position:

```php
/** @param PhpParser\Token[] $tokens */
function isDeclaredUsingVar(array $tokens, PhpParser\Node\Stmt\Property $prop) {
    $i = $prop->getStartTokenPos();
    return $tokens[$i]->id === T_VAR;
}
```

In order to make use of this function, you will have to provide the tokens from the lexer to your node visitor using
code similar to the following:

```php
class MyNodeVisitor extends PhpParser\NodeVisitorAbstract {
    private $tokens;
    public function setTokens(array $tokens) {
        $this->tokens = $tokens;
    }

    public function leaveNode(PhpParser\Node $node) {
        if ($node instanceof PhpParser\Node\Stmt\Property) {
            var_dump(isDeclaredUsingVar($this->tokens, $node));
        }
    }
}

$parser = (new PhpParser\ParserFactory())->createForHostVersion($lexerOptions);

$visitor = new MyNodeVisitor();
$traverser = new PhpParser\NodeTraverser($visitor);

try {
    $stmts = $parser->parse($code);
    $visitor->setTokens($parser->getTokens());
    $stmts = $traverser->traverse($stmts);
} catch (PhpParser\Error $e) {
    echo 'Parse Error: ', $e->getMessage();
}
```


================================================
FILE: doc/component/Name_resolution.markdown
================================================
Name resolution
===============

Since the introduction of namespaces in PHP 5.3, literal names in PHP code are subject to a
relatively complex name resolution process, which is based on the current namespace, the current
import table state, as well the type of the referenced symbol. PHP-Parser implements name
resolution and related functionality, both as reusable logic (NameContext), as well as a node
visitor (NameResolver) based on it.

The NameResolver visitor
------------------------

The `NameResolver` visitor can (and for nearly all uses of the AST, should) be applied to resolve names
to their fully-qualified form, to the degree that this is possible.

```php
$nameResolver = new PhpParser\NodeVisitor\NameResolver;
$nodeTraverser = new PhpParser\NodeTraverser;
$nodeTraverser->addVisitor($nameResolver);

// Resolve names
$stmts = $nodeTraverser->traverse($stmts);
```

In the default configuration, the name resolver will perform three actions:

 * Declarations of functions, classes, interfaces, traits, enums and global constants will have a
   `namespacedName` property added, which contains the function/class/etc name including the
   namespace prefix. For historic reasons this is a **property** rather than an attribute.
 * Names will be replaced by fully qualified resolved names, which are instances of
   `Node\Name\FullyQualified`.
 * Unqualified function and constant names inside a namespace cannot be statically resolved. Inside
   a namespace `Foo`, a call to `strlen()` may either refer to the namespaced `\Foo\strlen()`, or
   the global `\strlen()`. Because PHP-Parser does not have the necessary context to decide this,
   such names are left unresolved. Additionally, a `namespacedName` **attribute** is added to the
   name node.

The name resolver accepts an option array as the second argument, with the following default values:

```php
$nameResolver = new PhpParser\NodeVisitor\NameResolver(null, [
    'preserveOriginalNames' => false,
    'replaceNodes' => true,
]);
```

If the `preserveOriginalNames` option is enabled, then the resolved (fully qualified) name will have
an `originalName` attribute, which contains the unresolved name.

If the `replaceNodes` option is disabled, then names will no longer be resolved in-place. Instead, a
`resolvedName` attribute will be added to each name, which contains the resolved (fully qualified)
name. Once again, if an unqualified function or constant name cannot be resolved, then the
`resolvedName` attribute will not be present, and instead a `namespacedName` attribute is added.

The `replaceNodes` attribute is useful if you wish to perform modifications on the AST, as you
probably do not wish the resulting code to have fully resolved names as a side-effect.

The NameContext
---------------

The actual name resolution logic is implemented in the `NameContext` class, which has the following
public API:

```php
class NameContext {
    public function __construct(ErrorHandler $errorHandler);
    public function startNamespace(Name $namespace = null);
    public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []);

    public function getNamespace();
    public function getResolvedName(Name $name, int $type);
    public function getResolvedClassName(Name $name) : Name;
    public function getPossibleNames(string $name, int $type) : array;
    public function getShortName(string $name, int $type) : Name;
}
```

The `$type` parameters accept one of the `Stmt\Use_::TYPE_*` constants, which represent the three
basic symbol types in PHP (functions, constants and everything else).

Next to name resolution, the `NameContext` also supports the reverse operation of finding a short
representation of a name given the current name resolution environment.

The name context is intended to be used for name resolution operations outside the AST itself, such
as class names inside doc comments. A visitor running in parallel with the name resolver can access
the name context using `$nameResolver->getNameContext()`. Alternatively a visitor can use an
independent context and explicitly feed `Namespace` and `Use` nodes to it.


================================================
FILE: doc/component/Performance.markdown
================================================
Performance
===========

Parsing is computationally expensive task, to which the PHP language is not very well suited.
Nonetheless, there are a few things you can do to improve the performance of this library, which are
described in the following.

Xdebug
------

Running PHP with Xdebug adds a lot of overhead, especially for code that performs many method calls.
Just by loading Xdebug (without enabling profiling or other more intrusive Xdebug features), you
can expect that code using PHP-Parser will be approximately *five times slower*.

As such, you should make sure that Xdebug is not loaded when using this library. Note that setting
the `xdebug.default_enable=0` ini option does *not* disable Xdebug. The *only* way to disable
Xdebug is to not load the extension in the first place.

If you are building a command-line utility for use by developers (who often have Xdebug enabled),
you may want to consider automatically restarting PHP with Xdebug unloaded. The
[composer/xdebug-handler](https://github.com/composer/xdebug-handler) package can be used to do
this.

If you do run with Xdebug, you may need to increase the `xdebug.max_nesting_level` option to a
higher level, such as 3000. While the parser itself is recursion free, most other code working on
the AST uses recursion and will generate an error if the value of this option is too low.

Assertions
----------

Assertions should be disabled in a production context by setting `zend.assertions=-1` (or
`zend.assertions=0` if set at runtime). The library currently doesn't make heavy use of assertions,
but they are used in an increasing number of places.

Object reuse
------------

Many objects in this project are designed for reuse. For example, one `Parser` object can be used to
parse multiple files.

When possible, objects should be reused rather than being newly instantiated for every use. Some
objects have expensive initialization procedures, which will be unnecessarily repeated if the object
is not reused. (Currently two objects with particularly expensive setup are parsers and pretty
printers, though the details might change between versions of this library.)


================================================
FILE: doc/component/Pretty_printing.markdown
================================================
Pretty printing
===============

Pretty printing is the process of converting a syntax tree back to PHP code. In its basic mode of
operation the pretty printer provided by this library will print the AST using a certain predefined
code style and will discard (nearly) all formatting of the original code. Because programmers tend
to be rather picky about their code formatting, this mode of operation is not very suitable for
refactoring code, but can be used for automatically generated code, which is usually only read for
debugging purposes.

Basic usage
-----------

```php
$stmts = $parser->parse($code);

// MODIFY $stmts here

$prettyPrinter = new PhpParser\PrettyPrinter\Standard;
$newCode = $prettyPrinter->prettyPrintFile($stmts);
```

The pretty printer has three basic printing methods: `prettyPrint()`, `prettyPrintFile()` and
`prettyPrintExpr()`. The one that is most commonly useful is `prettyPrintFile()`, which takes an
array of statements and produces a full PHP file, including opening `<?php`.

`prettyPrint()` also takes a statement array, but produces code which is valid inside an already
open `<?php` context. Lastly, `prettyPrintExpr()` takes an `Expr` node and prints only a single
expression.

Customizing the formatting
--------------------------

The pretty printer respects a number of attributes used by some nodes:

 * `kind` on `Scalar\String_` to use single quotes (default), double quotes, heredoc or nowdoc.
   In the latter two cases, the heredoc/nowdoc label from the `docLabel` attribute is used.
 * `kind` on `Scalar\Int_` to use decimal (default), binary, octal or hexadecimal representation.
 * `shouldPrintRawValue` and `rawValue` on `Scalar\Int_` to preserve the original formatting of
   integer literals (e.g., numeric separators like `1_000`). When `shouldPrintRawValue` is set to
   `true`, the value from `rawValue` is used instead of the computed representation. This works for
   all integer formats (decimal, binary, octal, hexadecimal).
 * `kind` on `Cast\Double` to use `(double)` (default), `(float)` or `(real)`.
 * `kind` on `Expr\List_` to use `[]` or `list()` (default depends on `phpVersion` option).
 * `kind` on `Expr\Array_` to use `[]` or `array()` (default depends on `shortArraySyntax` option).
 * `kind` on `Expr\Exit_` to use `die` (defaul) or `exit`.
 * `hasLeadingNewline` on `Stmt\InlineHTML` to determine whether a newline is emitted after `?>`
   or not.

Additionally, the pretty printer supports three options:

* `phpVersion` (defaults to 7.4) allows opting into formatting that is not supported by older PHP
  versions.
* `newline` (defaults to `"\n"`) can be set to `"\r\n"` in order to produce Windows newlines.
* `indent` (defaults to four spaces `"    "`) can be set to any number of spaces or a single tab.
* `shortArraySyntax` determines the used array syntax if the `kind` attribute is not set. This is
  a legacy option, and `phpVersion` should be used to control this behavior instead.

The behaviors controlled by `phpVersion` (defaults to PHP 7.4) are:

* For PHP >= 7.0, short array syntax `[]` will be used by default. This does not affect nodes that
  specify an explicit array syntax using the `kind` attribute.
* For PHP >= 7.0, parentheses around `yield` expressions will only be printed when necessary.
* For PHP >= 7.1, the short array syntax `[]` will be used for destructuring by default (instead of
  `list()`). This does not affect nodes that specify and explicit syntax using the `kind` attribute.
* For PHP >= 7.3, a newline is no longer forced after heredoc/nowdoc strings, as the requirement
  for this has been removed with the introduction of flexible heredoc/nowdoc strings.
* For PHP >= 7.3, heredoc/nowdoc strings are indented just like regular code. This was allowed with
  the introduction of flexible heredoc/nowdoc strings.

The default pretty printer does not provide functionality for fine-grained customization of code
formatting.

If you want to make minor changes to the formatting, the easiest way is to extend the pretty printer
and override the methods responsible for the node types you are interested in.

If you want to have more fine-grained formatting control, the recommended method is to combine the
default pretty printer with an existing library for code reformatting, such as
[PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).

Formatting-preserving pretty printing
-------------------------------------

For automated code refactoring, migration and similar, you will usually only want to modify a small
portion of the code and leave the remainder alone. The basic pretty printer is not suitable for
this, because it will also reformat parts of the code which have not been modified.

Since PHP-Parser 4.0, a formatting-preserving pretty-printing mode is available, which
attempts to preserve the formatting of code (those AST nodes that have not changed) and only reformat
code which has been modified or newly inserted.

Use of the formatting-preservation functionality requires some additional preparatory steps:

```php
use PhpParser\{NodeTraverser, NodeVisitor, ParserFactory, PrettyPrinter};

$parser = (new ParserFactory())->createForHostVersion();
$oldStmts = $parser->parse($code);
$oldTokens = $parser->getTokens();

// Run CloningVisitor before making changes to the AST.
$traverser = new NodeTraverser(new NodeVisitor\CloningVisitor());
$newStmts = $traverser->traverse($oldStmts);

// MODIFY $newStmts HERE

$printer = new PrettyPrinter\Standard();
$newCode = $printer->printFormatPreserving($newStmts, $oldStmts, $oldTokens);
```

If you make use of the name resolution functionality, you will likely want to disable the
`replaceNodes` option. This will add resolved names as attributes, instead of directly modifying
the AST and causing spurious changes to the pretty printed code. For more information, see the
[name resolution documentation](Name_resolution.markdown).

The formatting-preservation works on a best-effort basis and may sometimes reformat more code than
necessary. If you encounter problems while using this functionality, please open an issue.


================================================
FILE: doc/component/Walking_the_AST.markdown
================================================
Walking the AST
===============

The most common way to work with the AST is by using a node traverser and one or more node visitors.
As a basic example, the following code changes all literal integers in the AST into strings (e.g.,
`42` becomes `'42'`.)

```php
use PhpParser\{Node, NodeTraverser, NodeVisitorAbstract};

$traverser = new NodeTraverser;
$traverser->addVisitor(new class extends NodeVisitorAbstract {
    public function leaveNode(Node $node) {
        if ($node instanceof Node\Scalar\Int_) {
            return new Node\Scalar\String_((string) $node->value);
        }
    }
});

$stmts = ...;
$modifiedStmts = $traverser->traverse($stmts);
```

Visitors can be either passed to the `NodeTraverser` constructor, or added using `addVisitor()`:

```php
$traverser = new NodeTraverser($visitor1, $visitor2, $visitor3);

// Equivalent to:
$traverser = new NodeTraverser();
$traverser->addVisitor($visitor1);
$traverser->addVisitor($visitor2);
$traverser->addVisitor($visitor3);
```

Node visitors
-------------

Each node visitor implements an interface with following four methods:

```php
interface NodeVisitor {
    public function beforeTraverse(array $nodes);
    public function enterNode(Node $node);
    public function leaveNode(Node $node);
    public function afterTraverse(array $nodes);
}
```

The `beforeTraverse()` and `afterTraverse()` methods are called before and after the traversal
respectively, and are passed the entire AST. They can be used to perform any necessary state
setup or cleanup.

The `enterNode()` method is called when a node is first encountered, before its children are
processed ("preorder"). The `leaveNode()` method is called after all children have been visited
("postorder").

For example, if we have the following excerpt of an AST

```
Expr_FuncCall(
   name: Name(
       name: printLine
   )
   args: array(
       0: Arg(
           name: null
           value: Scalar_String(
               value: Hello World!!!
           )
           byRef: false
           unpack: false
       )
   )
)
```

then the enter/leave methods will be called in the following order:

```
enterNode(Expr_FuncCall)
enterNode(Name)
leaveNode(Name)
enterNode(Arg)
enterNode(Scalar_String)
leaveNode(Scalar_String)
leaveNode(Arg)
leaveNode(Expr_FuncCall)
```

A common pattern is that `enterNode` is used to collect some information and then `leaveNode`
performs modifications based on that. At the time when `leaveNode` is called, all the code inside
the node will have already been visited and necessary information collected.

As you usually do not want to implement all four methods, it is recommended that you extend
`NodeVisitorAbstract` instead of implementing the interface directly. The abstract class provides
empty default implementations.

Modifying the AST
-----------------

There are a number of ways in which the AST can be modified from inside a node visitor. The first
and simplest is to simply change AST properties inside the visitor:

```php
public function leaveNode(Node $node) {
    if ($node instanceof Node\Scalar\LNumber) {
        // increment all integer literals
        $node->value++;
    }
}
```

The second is to replace a node entirely by returning a new node:

```php
public function leaveNode(Node $node) {
    if ($node instanceof Node\Expr\BinaryOp\BooleanAnd) {
        // Convert all $a && $b expressions into !($a && $b)
        return new Node\Expr\BooleanNot($node);
    }
}
```

Doing this is supported both inside enterNode and leaveNode. However, you have to be mindful about
where you perform the replacement: If a node is replaced in enterNode, then the recursive traversal
will also consider the children of the new node. If you aren't careful, this can lead to infinite
recursion. For example, let's take the previous code sample and use enterNode instead:

```php
public function enterNode(Node $node) {
    if ($node instanceof Node\Expr\BinaryOp\BooleanAnd) {
        // Convert all $a && $b expressions into !($a && $b)
        return new Node\Expr\BooleanNot($node);
    }
}
```

Now `$a && $b` will be replaced by `!($a && $b)`. Then the traverser will go into the first (and
only) child of `!($a && $b)`, which is `$a && $b`. The transformation applies again and we end up
with `!!($a && $b)`. This will continue until PHP hits the memory limit.

Finally, there are three special replacement types. The first is removal of a node:

```php
public function leaveNode(Node $node) {
    if ($node instanceof Node\Stmt\Return_) {
        // Remove all return statements
        return NodeVisitor::REMOVE_NODE;
    }
}
```

Node removal only works if the parent structure is an array. This means that usually it only makes
sense to remove nodes of type `Node\Stmt`, as they always occur inside statement lists (and a few
more node types like `Arg` or `Expr\ArrayItem`, which are also always part of lists).

On the other hand, removing a `Node\Expr` does not make sense: If you have `$a * $b`, there is no
meaningful way in which the `$a` part could be removed. If you want to remove an expression, you
generally want to remove it together with a surrounding expression statement:

```php
public function leaveNode(Node $node) {
    if ($node instanceof Node\Stmt\Expression
        && $node->expr instanceof Node\Expr\FuncCall
        && $node->expr->name instanceof Node\Name
        && $node->expr->name->toString() === 'var_dump'
    ) {
        return NodeVisitor::REMOVE_NODE;
    }
}
```

This example will remove all calls to `var_dump()` which occur as expression statements. This means
that `var_dump($a);` will be removed, but `if (var_dump($a))` will not be removed (and there is no
obvious way in which it can be removed).

Another way to remove nodes is to replace them with `null`. For example, all `else` statements could
be removed as follows:

```php
public function leaveNode(Node $node) {
    if ($node instanceof Node\Stmt\Else_) {
        return NodeVisitor::REPLACE_WITH_NULL;
    }
}
```

This is only safe to do if the subnode the node is stored in is nullable. `Node\Stmt\Else_` only
occurs inside `Node\Stmt\If_::$else`, which is nullable, so this particular replacement is safe.

Next to removing nodes, it is also possible to replace one node with multiple nodes. This
only works if the parent structure is an array.

```php
public function leaveNode(Node $node) {
    if ($node instanceof Node\Stmt\Return_ && $node->expr !== null) {
        // Convert "return foo();" into "$retval = foo(); return $retval;"
        $var = new Node\Expr\Variable('retval');
        return [
            new Node\Stmt\Expression(new Node\Expr\Assign($var, $node->expr)),
            new Node\Stmt\Return_($var),
        ];
    }
}
```

Short-circuiting traversal
--------------------------

An AST can easily contain thousands of nodes, and traversing over all of them may be slow,
especially if you have more than one visitor. In some cases, it is possible to avoid a full
traversal.

If you are looking for all class declarations in a file (and assuming you're not interested in
anonymous classes), you know that once you've seen a class declaration, there is no point in also
checking all it's child nodes, because PHP does not allow nesting classes. In this case, you can
instruct the traverser to not recurse into the class node:

```php
private $classes = [];
public function enterNode(Node $node) {
    if ($node instanceof Node\Stmt\Class_) {
        $this->classes[] = $node;
        return NodeVisitor::DONT_TRAVERSE_CHILDREN;
    }
}
```

Of course, this option is only available in enterNode, because it's already too late by the time
leaveNode is reached.

If you are only looking for one specific node, it is also possible to abort the traversal entirely
after finding it. For example, if you are looking for the node of a class with a certain name (and
discounting exotic cases like conditionally defining a class two times), you can stop traversal
once you found it:

```php
private $class = null;
public function enterNode(Node $node) {
    if ($node instanceof Node\Stmt\Class_ &&
        $node->namespacedName->toString() === 'Foo\Bar\Baz'
    ) {
        $this->class = $node;
        return NodeVisitor::STOP_TRAVERSAL;
    }
}
```

This works both in enterNode and leaveNode. Note that this particular case can also be more easily
handled using a NodeFinder, which will be introduced below.

Multiple visitors
-----------------

A single traverser can be used with multiple visitors:

```php
$traverser = new NodeTraverser;
$traverser->addVisitor($visitorA);
$traverser->addVisitor($visitorB);
$stmts = $traverser->traverse($stmts);
```

It is important to understand that if a traverser is run with multiple visitors, the visitors will
be interleaved. Given the following AST excerpt

```
Stmt_Return(
    expr: Expr_Variable(
        name: foobar
    )
)
```

the following method calls will be performed:

```php
$visitorA->enterNode(Stmt_Return)
$visitorB->enterNode(Stmt_Return)
$visitorA->enterNode(Expr_Variable)
$visitorB->enterNode(Expr_Variable)
$visitorB->leaveNode(Expr_Variable)
$visitorA->leaveNode(Expr_Variable)
$visitorB->leaveNode(Stmt_Return)
$visitorA->leaveNode(Stmt_Return)
```

That is, when visiting a node, `enterNode()` and `leaveNode()` will always be called for all
visitors, with the `leaveNode()` calls happening in the reverse order of the `enterNode()` calls.
Running multiple visitors in parallel improves performance, as the AST only has to be traversed
once. However, it is not always possible to write visitors in a way that allows interleaved
execution. In this case, you can always fall back to performing multiple traversals:

```php
$traverserA = new NodeTraverser;
$traverserA->addVisitor($visitorA);
$traverserB = new NodeTraverser;
$traverserB->addVisitor($visitorB);
$stmts = $traverserA->traverser($stmts);
$stmts = $traverserB->traverser($stmts);
```

When using multiple visitors, it is important to understand how they interact with the various
special enterNode/leaveNode return values:

 * If *any* visitor returns `DONT_TRAVERSE_CHILDREN`, the children will be skipped for *all*
   visitors.
 * If *any* visitor returns `DONT_TRAVERSE_CURRENT_AND_CHILDREN`, the children will be skipped for *all*
   visitors, and all *subsequent* visitors will not visit the current node.
 * If *any* visitor returns `STOP_TRAVERSAL`, traversal is stopped for *all* visitors.
 * If a visitor returns a replacement node, subsequent visitors will be passed the replacement node,
   not the original one.
 * If a visitor returns `REMOVE_NODE`, subsequent visitors will not see this node.
 * If a visitor returns `REPLACE_WITH_NULL`, subsequent visitors will not see this node.
 * If a visitor returns an array of replacement nodes, subsequent visitors will see neither the node
   that was replaced, nor the replacement nodes.

Simple node finding
-------------------

While the node visitor mechanism is very flexible, creating a node visitor can be overly cumbersome
for minor tasks. For this reason a `NodeFinder` is provided, which can find AST nodes that either
satisfy a certain callback, or which are instances of a certain node type. A couple of examples are
shown in the following:

```php
use PhpParser\{Node, NodeFinder};

$nodeFinder = new NodeFinder;

// Find all class nodes.
$classes = $nodeFinder->findInstanceOf($stmts, Node\Stmt\Class_::class);

// Find all classes that extend another class
$extendingClasses = $nodeFinder->find($stmts, function(Node $node) {
    return $node instanceof Node\Stmt\Class_
        && $node->extends !== null;
});

// Find first class occurring in the AST. Returns null if no class exists.
$class = $nodeFinder->findFirstInstanceOf($stmts, Node\Stmt\Class_::class);

// Find first class that has name $name
$class = $nodeFinder->findFirst($stmts, function(Node $node) use ($name) {
    return $node instanceof Node\Stmt\Class_
        && $node->resolvedName->toString() === $name;
});
```

Internally, the `NodeFinder` also uses a node traverser. It only simplifies the interface for a
common use case.

Parent and sibling references
-----------------------------

The node visitor mechanism is somewhat rigid, in that it prescribes an order in which nodes should
be accessed: From parents to children. However, it can often be convenient to operate in the
reverse direction: When working on a node, you might want to check if the parent node satisfies a
certain property.

PHP-Parser does not add parent (or sibling) references to nodes by default, but you can enable them
using the `ParentConnectingVisitor` or `NodeConnectingVisitor`. See the [FAQ](FAQ.markdown) for
more information.


================================================
FILE: grammar/README.md
================================================
What do all those files mean?
=============================

 * `php.y`:              PHP 5-8 grammar written in a pseudo language
 * `parser.template`:    A `kmyacc` parser prototype file for PHP
 * `rebuildParsers.php`: Preprocesses the grammar and builds the parser using `kmyacc`

.phpy pseudo language
=====================

The `.y` file is a normal grammar in `kmyacc` (`yacc`) style, with some transformations
applied to it:

 * Nodes are created using the syntax `Name[..., ...]`. This is transformed into
   `new Name(..., ..., attributes())`
 * Some function-like constructs are resolved (see `rebuildParsers.php` for a list)

Building the parser
===================

Run `php grammar/rebuildParsers.php` to rebuild the parsers. Additional options:

 * The `KMYACC` environment variable can be used to specify an alternative `kmyacc` binary.
   By default the `phpyacc` dev dependency will be used. To use the original `kmyacc`, you
   need to compile [moriyoshi's fork](https://github.com/moriyoshi/kmyacc-forked).
 * The `--debug` option enables emission of debug symbols and creates the `y.output` file.
 * The `--keep-tmp-grammar` option preserves the preprocessed grammar file.


================================================
FILE: grammar/parser.template
================================================
<?php declare(strict_types=1);
$meta #
#semval($) $self->semValue
#semval($,%t) $self->semValue
#semval(%n) $stackPos-(%l-%n)
#semval(%n,%t) $stackPos-(%l-%n)

namespace PhpParser\Parser;

use PhpParser\Error;
use PhpParser\Modifiers;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar;
use PhpParser\Node\Stmt;
#include;

/* This is an automatically GENERATED file, which should not be manually edited.
 * Instead edit one of the following:
 *  * the grammar file grammar/php.y
 *  * the skeleton file grammar/parser.template
 *  * the preprocessing script grammar/rebuildParsers.php
 */
class #(-p) extends \PhpParser\ParserAbstract
{
#tokenval
    public const %s = %n;
#endtokenval

    protected int $tokenToSymbolMapSize = #(YYMAXLEX);
    protected int $actionTableSize = #(YYLAST);
    protected int $gotoTableSize = #(YYGLAST);

    protected int $invalidSymbol = #(YYBADCH);
    protected int $errorSymbol = #(YYINTERRTOK);
    protected int $defaultAction = #(YYDEFAULT);
    protected int $unexpectedTokenRule = #(YYUNEXPECTED);

    protected int $YY2TBLSTATE = #(YY2TBLSTATE);
    protected int $numNonLeafStates = #(YYNLSTATES);

    protected array $symbolToName = array(
        #listvar terminals
    );

    protected array $tokenToSymbol = array(
        #listvar yytranslate
    );

    protected array $action = array(
        #listvar yyaction
    );

    protected array $actionCheck = array(
        #listvar yycheck
    );

    protected array $actionBase = array(
        #listvar yybase
    );

    protected array $actionDefault = array(
        #listvar yydefault
    );

    protected array $goto = array(
        #listvar yygoto
    );

    protected array $gotoCheck = array(
        #listvar yygcheck
    );

    protected array $gotoBase = array(
        #listvar yygbase
    );

    protected array $gotoDefault = array(
        #listvar yygdefault
    );

    protected array $ruleToNonTerminal = array(
        #listvar yylhs
    );

    protected array $ruleToLength = array(
        #listvar yylen
    );
#if -t

    protected array $productions = array(
        #production-strings;
    );
#endif

    protected function initReduceCallbacks(): void {
        $this->reduceCallbacks = [
#reduce
            %n => static function ($self, $stackPos) {
                %b
            },
#noact
            %n => null,
#endreduce
        ];
    }
}
#tailcode;


================================================
FILE: grammar/php.y
================================================
%pure_parser
%expect 2

%right T_VOID_CAST
%right T_THROW
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%left ','
%left T_LOGICAL_OR
%left T_LOGICAL_XOR
%left T_LOGICAL_AND
%right T_PRINT
%right T_YIELD
%right T_DOUBLE_ARROW
%right T_YIELD_FROM
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL T_COALESCE_EQUAL
%left '?' ':'
%right T_COALESCE
%left T_BOOLEAN_OR
%left T_BOOLEAN_AND
%left '|'
%left '^'
%left T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
#if PHP7
%left T_SL T_SR
%left '+' '-' '.'
#endif
#if PHP8
%left T_PIPE
%left '.'
%left T_SL T_SR
%left '+' '-'
#endif
%left '*' '/' '%'
%right '!'
%nonassoc T_INSTANCEOF
%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
%right T_POW
%right '['
%nonassoc T_NEW T_CLONE
%token T_EXIT
%token T_IF
%left T_ELSEIF
%left T_ELSE
%left T_ENDIF
%token T_LNUMBER
%token T_DNUMBER
%token T_STRING
%token T_STRING_VARNAME
%token T_VARIABLE
%token T_NUM_STRING
%token T_INLINE_HTML
%token T_ENCAPSED_AND_WHITESPACE
%token T_CONSTANT_ENCAPSED_STRING
%token T_ECHO
%token T_DO
%token T_WHILE
%token T_ENDWHILE
%token T_FOR
%token T_ENDFOR
%token T_FOREACH
%token T_ENDFOREACH
%token T_DECLARE
%token T_ENDDECLARE
%token T_AS
%token T_SWITCH
%token T_MATCH
%token T_ENDSWITCH
%token T_CASE
%token T_DEFAULT
%token T_BREAK
%token T_CONTINUE
%token T_GOTO
%token T_FUNCTION
%token T_FN
%token T_CONST
%token T_RETURN
%token T_TRY
%token T_CATCH
%token T_FINALLY
%token T_THROW
%token T_USE
%token T_INSTEADOF
%token T_GLOBAL
%token T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC T_READONLY
%token T_PUBLIC_SET
%token T_PROTECTED_SET
%token T_PRIVATE_SET
%token T_VAR
%token T_UNSET
%token T_ISSET
%token T_EMPTY
%token T_HALT_COMPILER
%token T_CLASS
%token T_TRAIT
%token T_INTERFACE
%token T_ENUM
%token T_EXTENDS
%token T_IMPLEMENTS
%token T_OBJECT_OPERATOR
%token T_NULLSAFE_OBJECT_OPERATOR
%token T_DOUBLE_ARROW
%token T_LIST
%token T_ARRAY
%token T_CALLABLE
%token T_CLASS_C
%token T_TRAIT_C
%token T_METHOD_C
%token T_FUNC_C
%token T_PROPERTY_C
%token T_LINE
%token T_FILE
%token T_START_HEREDOC
%token T_END_HEREDOC
%token T_DOLLAR_OPEN_CURLY_BRACES
%token T_CURLY_OPEN
%token T_PAAMAYIM_NEKUDOTAYIM
%token T_NAMESPACE
%token T_NS_C
%token T_DIR
%token T_NS_SEPARATOR
%token T_ELLIPSIS
%token T_NAME_FULLY_QUALIFIED
%token T_NAME_QUALIFIED
%token T_NAME_RELATIVE
%token T_ATTRIBUTE
%token T_ENUM

%%

start:
    top_statement_list                                      { $$ = $this->handleNamespaces($1); }
;

top_statement_list_ex:
      top_statement_list_ex top_statement                   { pushNormalizing($1, $2); }
    | /* empty */                                           { init(); }
;

top_statement_list:
      top_statement_list_ex
          { makeZeroLengthNop($nop);
            if ($nop !== null) { $1[] = $nop; } $$ = $1; }
;

ampersand:
      T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG
    | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG
;

reserved_non_modifiers:
      T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND
    | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_DO | T_WHILE
    | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH
    | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO
    | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT
    | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS
    | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_FN
    | T_MATCH | T_ENUM
    | T_ECHO { $$ = $1; if ($$ === "<?=") $this->emitError(new Error('Cannot use "<?=" as an identifier', attributes())); }
;

semi_reserved:
      reserved_non_modifiers
    | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC | T_READONLY
;

identifier_maybe_reserved:
      T_STRING               
Download .txt
gitextract_zfx_1jy8/

├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       └── main.yml
├── .gitignore
├── .php-cs-fixer.dist.php
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── UPGRADE-1.0.md
├── UPGRADE-2.0.md
├── UPGRADE-3.0.md
├── UPGRADE-4.0.md
├── UPGRADE-5.0.md
├── bin/
│   └── php-parse
├── composer.json
├── doc/
│   ├── 0_Introduction.markdown
│   ├── 2_Usage_of_basic_components.markdown
│   ├── README.md
│   └── component/
│       ├── AST_builders.markdown
│       ├── Constant_expression_evaluation.markdown
│       ├── Error_handling.markdown
│       ├── FAQ.markdown
│       ├── JSON_representation.markdown
│       ├── Lexer.markdown
│       ├── Name_resolution.markdown
│       ├── Performance.markdown
│       ├── Pretty_printing.markdown
│       └── Walking_the_AST.markdown
├── grammar/
│   ├── README.md
│   ├── parser.template
│   ├── php.y
│   ├── phpyLang.php
│   └── rebuildParsers.php
├── lib/
│   └── PhpParser/
│       ├── Builder/
│       │   ├── ClassConst.php
│       │   ├── Class_.php
│       │   ├── Declaration.php
│       │   ├── EnumCase.php
│       │   ├── Enum_.php
│       │   ├── FunctionLike.php
│       │   ├── Function_.php
│       │   ├── Interface_.php
│       │   ├── Method.php
│       │   ├── Namespace_.php
│       │   ├── Param.php
│       │   ├── Property.php
│       │   ├── TraitUse.php
│       │   ├── TraitUseAdaptation.php
│       │   ├── Trait_.php
│       │   └── Use_.php
│       ├── Builder.php
│       ├── BuilderFactory.php
│       ├── BuilderHelpers.php
│       ├── Comment/
│       │   └── Doc.php
│       ├── Comment.php
│       ├── ConstExprEvaluationException.php
│       ├── ConstExprEvaluator.php
│       ├── Error.php
│       ├── ErrorHandler/
│       │   ├── Collecting.php
│       │   └── Throwing.php
│       ├── ErrorHandler.php
│       ├── Internal/
│       │   ├── DiffElem.php
│       │   ├── Differ.php
│       │   ├── PrintableNewAnonClassNode.php
│       │   ├── TokenPolyfill.php
│       │   └── TokenStream.php
│       ├── JsonDecoder.php
│       ├── Lexer/
│       │   ├── Emulative.php
│       │   └── TokenEmulator/
│       │       ├── AsymmetricVisibilityTokenEmulator.php
│       │       ├── AttributeEmulator.php
│       │       ├── EnumTokenEmulator.php
│       │       ├── ExplicitOctalEmulator.php
│       │       ├── FnTokenEmulator.php
│       │       ├── KeywordEmulator.php
│       │       ├── MatchTokenEmulator.php
│       │       ├── NullsafeTokenEmulator.php
│       │       ├── PipeOperatorEmulator.php
│       │       ├── PropertyTokenEmulator.php
│       │       ├── ReadonlyFunctionTokenEmulator.php
│       │       ├── ReadonlyTokenEmulator.php
│       │       ├── ReverseEmulator.php
│       │       ├── TokenEmulator.php
│       │       └── VoidCastEmulator.php
│       ├── Lexer.php
│       ├── Modifiers.php
│       ├── NameContext.php
│       ├── Node/
│       │   ├── Arg.php
│       │   ├── ArrayItem.php
│       │   ├── Attribute.php
│       │   ├── AttributeGroup.php
│       │   ├── ClosureUse.php
│       │   ├── ComplexType.php
│       │   ├── Const_.php
│       │   ├── DeclareItem.php
│       │   ├── Expr/
│       │   │   ├── ArrayDimFetch.php
│       │   │   ├── ArrayItem.php
│       │   │   ├── Array_.php
│       │   │   ├── ArrowFunction.php
│       │   │   ├── Assign.php
│       │   │   ├── AssignOp/
│       │   │   │   ├── BitwiseAnd.php
│       │   │   │   ├── BitwiseOr.php
│       │   │   │   ├── BitwiseXor.php
│       │   │   │   ├── Coalesce.php
│       │   │   │   ├── Concat.php
│       │   │   │   ├── Div.php
│       │   │   │   ├── Minus.php
│       │   │   │   ├── Mod.php
│       │   │   │   ├── Mul.php
│       │   │   │   ├── Plus.php
│       │   │   │   ├── Pow.php
│       │   │   │   ├── ShiftLeft.php
│       │   │   │   └── ShiftRight.php
│       │   │   ├── AssignOp.php
│       │   │   ├── AssignRef.php
│       │   │   ├── BinaryOp/
│       │   │   │   ├── BitwiseAnd.php
│       │   │   │   ├── BitwiseOr.php
│       │   │   │   ├── BitwiseXor.php
│       │   │   │   ├── BooleanAnd.php
│       │   │   │   ├── BooleanOr.php
│       │   │   │   ├── Coalesce.php
│       │   │   │   ├── Concat.php
│       │   │   │   ├── Div.php
│       │   │   │   ├── Equal.php
│       │   │   │   ├── Greater.php
│       │   │   │   ├── GreaterOrEqual.php
│       │   │   │   ├── Identical.php
│       │   │   │   ├── LogicalAnd.php
│       │   │   │   ├── LogicalOr.php
│       │   │   │   ├── LogicalXor.php
│       │   │   │   ├── Minus.php
│       │   │   │   ├── Mod.php
│       │   │   │   ├── Mul.php
│       │   │   │   ├── NotEqual.php
│       │   │   │   ├── NotIdentical.php
│       │   │   │   ├── Pipe.php
│       │   │   │   ├── Plus.php
│       │   │   │   ├── Pow.php
│       │   │   │   ├── ShiftLeft.php
│       │   │   │   ├── ShiftRight.php
│       │   │   │   ├── Smaller.php
│       │   │   │   ├── SmallerOrEqual.php
│       │   │   │   └── Spaceship.php
│       │   │   ├── BinaryOp.php
│       │   │   ├── BitwiseNot.php
│       │   │   ├── BooleanNot.php
│       │   │   ├── CallLike.php
│       │   │   ├── Cast/
│       │   │   │   ├── Array_.php
│       │   │   │   ├── Bool_.php
│       │   │   │   ├── Double.php
│       │   │   │   ├── Int_.php
│       │   │   │   ├── Object_.php
│       │   │   │   ├── String_.php
│       │   │   │   ├── Unset_.php
│       │   │   │   └── Void_.php
│       │   │   ├── Cast.php
│       │   │   ├── ClassConstFetch.php
│       │   │   ├── Clone_.php
│       │   │   ├── Closure.php
│       │   │   ├── ClosureUse.php
│       │   │   ├── ConstFetch.php
│       │   │   ├── Empty_.php
│       │   │   ├── Error.php
│       │   │   ├── ErrorSuppress.php
│       │   │   ├── Eval_.php
│       │   │   ├── Exit_.php
│       │   │   ├── FuncCall.php
│       │   │   ├── Include_.php
│       │   │   ├── Instanceof_.php
│       │   │   ├── Isset_.php
│       │   │   ├── List_.php
│       │   │   ├── Match_.php
│       │   │   ├── MethodCall.php
│       │   │   ├── New_.php
│       │   │   ├── NullsafeMethodCall.php
│       │   │   ├── NullsafePropertyFetch.php
│       │   │   ├── PostDec.php
│       │   │   ├── PostInc.php
│       │   │   ├── PreDec.php
│       │   │   ├── PreInc.php
│       │   │   ├── Print_.php
│       │   │   ├── PropertyFetch.php
│       │   │   ├── ShellExec.php
│       │   │   ├── StaticCall.php
│       │   │   ├── StaticPropertyFetch.php
│       │   │   ├── Ternary.php
│       │   │   ├── Throw_.php
│       │   │   ├── UnaryMinus.php
│       │   │   ├── UnaryPlus.php
│       │   │   ├── Variable.php
│       │   │   ├── YieldFrom.php
│       │   │   └── Yield_.php
│       │   ├── Expr.php
│       │   ├── FunctionLike.php
│       │   ├── Identifier.php
│       │   ├── InterpolatedStringPart.php
│       │   ├── IntersectionType.php
│       │   ├── MatchArm.php
│       │   ├── Name/
│       │   │   ├── FullyQualified.php
│       │   │   └── Relative.php
│       │   ├── Name.php
│       │   ├── NullableType.php
│       │   ├── Param.php
│       │   ├── PropertyHook.php
│       │   ├── PropertyItem.php
│       │   ├── Scalar/
│       │   │   ├── DNumber.php
│       │   │   ├── Encapsed.php
│       │   │   ├── EncapsedStringPart.php
│       │   │   ├── Float_.php
│       │   │   ├── Int_.php
│       │   │   ├── InterpolatedString.php
│       │   │   ├── LNumber.php
│       │   │   ├── MagicConst/
│       │   │   │   ├── Class_.php
│       │   │   │   ├── Dir.php
│       │   │   │   ├── File.php
│       │   │   │   ├── Function_.php
│       │   │   │   ├── Line.php
│       │   │   │   ├── Method.php
│       │   │   │   ├── Namespace_.php
│       │   │   │   ├── Property.php
│       │   │   │   └── Trait_.php
│       │   │   ├── MagicConst.php
│       │   │   └── String_.php
│       │   ├── Scalar.php
│       │   ├── StaticVar.php
│       │   ├── Stmt/
│       │   │   ├── Block.php
│       │   │   ├── Break_.php
│       │   │   ├── Case_.php
│       │   │   ├── Catch_.php
│       │   │   ├── ClassConst.php
│       │   │   ├── ClassLike.php
│       │   │   ├── ClassMethod.php
│       │   │   ├── Class_.php
│       │   │   ├── Const_.php
│       │   │   ├── Continue_.php
│       │   │   ├── DeclareDeclare.php
│       │   │   ├── Declare_.php
│       │   │   ├── Do_.php
│       │   │   ├── Echo_.php
│       │   │   ├── ElseIf_.php
│       │   │   ├── Else_.php
│       │   │   ├── EnumCase.php
│       │   │   ├── Enum_.php
│       │   │   ├── Expression.php
│       │   │   ├── Finally_.php
│       │   │   ├── For_.php
│       │   │   ├── Foreach_.php
│       │   │   ├── Function_.php
│       │   │   ├── Global_.php
│       │   │   ├── Goto_.php
│       │   │   ├── GroupUse.php
│       │   │   ├── HaltCompiler.php
│       │   │   ├── If_.php
│       │   │   ├── InlineHTML.php
│       │   │   ├── Interface_.php
│       │   │   ├── Label.php
│       │   │   ├── Namespace_.php
│       │   │   ├── Nop.php
│       │   │   ├── Property.php
│       │   │   ├── PropertyProperty.php
│       │   │   ├── Return_.php
│       │   │   ├── StaticVar.php
│       │   │   ├── Static_.php
│       │   │   ├── Switch_.php
│       │   │   ├── TraitUse.php
│       │   │   ├── TraitUseAdaptation/
│       │   │   │   ├── Alias.php
│       │   │   │   └── Precedence.php
│       │   │   ├── TraitUseAdaptation.php
│       │   │   ├── Trait_.php
│       │   │   ├── TryCatch.php
│       │   │   ├── Unset_.php
│       │   │   ├── UseUse.php
│       │   │   ├── Use_.php
│       │   │   └── While_.php
│       │   ├── Stmt.php
│       │   ├── UnionType.php
│       │   ├── UseItem.php
│       │   ├── VarLikeIdentifier.php
│       │   └── VariadicPlaceholder.php
│       ├── Node.php
│       ├── NodeAbstract.php
│       ├── NodeDumper.php
│       ├── NodeFinder.php
│       ├── NodeTraverser.php
│       ├── NodeTraverserInterface.php
│       ├── NodeVisitor/
│       │   ├── CloningVisitor.php
│       │   ├── CommentAnnotatingVisitor.php
│       │   ├── FindingVisitor.php
│       │   ├── FirstFindingVisitor.php
│       │   ├── NameResolver.php
│       │   ├── NodeConnectingVisitor.php
│       │   └── ParentConnectingVisitor.php
│       ├── NodeVisitor.php
│       ├── NodeVisitorAbstract.php
│       ├── Parser/
│       │   ├── Php7.php
│       │   └── Php8.php
│       ├── Parser.php
│       ├── ParserAbstract.php
│       ├── ParserFactory.php
│       ├── PhpVersion.php
│       ├── PrettyPrinter/
│       │   └── Standard.php
│       ├── PrettyPrinter.php
│       ├── PrettyPrinterAbstract.php
│       ├── Token.php
│       └── compatibility_tokens.php
├── phpstan-baseline.neon
├── phpstan.neon.dist
├── phpunit.xml.dist
├── test/
│   ├── PhpParser/
│   │   ├── Builder/
│   │   │   ├── ClassConstTest.php
│   │   │   ├── ClassTest.php
│   │   │   ├── EnumCaseTest.php
│   │   │   ├── EnumTest.php
│   │   │   ├── FunctionTest.php
│   │   │   ├── InterfaceTest.php
│   │   │   ├── MethodTest.php
│   │   │   ├── NamespaceTest.php
│   │   │   ├── ParamTest.php
│   │   │   ├── PropertyTest.php
│   │   │   ├── TraitTest.php
│   │   │   ├── TraitUseAdaptationTest.php
│   │   │   ├── TraitUseTest.php
│   │   │   └── UseTest.php
│   │   ├── BuilderFactoryTest.php
│   │   ├── BuilderHelpersTest.php
│   │   ├── CodeParsingTest.php
│   │   ├── CodeTestAbstract.php
│   │   ├── CodeTestParser.php
│   │   ├── CommentTest.php
│   │   ├── CompatibilityTest.php
│   │   ├── ConstExprEvaluatorTest.php
│   │   ├── ErrorHandler/
│   │   │   ├── CollectingTest.php
│   │   │   └── ThrowingTest.php
│   │   ├── ErrorTest.php
│   │   ├── Internal/
│   │   │   └── DifferTest.php
│   │   ├── JsonDecoderTest.php
│   │   ├── Lexer/
│   │   │   └── EmulativeTest.php
│   │   ├── LexerTest.php
│   │   ├── ModifiersTest.php
│   │   ├── NameContextTest.php
│   │   ├── Node/
│   │   │   ├── Expr/
│   │   │   │   └── CallableLikeTest.php
│   │   │   ├── IdentifierTest.php
│   │   │   ├── NameTest.php
│   │   │   ├── ParamTest.php
│   │   │   ├── PropertyHookTest.php
│   │   │   ├── Scalar/
│   │   │   │   ├── DNumberTest.php
│   │   │   │   ├── MagicConstTest.php
│   │   │   │   ├── NumberTest.php
│   │   │   │   └── StringTest.php
│   │   │   └── Stmt/
│   │   │       ├── ClassConstTest.php
│   │   │       ├── ClassMethodTest.php
│   │   │       ├── ClassTest.php
│   │   │       ├── InterfaceTest.php
│   │   │       └── PropertyTest.php
│   │   ├── NodeAbstractTest.php
│   │   ├── NodeDumperTest.php
│   │   ├── NodeFinderTest.php
│   │   ├── NodeTraverserTest.php
│   │   ├── NodeVisitor/
│   │   │   ├── FindingVisitorTest.php
│   │   │   ├── FirstFindingVisitorTest.php
│   │   │   ├── NameResolverTest.php
│   │   │   ├── NodeConnectingVisitorTest.php
│   │   │   └── ParentConnectingVisitorTest.php
│   │   ├── NodeVisitorForTesting.php
│   │   ├── Parser/
│   │   │   ├── Php7Test.php
│   │   │   └── Php8Test.php
│   │   ├── ParserFactoryTest.php
│   │   ├── ParserTestAbstract.php
│   │   ├── PhpVersionTest.php
│   │   ├── PrettyPrinterTest.php
│   │   └── TokenTest.php
│   ├── bootstrap.php
│   ├── code/
│   │   ├── formatPreservation/
│   │   │   ├── addingPropertyType.test
│   │   │   ├── anonClasses.test
│   │   │   ├── arrayInsertionWithComments.test
│   │   │   ├── array_spread.test
│   │   │   ├── arrow_function.test
│   │   │   ├── attributes.test
│   │   │   ├── basic.test
│   │   │   ├── blockConversion.test
│   │   │   ├── classMethodNop.test
│   │   │   ├── closure.test
│   │   │   ├── comments.test
│   │   │   ├── constants.test
│   │   │   ├── delAfterIdentifier.test
│   │   │   ├── emptyListInsertion.test
│   │   │   ├── enum.test
│   │   │   ├── fixup.test
│   │   │   ├── group_use.test
│   │   │   ├── indent.test
│   │   │   ├── inlineHtml.test
│   │   │   ├── insertionOfNullable.test
│   │   │   ├── listInsertion.test
│   │   │   ├── listInsertionIndentation.test
│   │   │   ├── listRemoval.test
│   │   │   ├── match.test
│   │   │   ├── modifierChange.test
│   │   │   ├── namedArgs.test
│   │   │   ├── nopCommentAtEnd.test
│   │   │   ├── property_hooks.test
│   │   │   ├── removalViaNull.test
│   │   │   ├── removingPropertyType.test
│   │   │   ├── rewriteVariableInterpolationString.test
│   │   │   └── traitAlias.test
│   │   ├── parser/
│   │   │   ├── blockComments.test
│   │   │   ├── commentAtEndOfClass.test
│   │   │   ├── comments.test
│   │   │   ├── emptyFile.test
│   │   │   ├── errorHandling/
│   │   │   │   ├── eofError.test
│   │   │   │   ├── lexerErrors.test
│   │   │   │   └── recovery.test
│   │   │   ├── expr/
│   │   │   │   ├── alternative_array_syntax.test
│   │   │   │   ├── arrayDef.test
│   │   │   │   ├── arrayDestructuring.test
│   │   │   │   ├── arrayEmptyElemens.test
│   │   │   │   ├── arraySpread.test
│   │   │   │   ├── arrow_function.test
│   │   │   │   ├── assign.test
│   │   │   │   ├── assignNewByRef.test
│   │   │   │   ├── cast.test
│   │   │   │   ├── clone.test
│   │   │   │   ├── closure.test
│   │   │   │   ├── closure_use_trailing_comma.test
│   │   │   │   ├── comparison.test
│   │   │   │   ├── concatPrecedence.test
│   │   │   │   ├── constant_expr.test
│   │   │   │   ├── dynamicClassConst.test
│   │   │   │   ├── errorSuppress.test
│   │   │   │   ├── exit.test
│   │   │   │   ├── exprInIsset.test
│   │   │   │   ├── exprInList.test
│   │   │   │   ├── fetchAndCall/
│   │   │   │   │   ├── args.test
│   │   │   │   │   ├── constFetch.test
│   │   │   │   │   ├── constantDeref.test
│   │   │   │   │   ├── funcCall.test
│   │   │   │   │   ├── namedArgs.test
│   │   │   │   │   ├── newDeref.test
│   │   │   │   │   ├── objectAccess.test
│   │   │   │   │   ├── simpleArrayAccess.test
│   │   │   │   │   ├── staticCall.test
│   │   │   │   │   └── staticPropertyFetch.test
│   │   │   │   ├── firstClassCallables.test
│   │   │   │   ├── includeAndEval.test
│   │   │   │   ├── issetAndEmpty.test
│   │   │   │   ├── keywordsInNamespacedName.test
│   │   │   │   ├── listReferences.test
│   │   │   │   ├── listWithKeys.test
│   │   │   │   ├── logic.test
│   │   │   │   ├── match.test
│   │   │   │   ├── math.test
│   │   │   │   ├── new.test
│   │   │   │   ├── newDeref.test
│   │   │   │   ├── newWithoutClass.test
│   │   │   │   ├── nullsafe.test
│   │   │   │   ├── pipe.test
│   │   │   │   ├── print.test
│   │   │   │   ├── shellExec.test
│   │   │   │   ├── ternaryAndCoalesce.test
│   │   │   │   ├── throw.test
│   │   │   │   ├── trailingCommas.test
│   │   │   │   ├── uvs/
│   │   │   │   │   ├── constDeref.test
│   │   │   │   │   ├── globalNonSimpleVarError.test
│   │   │   │   │   ├── indirectCall.test
│   │   │   │   │   ├── isset.test
│   │   │   │   │   ├── misc.test
│   │   │   │   │   ├── new.test
│   │   │   │   │   ├── newInstanceofExpr.test
│   │   │   │   │   └── staticProperty.test
│   │   │   │   ├── varVarPos.test
│   │   │   │   └── variable.test
│   │   │   ├── formattingAttributes.test
│   │   │   ├── nopPositions.test
│   │   │   ├── scalar/
│   │   │   │   ├── constantString.test
│   │   │   │   ├── docString.test
│   │   │   │   ├── docStringNewlines.test
│   │   │   │   ├── encapsedNegVarOffset.test
│   │   │   │   ├── encapsedString.test
│   │   │   │   ├── explicitOctal.test
│   │   │   │   ├── flexibleDocString.test
│   │   │   │   ├── flexibleDocStringErrors.test
│   │   │   │   ├── float.test
│   │   │   │   ├── int.test
│   │   │   │   ├── invalidOctal.test
│   │   │   │   ├── magicConst.test
│   │   │   │   ├── numberSeparators.test
│   │   │   │   └── unicodeEscape.test
│   │   │   ├── semiReserved.test
│   │   │   └── stmt/
│   │   │       ├── attributes.test
│   │   │       ├── blocklessStatement.test
│   │   │       ├── class/
│   │   │       │   ├── abstract.test
│   │   │       │   ├── anonymous.test
│   │   │       │   ├── asymmetric_visibility.test
│   │   │       │   ├── class_position.test
│   │   │       │   ├── conditional.test
│   │   │       │   ├── constModifierErrors.test
│   │   │       │   ├── constModifiers.test
│   │   │       │   ├── enum.test
│   │   │       │   ├── enum_with_string.test
│   │   │       │   ├── final.test
│   │   │       │   ├── implicitPublic.test
│   │   │       │   ├── interface.test
│   │   │       │   ├── modifier_error.test
│   │   │       │   ├── name.test
│   │   │       │   ├── php4Style.test
│   │   │       │   ├── propertyTypes.test
│   │   │       │   ├── property_hooks.test
│   │   │       │   ├── property_modifiers.test
│   │   │       │   ├── property_promotion.test
│   │   │       │   ├── readonly.test
│   │   │       │   ├── readonlyAnonyous.test
│   │   │       │   ├── readonlyAsClassName.test
│   │   │       │   ├── readonlyMethod.test
│   │   │       │   ├── shortEchoAsIdentifier.test
│   │   │       │   ├── simple.test
│   │   │       │   ├── staticMethod.test
│   │   │       │   ├── staticType.test
│   │   │       │   ├── trait.test
│   │   │       │   └── typedConstants.test
│   │   │       ├── const.test
│   │   │       ├── controlFlow.test
│   │   │       ├── declare.test
│   │   │       ├── echo.test
│   │   │       ├── function/
│   │   │       │   ├── builtinTypeDeclarations.test
│   │   │       │   ├── byRef.test
│   │   │       │   ├── clone_function.test
│   │   │       │   ├── conditional.test
│   │   │       │   ├── defaultValues.test
│   │   │       │   ├── disjointNormalFormTypes.test
│   │   │       │   ├── exit_die_function.test
│   │   │       │   ├── fn.test
│   │   │       │   ├── intersectionTypes.test
│   │   │       │   ├── invalidVoidParam.test
│   │   │       │   ├── neverType.test
│   │   │       │   ├── nullFalseTrueTypes.test
│   │   │       │   ├── nullableTypes.test
│   │   │       │   ├── parameters_trailing_comma.test
│   │   │       │   ├── readonlyFunction.test
│   │   │       │   ├── returnTypes.test
│   │   │       │   ├── specialVars.test
│   │   │       │   ├── typeDeclarations.test
│   │   │       │   ├── typeVersions.test
│   │   │       │   ├── unionTypes.test
│   │   │       │   ├── validVoidParam.test
│   │   │       │   ├── variadic.test
│   │   │       │   └── variadicDefaultValue.test
│   │   │       ├── generator/
│   │   │       │   ├── basic.test
│   │   │       │   ├── yieldPrecedence.test
│   │   │       │   └── yieldUnaryPrecedence.test
│   │   │       ├── haltCompiler.test
│   │   │       ├── haltCompilerInvalidSyntax.test
│   │   │       ├── haltCompilerOffset.test
│   │   │       ├── haltCompilerOutermostScope.test
│   │   │       ├── hashbang.test
│   │   │       ├── if.test
│   │   │       ├── inlineHTML.test
│   │   │       ├── loop/
│   │   │       │   ├── do.test
│   │   │       │   ├── for.test
│   │   │       │   ├── foreach.test
│   │   │       │   └── while.test
│   │   │       ├── multiCatch.test
│   │   │       ├── namespace/
│   │   │       │   ├── alias.test
│   │   │       │   ├── braced.test
│   │   │       │   ├── commentAfterNamespace.test
│   │   │       │   ├── groupUse.test
│   │   │       │   ├── groupUseErrors.test
│   │   │       │   ├── groupUsePositions.test
│   │   │       │   ├── groupUseTrailingComma.test
│   │   │       │   ├── invalidName.test
│   │   │       │   ├── mix.test
│   │   │       │   ├── name.test
│   │   │       │   ├── nested.test
│   │   │       │   ├── notBraced.test
│   │   │       │   ├── nsAfterHashbang.test
│   │   │       │   ├── outsideStmt.test
│   │   │       │   └── outsideStmtInvalid.test
│   │   │       ├── newInInitializer.test
│   │   │       ├── switch.test
│   │   │       ├── tryCatch.test
│   │   │       ├── tryCatch_without_variable.test
│   │   │       ├── tryWithoutCatch.test
│   │   │       ├── unset.test
│   │   │       └── voidCast.test
│   │   └── prettyPrinter/
│   │       ├── comments.test
│   │       ├── commentsInCommaList.test
│   │       ├── expr/
│   │       │   ├── anonymousClass.test
│   │       │   ├── arrayDestructuring.test
│   │       │   ├── arraySpread.test
│   │       │   ├── arrow_function.test
│   │       │   ├── call.test
│   │       │   ├── cast.test
│   │       │   ├── closure.test
│   │       │   ├── constant_deref.test
│   │       │   ├── docStrings.test
│   │       │   ├── dynamicClassConstFetch.test
│   │       │   ├── firstClassCallables.test
│   │       │   ├── include.test
│   │       │   ├── intrinsics.test
│   │       │   ├── list.test
│   │       │   ├── literals.test
│   │       │   ├── match.test
│   │       │   ├── namedArgs.test
│   │       │   ├── newDerefParentheses.test
│   │       │   ├── newVariable.test
│   │       │   ├── nullsafe.test
│   │       │   ├── numbers.test
│   │       │   ├── operators.test
│   │       │   ├── parentheses.test
│   │       │   ├── pipe.test
│   │       │   ├── shortArraySyntax.test
│   │       │   ├── stringEscaping.test
│   │       │   ├── throw.test
│   │       │   ├── uvs.test
│   │       │   ├── variables.test
│   │       │   └── yield.test
│   │       ├── indent.test
│   │       ├── inlineHTMLandPHPtest.file-test
│   │       ├── nestedInlineHTML.test
│   │       ├── onlyInlineHTML.file-test
│   │       ├── onlyPHP.file-test
│   │       └── stmt/
│   │           ├── alias.test
│   │           ├── asymmetric_visibility.test
│   │           ├── attributes.test
│   │           ├── block.test
│   │           ├── break_continue.test
│   │           ├── class.test
│   │           ├── class_const.test
│   │           ├── const.test
│   │           ├── declare.test
│   │           ├── disjointNormalFormTypes.test
│   │           ├── do_while.test
│   │           ├── enum.test
│   │           ├── for.test
│   │           ├── foreach.test
│   │           ├── function_signatures.test
│   │           ├── global_static_variables.test
│   │           ├── goto.test
│   │           ├── groupUse.test
│   │           ├── haltCompiler.file-test
│   │           ├── if.test
│   │           ├── intersection_types.test
│   │           ├── multiCatch.test
│   │           ├── namespaces.test
│   │           ├── nullable_types.test
│   │           ├── param_comments.test
│   │           ├── properties.test
│   │           ├── property_hooks.test
│   │           ├── property_promotion.test
│   │           ├── readonly_class.test
│   │           ├── staticType.test
│   │           ├── switch.test
│   │           ├── throw.test
│   │           ├── traitUse.test
│   │           ├── tryCatch.test
│   │           ├── tryCatch_without_variable.test
│   │           ├── union_types.test
│   │           ├── voidCast.test
│   │           └── while.test
│   ├── fixtures/
│   │   └── Suit.php
│   └── updateTests.php
├── test_old/
│   ├── run-php-src.sh
│   └── run.php
└── tools/
    ├── composer.json
    └── fuzzing/
        ├── generateCorpus.php
        ├── php.dict
        └── target.php
Download .txt
SYMBOL INDEX (2042 symbols across 337 files)

FILE: grammar/phpyLang.php
  function preprocessGrammar (line 22) | function preprocessGrammar($code) {
  function resolveNodes (line 31) | function resolveNodes($code) {
  function resolveMacros (line 54) | function resolveMacros($code) {
  function assertArgs (line 133) | function assertArgs($num, $args, $name) {
  function resolveStackAccess (line 139) | function resolveStackAccess($code) {
  function removeTrailingWhitespace (line 145) | function removeTrailingWhitespace($code) {
  function regex (line 155) | function regex($regex) {
  function magicSplit (line 159) | function magicSplit($regex, $string) {

FILE: grammar/rebuildParsers.php
  function ensureDirExists (line 60) | function ensureDirExists($dir) {
  function execCmd (line 66) | function execCmd($cmd) {
  function replaceIfBlocks (line 75) | function replaceIfBlocks(string $code, array $defines): string {

FILE: lib/PhpParser/Builder.php
  type Builder (line 5) | interface Builder {
    method getNode (line 11) | public function getNode(): Node;

FILE: lib/PhpParser/Builder/ClassConst.php
  class ClassConst (line 15) | class ClassConst implements PhpParser\Builder {
    method __construct (line 33) | public function __construct($name, $value) {
    method addConst (line 45) | public function addConst($name, $value) {
    method makePublic (line 56) | public function makePublic() {
    method makeProtected (line 67) | public function makeProtected() {
    method makePrivate (line 78) | public function makePrivate() {
    method makeFinal (line 89) | public function makeFinal() {
    method setDocComment (line 102) | public function setDocComment($docComment) {
    method addAttribute (line 117) | public function addAttribute($attribute) {
    method setType (line 130) | public function setType($type) {
    method getNode (line 141) | public function getNode(): PhpParser\Node {

FILE: lib/PhpParser/Builder/Class_.php
  class Class_ (line 12) | class Class_ extends Declaration {
    method __construct (line 34) | public function __construct(string $name) {
    method extend (line 45) | public function extend($class) {
    method implement (line 58) | public function implement(...$interfaces) {
    method makeAbstract (line 71) | public function makeAbstract() {
    method makeFinal (line 82) | public function makeFinal() {
    method makeReadonly (line 93) | public function makeReadonly() {
    method addStmt (line 106) | public function addStmt($stmt) {
    method addAttribute (line 131) | public function addAttribute($attribute) {
    method getNode (line 142) | public function getNode(): PhpParser\Node {

FILE: lib/PhpParser/Builder/Declaration.php
  class Declaration (line 8) | abstract class Declaration implements PhpParser\Builder {
    method addStmt (line 19) | abstract public function addStmt($stmt);
    method addStmts (line 28) | public function addStmts(array $stmts) {
    method setDocComment (line 43) | public function setDocComment($docComment) {

FILE: lib/PhpParser/Builder/EnumCase.php
  class EnumCase (line 13) | class EnumCase implements PhpParser\Builder {
    method __construct (line 28) | public function __construct($name) {
    method setValue (line 39) | public function setValue($value) {
    method setDocComment (line 52) | public function setDocComment($docComment) {
    method addAttribute (line 67) | public function addAttribute($attribute) {
    method getNode (line 78) | public function getNode(): PhpParser\Node {

FILE: lib/PhpParser/Builder/Enum_.php
  class Enum_ (line 12) | class Enum_ extends Declaration {
    method __construct (line 33) | public function __construct(string $name) {
    method setScalarType (line 44) | public function setScalarType($scalarType) {
    method implement (line 57) | public function implement(...$interfaces) {
    method addStmt (line 72) | public function addStmt($stmt) {
    method addAttribute (line 97) | public function addAttribute($attribute) {
    method getNode (line 108) | public function getNode(): PhpParser\Node {

FILE: lib/PhpParser/Builder/FunctionLike.php
  class FunctionLike (line 8) | abstract class FunctionLike extends Declaration {
    method makeReturnByRef (line 21) | public function makeReturnByRef() {
    method addParam (line 34) | public function addParam($param) {
    method addParams (line 53) | public function addParams(array $params) {
    method setReturnType (line 68) | public function setReturnType($type) {

FILE: lib/PhpParser/Builder/Function_.php
  class Function_ (line 10) | class Function_ extends FunctionLike {
    method __construct (line 23) | public function __construct(string $name) {
    method addStmt (line 34) | public function addStmt($stmt) {
    method addAttribute (line 47) | public function addAttribute($attribute) {
    method getNode (line 58) | public function getNode(): Node {

FILE: lib/PhpParser/Builder/Interface_.php
  class Interface_ (line 11) | class Interface_ extends Declaration {
    method __construct (line 27) | public function __construct(string $name) {
    method extend (line 38) | public function extend(...$interfaces) {
    method addStmt (line 53) | public function addStmt($stmt) {
    method addAttribute (line 76) | public function addAttribute($attribute) {
    method getNode (line 87) | public function getNode(): PhpParser\Node {

FILE: lib/PhpParser/Builder/Method.php
  class Method (line 11) | class Method extends FunctionLike {
    method __construct (line 27) | public function __construct(string $name) {
    method makePublic (line 36) | public function makePublic() {
    method makeProtected (line 47) | public function makeProtected() {
    method makePrivate (line 58) | public function makePrivate() {
    method makeStatic (line 69) | public function makeStatic() {
    method makeAbstract (line 80) | public function makeAbstract() {
    method makeFinal (line 96) | public function makeFinal() {
    method addStmt (line 109) | public function addStmt($stmt) {
    method addAttribute (line 126) | public function addAttribute($attribute) {
    method getNode (line 137) | public function getNode(): Node {

FILE: lib/PhpParser/Builder/Namespace_.php
  class Namespace_ (line 10) | class Namespace_ extends Declaration {
    method __construct (line 20) | public function __construct($name) {
    method addStmt (line 31) | public function addStmt($stmt) {
    method getNode (line 42) | public function getNode(): Node {

FILE: lib/PhpParser/Builder/Param.php
  class Param (line 10) | class Param implements PhpParser\Builder {
    method __construct (line 26) | public function __construct(string $name) {
    method setDefault (line 37) | public function setDefault($value) {
    method setType (line 50) | public function setType($type) {
    method makeByRef (line 64) | public function makeByRef() {
    method makeVariadic (line 75) | public function makeVariadic() {
    method makePublic (line 86) | public function makePublic() {
    method makeProtected (line 97) | public function makeProtected() {
    method makePrivate (line 108) | public function makePrivate() {
    method makeReadonly (line 119) | public function makeReadonly() {
    method makePrivateSet (line 130) | public function makePrivateSet() {
    method makeProtectedSet (line 141) | public function makeProtectedSet() {
    method addAttribute (line 154) | public function addAttribute($attribute) {
    method getNode (line 165) | public function getNode(): Node {

FILE: lib/PhpParser/Builder/Property.php
  class Property (line 14) | class Property implements PhpParser\Builder {
    method __construct (line 34) | public function __construct(string $name) {
    method makePublic (line 43) | public function makePublic() {
    method makeProtected (line 54) | public function makeProtected() {
    method makePrivate (line 65) | public function makePrivate() {
    method makeStatic (line 76) | public function makeStatic() {
    method makeReadonly (line 87) | public function makeReadonly() {
    method makeAbstract (line 98) | public function makeAbstract() {
    method makeFinal (line 109) | public function makeFinal() {
    method makePrivateSet (line 120) | public function makePrivateSet() {
    method makeProtectedSet (line 131) | public function makeProtectedSet() {
    method setDefault (line 144) | public function setDefault($value) {
    method setDocComment (line 157) | public function setDocComment($docComment) {
    method setType (line 172) | public function setType($type) {
    method addAttribute (line 185) | public function addAttribute($attribute) {
    method addHook (line 196) | public function addHook(Node\PropertyHook $hook) {
    method getNode (line 207) | public function getNode(): PhpParser\Node {

FILE: lib/PhpParser/Builder/TraitUse.php
  class TraitUse (line 10) | class TraitUse implements Builder {
    method __construct (line 21) | public function __construct(...$traits) {
    method and (line 34) | public function and($trait) {
    method with (line 46) | public function with($adaptation) {
    method getNode (line 62) | public function getNode(): Node {

FILE: lib/PhpParser/Builder/TraitUseAdaptation.php
  class TraitUseAdaptation (line 11) | class TraitUseAdaptation implements Builder {
    method __construct (line 30) | public function __construct($trait, $method) {
    method as (line 44) | public function as($alias) {
    method makePublic (line 62) | public function makePublic() {
    method makeProtected (line 72) | public function makeProtected() {
    method makePrivate (line 82) | public function makePrivate() {
    method insteadof (line 94) | public function insteadof(...$traits) {
    method setModifier (line 114) | protected function setModifier(int $modifier): void {
    method getNode (line 135) | public function getNode(): Node {

FILE: lib/PhpParser/Builder/Trait_.php
  class Trait_ (line 10) | class Trait_ extends Declaration {
    method __construct (line 28) | public function __construct(string $name) {
    method addStmt (line 39) | public function addStmt($stmt) {
    method addAttribute (line 64) | public function addAttribute($attribute) {
    method getNode (line 75) | public function getNode(): PhpParser\Node {

FILE: lib/PhpParser/Builder/Use_.php
  class Use_ (line 10) | class Use_ implements Builder {
    method __construct (line 22) | public function __construct($name, int $type) {
    method as (line 34) | public function as(string $alias) {
    method getNode (line 44) | public function getNode(): Node {

FILE: lib/PhpParser/BuilderFactory.php
  class BuilderFactory (line 13) | class BuilderFactory {
    method attribute (line 20) | public function attribute($name, array $args = []): Node\Attribute {
    method namespace (line 34) | public function namespace($name): Builder\Namespace_ {
    method class (line 45) | public function class(string $name): Builder\Class_ {
    method interface (line 56) | public function interface(string $name): Builder\Interface_ {
    method trait (line 67) | public function trait(string $name): Builder\Trait_ {
    method enum (line 78) | public function enum(string $name): Builder\Enum_ {
    method useTrait (line 89) | public function useTrait(...$traits): Builder\TraitUse {
    method traitUseAdaptation (line 101) | public function traitUseAdaptation($trait, $method = null): Builder\Tr...
    method method (line 117) | public function method(string $name): Builder\Method {
    method param (line 128) | public function param(string $name): Builder\Param {
    method property (line 139) | public function property(string $name): Builder\Property {
    method function (line 150) | public function function(string $name): Builder\Function_ {
    method use (line 161) | public function use($name): Builder\Use_ {
    method useFunction (line 172) | public function useFunction($name): Builder\Use_ {
    method useConst (line 183) | public function useConst($name): Builder\Use_ {
    method classConst (line 195) | public function classConst($name, $value): Builder\ClassConst {
    method enumCase (line 206) | public function enumCase($name): Builder\EnumCase {
    method val (line 215) | public function val($value): Expr {
    method var (line 224) | public function var($name): Expr\Variable {
    method args (line 241) | public function args(array $args): array {
    method funcCall (line 261) | public function funcCall($name, array $args = []): Expr\FuncCall {
    method methodCall (line 275) | public function methodCall(Expr $var, $name, array $args = []): Expr\M...
    method staticCall (line 290) | public function staticCall($class, $name, array $args = []): Expr\Stat...
    method new (line 304) | public function new($class, array $args = []): Expr\New_ {
    method constFetch (line 316) | public function constFetch($name): Expr\ConstFetch {
    method propertyFetch (line 326) | public function propertyFetch(Expr $var, $name): Expr\PropertyFetch {
    method classConstFetch (line 336) | public function classConstFetch($class, $name): Expr\ClassConstFetch {
    method concat (line 348) | public function concat(...$exprs): Concat {
    method normalizeStringExpr (line 364) | private function normalizeStringExpr($expr): Expr {

FILE: lib/PhpParser/BuilderHelpers.php
  class BuilderHelpers (line 19) | final class BuilderHelpers {
    method normalizeNode (line 27) | public static function normalizeNode($node): Node {
    method normalizeStmt (line 48) | public static function normalizeStmt($node): Stmt {
    method normalizeIdentifier (line 68) | public static function normalizeIdentifier($name): Identifier {
    method normalizeIdentifierOrExpr (line 87) | public static function normalizeIdentifierOrExpr($name) {
    method normalizeName (line 106) | public static function normalizeName($name): Name {
    method normalizeNameOrExpr (line 137) | public static function normalizeNameOrExpr($name) {
    method normalizeType (line 161) | public static function normalizeType($type) {
    method normalizeValue (line 222) | public static function normalizeValue($value): Expr {
    method normalizeDocComment (line 286) | public static function normalizeDocComment($docComment): Comment\Doc {
    method normalizeAttribute (line 305) | public static function normalizeAttribute($attribute): Node\AttributeG...
    method addModifier (line 325) | public static function addModifier(int $modifiers, int $modifier): int {
    method addClassModifier (line 334) | public static function addClassModifier(int $existingModifiers, int $m...

FILE: lib/PhpParser/Comment.php
  class Comment (line 5) | class Comment implements \JsonSerializable {
    method __construct (line 22) | public function __construct(
    method getText (line 41) | public function getText(): string {
    method getStartLine (line 51) | public function getStartLine(): int {
    method getStartFilePos (line 60) | public function getStartFilePos(): int {
    method getStartTokenPos (line 69) | public function getStartTokenPos(): int {
    method getEndLine (line 79) | public function getEndLine(): int {
    method getEndFilePos (line 88) | public function getEndFilePos(): int {
    method getEndTokenPos (line 97) | public function getEndTokenPos(): int {
    method __toString (line 106) | public function __toString(): string {
    method getReformattedText (line 120) | public function getReformattedText(): string {
    method getShortestWhitespacePrefixLen (line 178) | private function getShortestWhitespacePrefixLen(string $str): int {
    method jsonSerialize (line 194) | public function jsonSerialize(): array {

FILE: lib/PhpParser/Comment/Doc.php
  class Doc (line 5) | class Doc extends \PhpParser\Comment {

FILE: lib/PhpParser/ConstExprEvaluationException.php
  class ConstExprEvaluationException (line 5) | class ConstExprEvaluationException extends \Exception {

FILE: lib/PhpParser/ConstExprEvaluator.php
  class ConstExprEvaluator (line 29) | class ConstExprEvaluator {
    method __construct (line 41) | public function __construct(?callable $fallbackEvaluator = null) {
    method evaluateSilently (line 66) | public function evaluateSilently(Expr $expr) {
    method evaluateDirectly (line 101) | public function evaluateDirectly(Expr $expr) {
    method evaluate (line 106) | private function evaluate(Expr $expr) {
    method evaluateArray (line 151) | private function evaluateArray(Expr\Array_ $expr): array {
    method evaluateTernary (line 166) | private function evaluateTernary(Expr\Ternary $expr) {
    method evaluateBinaryOp (line 177) | private function evaluateBinaryOp(Expr\BinaryOp $expr) {
    method evaluateConstFetch (line 227) | private function evaluateConstFetch(Expr\ConstFetch $expr) {

FILE: lib/PhpParser/Error.php
  class Error (line 5) | class Error extends \RuntimeException {
    method __construct (line 16) | public function __construct(string $message, array $attributes = []) {
    method getRawMessage (line 27) | public function getRawMessage(): string {
    method getStartLine (line 37) | public function getStartLine(): int {
    method getEndLine (line 47) | public function getEndLine(): int {
    method getAttributes (line 56) | public function getAttributes(): array {
    method setAttributes (line 65) | public function setAttributes(array $attributes): void {
    method setRawMessage (line 75) | public function setRawMessage(string $message): void {
    method setStartLine (line 85) | public function setStartLine(int $line): void {
    method hasColumnInfo (line 95) | public function hasColumnInfo(): bool {
    method getStartColumn (line 104) | public function getStartColumn(string $code): int {
    method getEndColumn (line 117) | public function getEndColumn(string $code): int {
    method getMessageWithColumnInfo (line 132) | public function getMessageWithColumnInfo(string $code): string {
    method toColumn (line 148) | private function toColumn(string $code, int $pos): int {
    method updateMessage (line 164) | protected function updateMessage(): void {

FILE: lib/PhpParser/ErrorHandler.php
  type ErrorHandler (line 5) | interface ErrorHandler {
    method handleError (line 11) | public function handleError(Error $error): void;

FILE: lib/PhpParser/ErrorHandler/Collecting.php
  class Collecting (line 13) | class Collecting implements ErrorHandler {
    method handleError (line 17) | public function handleError(Error $error): void {
    method getErrors (line 26) | public function getErrors(): array {
    method hasErrors (line 33) | public function hasErrors(): bool {
    method clearErrors (line 40) | public function clearErrors(): void {

FILE: lib/PhpParser/ErrorHandler/Throwing.php
  class Throwing (line 13) | class Throwing implements ErrorHandler {
    method handleError (line 14) | public function handleError(Error $error): void {

FILE: lib/PhpParser/Internal/DiffElem.php
  class DiffElem (line 8) | class DiffElem {
    method __construct (line 26) | public function __construct(int $type, $old, $new) {

FILE: lib/PhpParser/Internal/Differ.php
  class Differ (line 14) | class Differ {
    method __construct (line 23) | public function __construct(callable $isEqual) {
    method diff (line 35) | public function diff(array $old, array $new): array {
    method diffWithReplacements (line 53) | public function diffWithReplacements(array $old, array $new): array {
    method calculateTrace (line 62) | private function calculateTrace(array $old, array $new): array {
    method extractDiff (line 98) | private function extractDiff(array $trace, int $x, int $y, array $old,...
    method coalesceReplacements (line 142) | private function coalesceReplacements(array $diff): array {

FILE: lib/PhpParser/Internal/PrintableNewAnonClassNode.php
  class PrintableNewAnonClassNode (line 18) | class PrintableNewAnonClassNode extends Expr {
    method __construct (line 40) | public function __construct(
    method fromNewNode (line 53) | public static function fromNewNode(Expr\New_ $newNode): self {
    method getType (line 64) | public function getType(): string {
    method getSubNodeNames (line 68) | public function getSubNodeNames(): array {

FILE: lib/PhpParser/Internal/TokenPolyfill.php
  class TokenPolyfill (line 6) | class TokenPolyfill extends \PhpToken {
    method __construct (line 42) | final public function __construct(int $id, string $text, int $line = -...
    method getTokenName (line 53) | public function getTokenName(): ?string {
    method is (line 69) | public function is($kind): bool {
    method isIgnorable (line 102) | public function isIgnorable(): bool {
    method __toString (line 109) | public function __toString(): string {
    method tokenize (line 124) | public static function tokenize(string $code, int $flags = 0): array {
    method init (line 218) | private static function init(): void {
  class TokenPolyfill (line 18) | class TokenPolyfill {
    method __construct (line 42) | final public function __construct(int $id, string $text, int $line = -...
    method getTokenName (line 53) | public function getTokenName(): ?string {
    method is (line 69) | public function is($kind): bool {
    method isIgnorable (line 102) | public function isIgnorable(): bool {
    method __toString (line 109) | public function __toString(): string {
    method tokenize (line 124) | public static function tokenize(string $code, int $flags = 0): array {
    method init (line 218) | private static function init(): void {

FILE: lib/PhpParser/Internal/TokenStream.php
  class TokenStream (line 12) | class TokenStream {
    method __construct (line 23) | public function __construct(array $tokens, int $tabWidth) {
    method haveParens (line 34) | public function haveParens(int $startPos, int $endPos): bool {
    method haveBraces (line 45) | public function haveBraces(int $startPos, int $endPos): bool {
    method haveTokenImmediatelyBefore (line 61) | public function haveTokenImmediatelyBefore(int $pos, $expectedTokenTyp...
    method haveTokenImmediatelyAfter (line 86) | public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType...
    method skipLeft (line 102) | public function skipLeft(int $pos, $skipTokenType): int {
    method skipRight (line 120) | public function skipRight(int $pos, $skipTokenType): int {
    method skipLeftWhitespace (line 143) | public function skipLeftWhitespace(int $pos): int {
    method skipRightWhitespace (line 159) | public function skipRightWhitespace(int $pos): int {
    method findRight (line 170) | public function findRight(int $pos, $findTokenType): int {
    method haveTokenInRange (line 188) | public function haveTokenInRange(int $startPos, int $endPos, $tokenTyp...
    method haveTagInRange (line 198) | public function haveTagInRange(int $startPos, int $endPos): bool {
    method getIndentationBefore (line 210) | public function getIndentationBefore(int $pos): int {
    method getTokenCode (line 223) | public function getTokenCode(int $from, int $to, int $indent): string {
    method calcIndentMap (line 251) | private function calcIndentMap(int $tabWidth): array {
    method getIndent (line 276) | private function getIndent(string $ws, int $tabWidth): int {

FILE: lib/PhpParser/JsonDecoder.php
  class JsonDecoder (line 5) | class JsonDecoder {
    method decode (line 10) | public function decode(string $json) {
    method decodeRecursive (line 23) | private function decodeRecursive($value) {
    method decodeArray (line 36) | private function decodeArray(array $array): array {
    method decodeNode (line 44) | private function decodeNode(array $value): Node {
    method decodeComment (line 72) | private function decodeComment(array $value): Comment {
    method reflectionClassFromNodeType (line 86) | private function reflectionClassFromNodeType(string $nodeType): \Refle...
    method classNameFromNodeType (line 95) | private function classNameFromNodeType(string $nodeType): string {

FILE: lib/PhpParser/Lexer.php
  class Lexer (line 7) | class Lexer {
    method tokenize (line 24) | public function tokenize(string $code, ?ErrorHandler $errorHandler = n...
    method handleInvalidCharacter (line 41) | private function handleInvalidCharacter(Token $token, ErrorHandler $er...
    method isUnterminatedComment (line 60) | private function isUnterminatedComment(Token $token): bool {
    method postprocessTokens (line 69) | protected function postprocessTokens(array &$tokens, ErrorHandler $err...

FILE: lib/PhpParser/Lexer/Emulative.php
  class Emulative (line 25) | class Emulative extends Lexer {
    method __construct (line 39) | public function __construct(?PhpVersion $phpVersion = null) {
    method tokenize (line 70) | public function tokenize(string $code, ?ErrorHandler $errorHandler = n...
    method isForwardEmulationNeeded (line 109) | private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersi...
    method isReverseEmulationNeeded (line 114) | private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersi...
    method sortPatches (line 119) | private function sortPatches(): void {
    method fixupTokens (line 131) | private function fixupTokens(array $tokens): array {
    method fixupErrors (line 203) | private function fixupErrors(array $errors): void {

FILE: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php
  class AsymmetricVisibilityTokenEmulator (line 8) | final class AsymmetricVisibilityTokenEmulator extends TokenEmulator {
    method getPhpVersion (line 9) | public function getPhpVersion(): PhpVersion {
    method isEmulationNeeded (line 12) | public function isEmulationNeeded(string $code): bool {
    method emulate (line 19) | public function emulate(string $code, array $tokens): array {
    method reverseEmulate (line 44) | public function reverseEmulate(string $code, array $tokens): array {
    method isKeywordContext (line 72) | protected function isKeywordContext(array $tokens, int $pos): bool {
    method getPreviousNonSpaceToken (line 82) | private function getPreviousNonSpaceToken(array $tokens, int $start): ...

FILE: lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php
  class AttributeEmulator (line 8) | final class AttributeEmulator extends TokenEmulator {
    method getPhpVersion (line 9) | public function getPhpVersion(): PhpVersion {
    method isEmulationNeeded (line 13) | public function isEmulationNeeded(string $code): bool {
    method emulate (line 17) | public function emulate(string $code, array $tokens): array {
    method reverseEmulate (line 34) | public function reverseEmulate(string $code, array $tokens): array {
    method preprocessCode (line 39) | public function preprocessCode(string $code, array &$patches): string {

FILE: lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php
  class EnumTokenEmulator (line 7) | final class EnumTokenEmulator extends KeywordEmulator {
    method getPhpVersion (line 8) | public function getPhpVersion(): PhpVersion {
    method getKeywordString (line 12) | public function getKeywordString(): string {
    method getKeywordToken (line 16) | public function getKeywordToken(): int {
    method isKeywordContext (line 20) | protected function isKeywordContext(array $tokens, int $pos): bool {

FILE: lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php
  class ExplicitOctalEmulator (line 8) | class ExplicitOctalEmulator extends TokenEmulator {
    method getPhpVersion (line 9) | public function getPhpVersion(): PhpVersion {
    method isEmulationNeeded (line 13) | public function isEmulationNeeded(string $code): bool {
    method emulate (line 17) | public function emulate(string $code, array $tokens): array {
    method resolveIntegerOrFloatToken (line 34) | private function resolveIntegerOrFloatToken(string $str): int {
    method reverseEmulate (line 41) | public function reverseEmulate(string $code, array $tokens): array {

FILE: lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php
  class FnTokenEmulator (line 8) | final class FnTokenEmulator extends KeywordEmulator {
    method getPhpVersion (line 9) | public function getPhpVersion(): PhpVersion {
    method getKeywordString (line 13) | public function getKeywordString(): string {
    method getKeywordToken (line 17) | public function getKeywordToken(): int {

FILE: lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php
  class KeywordEmulator (line 7) | abstract class KeywordEmulator extends TokenEmulator {
    method getKeywordString (line 8) | abstract public function getKeywordString(): string;
    method getKeywordToken (line 9) | abstract public function getKeywordToken(): int;
    method isEmulationNeeded (line 11) | public function isEmulationNeeded(string $code): bool {
    method isKeywordContext (line 16) | protected function isKeywordContext(array $tokens, int $pos): bool {
    method emulate (line 25) | public function emulate(string $code, array $tokens): array {
    method getPreviousNonSpaceToken (line 38) | private function getPreviousNonSpaceToken(array $tokens, int $start): ...
    method reverseEmulate (line 50) | public function reverseEmulate(string $code, array $tokens): array {

FILE: lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php
  class MatchTokenEmulator (line 7) | final class MatchTokenEmulator extends KeywordEmulator {
    method getPhpVersion (line 8) | public function getPhpVersion(): PhpVersion {
    method getKeywordString (line 12) | public function getKeywordString(): string {
    method getKeywordToken (line 16) | public function getKeywordToken(): int {

FILE: lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php
  class NullsafeTokenEmulator (line 8) | final class NullsafeTokenEmulator extends TokenEmulator {
    method getPhpVersion (line 9) | public function getPhpVersion(): PhpVersion {
    method isEmulationNeeded (line 13) | public function isEmulationNeeded(string $code): bool {
    method emulate (line 17) | public function emulate(string $code, array $tokens): array {
    method reverseEmulate (line 56) | public function reverseEmulate(string $code, array $tokens): array {

FILE: lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php
  class PipeOperatorEmulator (line 9) | class PipeOperatorEmulator extends TokenEmulator {
    method getPhpVersion (line 10) | public function getPhpVersion(): PhpVersion {
    method isEmulationNeeded (line 14) | public function isEmulationNeeded(string $code): bool {
    method emulate (line 18) | public function emulate(string $code, array $tokens): array {
    method reverseEmulate (line 31) | public function reverseEmulate(string $code, array $tokens): array {

FILE: lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php
  class PropertyTokenEmulator (line 7) | final class PropertyTokenEmulator extends KeywordEmulator {
    method getPhpVersion (line 8) | public function getPhpVersion(): PhpVersion {
    method getKeywordString (line 12) | public function getKeywordString(): string {
    method getKeywordToken (line 16) | public function getKeywordToken(): int {

FILE: lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php
  class ReadonlyFunctionTokenEmulator (line 14) | class ReadonlyFunctionTokenEmulator extends KeywordEmulator {
    method getKeywordString (line 15) | public function getKeywordString(): string {
    method getKeywordToken (line 19) | public function getKeywordToken(): int {
    method getPhpVersion (line 23) | public function getPhpVersion(): PhpVersion {
    method reverseEmulate (line 27) | public function reverseEmulate(string $code, array $tokens): array {

FILE: lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php
  class ReadonlyTokenEmulator (line 7) | final class ReadonlyTokenEmulator extends KeywordEmulator {
    method getPhpVersion (line 8) | public function getPhpVersion(): PhpVersion {
    method getKeywordString (line 12) | public function getKeywordString(): string {
    method getKeywordToken (line 16) | public function getKeywordToken(): int {
    method isKeywordContext (line 20) | protected function isKeywordContext(array $tokens, int $pos): bool {

FILE: lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php
  class ReverseEmulator (line 10) | final class ReverseEmulator extends TokenEmulator {
    method __construct (line 14) | public function __construct(TokenEmulator $emulator) {
    method getPhpVersion (line 18) | public function getPhpVersion(): PhpVersion {
    method isEmulationNeeded (line 22) | public function isEmulationNeeded(string $code): bool {
    method emulate (line 26) | public function emulate(string $code, array $tokens): array {
    method reverseEmulate (line 30) | public function reverseEmulate(string $code, array $tokens): array {
    method preprocessCode (line 34) | public function preprocessCode(string $code, array &$patches): string {

FILE: lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php
  class TokenEmulator (line 9) | abstract class TokenEmulator {
    method getPhpVersion (line 10) | abstract public function getPhpVersion(): PhpVersion;
    method isEmulationNeeded (line 12) | abstract public function isEmulationNeeded(string $code): bool;
    method emulate (line 18) | abstract public function emulate(string $code, array $tokens): array;
    method reverseEmulate (line 24) | abstract public function reverseEmulate(string $code, array $tokens): ...
    method preprocessCode (line 27) | public function preprocessCode(string $code, array &$patches): string {

FILE: lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php
  class VoidCastEmulator (line 8) | class VoidCastEmulator extends TokenEmulator {
    method getPhpVersion (line 9) | public function getPhpVersion(): PhpVersion {
    method isEmulationNeeded (line 13) | public function isEmulationNeeded(string $code): bool {
    method emulate (line 17) | public function emulate(string $code, array $tokens): array {
    method reverseEmulate (line 60) | public function reverseEmulate(string $code, array $tokens): array {

FILE: lib/PhpParser/Modifiers.php
  class Modifiers (line 9) | final class Modifiers {
    method toString (line 38) | public static function toString(int $modifier): string {
    method isValidModifier (line 45) | private static function isValidModifier(int $modifier): bool {
    method verifyClassModifier (line 53) | public static function verifyClassModifier(int $a, int $b): void {
    method verifyModifier (line 68) | public static function verifyModifier(int $a, int $b): void {

FILE: lib/PhpParser/NameContext.php
  class NameContext (line 9) | class NameContext {
    method __construct (line 27) | public function __construct(ErrorHandler $errorHandler) {
    method startNamespace (line 38) | public function startNamespace(?Name $namespace = null): void {
    method addAlias (line 55) | public function addAlias(Name $name, string $aliasName, int $type, arr...
    method getNamespace (line 89) | public function getNamespace(): ?Name {
    method getResolvedName (line 101) | public function getResolvedName(Name $name, int $type): ?Name {
    method getResolvedClassName (line 144) | public function getResolvedClassName(Name $name): Name {
    method getPossibleNames (line 156) | public function getPossibleNames(string $name, int $type): array {
    method getShortName (line 212) | public function getShortName(string $name, int $type): Name {
    method resolveAlias (line 229) | private function resolveAlias(Name $name, int $type): ?FullyQualified {
    method getNamespaceRelativeName (line 252) | private function getNamespaceRelativeName(string $name, string $lcName...
    method normalizeConstName (line 273) | private function normalizeConstName(string $name): string {

FILE: lib/PhpParser/Node.php
  type Node (line 5) | interface Node {
    method getType (line 12) | public function getType(): string;
    method getSubNodeNames (line 19) | public function getSubNodeNames(): array;
    method getLine (line 29) | public function getLine(): int;
    method getStartLine (line 39) | public function getStartLine(): int;
    method getEndLine (line 49) | public function getEndLine(): int;
    method getStartTokenPos (line 60) | public function getStartTokenPos(): int;
    method getEndTokenPos (line 71) | public function getEndTokenPos(): int;
    method getStartFilePos (line 80) | public function getStartFilePos(): int;
    method getEndFilePos (line 89) | public function getEndFilePos(): int;
    method getComments (line 98) | public function getComments(): array;
    method getDocComment (line 105) | public function getDocComment(): ?Comment\Doc;
    method setDocComment (line 114) | public function setDocComment(Comment\Doc $docComment): void;
    method setAttribute (line 121) | public function setAttribute(string $key, $value): void;
    method hasAttribute (line 126) | public function hasAttribute(string $key): bool;
    method getAttribute (line 135) | public function getAttribute(string $key, $default = null);
    method getAttributes (line 142) | public function getAttributes(): array;
    method setAttributes (line 149) | public function setAttributes(array $attributes): void;

FILE: lib/PhpParser/Node/Arg.php
  class Arg (line 7) | class Arg extends NodeAbstract {
    method __construct (line 26) | public function __construct(
    method getSubNodeNames (line 37) | public function getSubNodeNames(): array {
    method getType (line 41) | public function getType(): string {

FILE: lib/PhpParser/Node/ArrayItem.php
  class ArrayItem (line 7) | class ArrayItem extends NodeAbstract {
    method __construct (line 25) | public function __construct(Expr $value, ?Expr $key = null, bool $byRe...
    method getSubNodeNames (line 33) | public function getSubNodeNames(): array {
    method getType (line 37) | public function getType(): string {

FILE: lib/PhpParser/Node/Attribute.php
  class Attribute (line 8) | class Attribute extends NodeAbstract {
    method __construct (line 20) | public function __construct(Name $name, array $args = [], array $attri...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/AttributeGroup.php
  class AttributeGroup (line 7) | class AttributeGroup extends NodeAbstract {
    method __construct (line 15) | public function __construct(array $attrs, array $attributes = []) {
    method getSubNodeNames (line 20) | public function getSubNodeNames(): array {
    method getType (line 24) | public function getType(): string {

FILE: lib/PhpParser/Node/ClosureUse.php
  class ClosureUse (line 7) | class ClosureUse extends NodeAbstract {
    method __construct (line 20) | public function __construct(Expr\Variable $var, bool $byRef = false, a...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/ComplexType.php
  class ComplexType (line 12) | abstract class ComplexType extends NodeAbstract {

FILE: lib/PhpParser/Node/Const_.php
  class Const_ (line 7) | class Const_ extends NodeAbstract {
    method __construct (line 23) | public function __construct($name, Expr $value, array $attributes = []) {
    method getSubNodeNames (line 29) | public function getSubNodeNames(): array {
    method getType (line 33) | public function getType(): string {

FILE: lib/PhpParser/Node/DeclareItem.php
  class DeclareItem (line 8) | class DeclareItem extends NodeAbstract {
    method __construct (line 21) | public function __construct($key, Node\Expr $value, array $attributes ...
    method getSubNodeNames (line 27) | public function getSubNodeNames(): array {
    method getType (line 31) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr.php
  class Expr (line 7) | abstract class Expr extends NodeAbstract {

FILE: lib/PhpParser/Node/Expr/ArrayDimFetch.php
  class ArrayDimFetch (line 7) | class ArrayDimFetch extends Expr {
    method __construct (line 20) | public function __construct(Expr $var, ?Expr $dim = null, array $attri...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/ArrayItem.php
  class ArrayItem (line 13) | class ArrayItem extends \PhpParser\Node\ArrayItem {

FILE: lib/PhpParser/Node/Expr/Array_.php
  class Array_ (line 8) | class Array_ extends Expr {
    method __construct (line 22) | public function __construct(array $items = [], array $attributes = []) {
    method getSubNodeNames (line 27) | public function getSubNodeNames(): array {
    method getType (line 31) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/ArrowFunction.php
  class ArrowFunction (line 9) | class ArrowFunction extends Expr implements FunctionLike {
    method __construct (line 44) | public function __construct(array $subNodes, array $attributes = []) {
    method getSubNodeNames (line 54) | public function getSubNodeNames(): array {
    method returnsByRef (line 58) | public function returnsByRef(): bool {
    method getParams (line 62) | public function getParams(): array {
    method getReturnType (line 66) | public function getReturnType() {
    method getAttrGroups (line 70) | public function getAttrGroups(): array {
    method getStmts (line 77) | public function getStmts(): array {
    method getType (line 81) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Assign.php
  class Assign (line 7) | class Assign extends Expr {
    method __construct (line 20) | public function __construct(Expr $var, Expr $expr, array $attributes =...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp.php
  class AssignOp (line 7) | abstract class AssignOp extends Expr {
    method __construct (line 20) | public function __construct(Expr $var, Expr $expr, array $attributes =...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {

FILE: lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
  class BitwiseAnd (line 7) | class BitwiseAnd extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
  class BitwiseOr (line 7) | class BitwiseOr extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php
  class BitwiseXor (line 7) | class BitwiseXor extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/Coalesce.php
  class Coalesce (line 7) | class Coalesce extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/Concat.php
  class Concat (line 7) | class Concat extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/Div.php
  class Div (line 7) | class Div extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/Minus.php
  class Minus (line 7) | class Minus extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/Mod.php
  class Mod (line 7) | class Mod extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/Mul.php
  class Mul (line 7) | class Mul extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/Plus.php
  class Plus (line 7) | class Plus extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/Pow.php
  class Pow (line 7) | class Pow extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php
  class ShiftLeft (line 7) | class ShiftLeft extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php
  class ShiftRight (line 7) | class ShiftRight extends AssignOp {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/AssignRef.php
  class AssignRef (line 7) | class AssignRef extends Expr {
    method __construct (line 20) | public function __construct(Expr $var, Expr $expr, array $attributes =...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp.php
  class BinaryOp (line 7) | abstract class BinaryOp extends Expr {
    method __construct (line 20) | public function __construct(Expr $left, Expr $right, array $attributes...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getOperatorSigil (line 36) | abstract public function getOperatorSigil(): string;

FILE: lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php
  class BitwiseAnd (line 7) | class BitwiseAnd extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php
  class BitwiseOr (line 7) | class BitwiseOr extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php
  class BitwiseXor (line 7) | class BitwiseXor extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php
  class BooleanAnd (line 7) | class BooleanAnd extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php
  class BooleanOr (line 7) | class BooleanOr extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php
  class Coalesce (line 7) | class Coalesce extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Concat.php
  class Concat (line 7) | class Concat extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Div.php
  class Div (line 7) | class Div extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Equal.php
  class Equal (line 7) | class Equal extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Greater.php
  class Greater (line 7) | class Greater extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php
  class GreaterOrEqual (line 7) | class GreaterOrEqual extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Identical.php
  class Identical (line 7) | class Identical extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php
  class LogicalAnd (line 7) | class LogicalAnd extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php
  class LogicalOr (line 7) | class LogicalOr extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php
  class LogicalXor (line 7) | class LogicalXor extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Minus.php
  class Minus (line 7) | class Minus extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Mod.php
  class Mod (line 7) | class Mod extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Mul.php
  class Mul (line 7) | class Mul extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php
  class NotEqual (line 7) | class NotEqual extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php
  class NotIdentical (line 7) | class NotIdentical extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Pipe.php
  class Pipe (line 7) | class Pipe extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Plus.php
  class Plus (line 7) | class Plus extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Pow.php
  class Pow (line 7) | class Pow extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php
  class ShiftLeft (line 7) | class ShiftLeft extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php
  class ShiftRight (line 7) | class ShiftRight extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Smaller.php
  class Smaller (line 7) | class Smaller extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php
  class SmallerOrEqual (line 7) | class SmallerOrEqual extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php
  class Spaceship (line 7) | class Spaceship extends BinaryOp {
    method getOperatorSigil (line 8) | public function getOperatorSigil(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BitwiseNot.php
  class BitwiseNot (line 7) | class BitwiseNot extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/BooleanNot.php
  class BooleanNot (line 7) | class BooleanNot extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/CallLike.php
  class CallLike (line 9) | abstract class CallLike extends Expr {
    method getRawArgs (line 16) | abstract public function getRawArgs(): array;
    method isFirstClassCallable (line 21) | public function isFirstClassCallable(): bool {
    method getArgs (line 31) | public function getArgs(): array {
    method getArg (line 43) | public function getArg(string $name, int $position): ?Arg {

FILE: lib/PhpParser/Node/Expr/Cast.php
  class Cast (line 7) | abstract class Cast extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {

FILE: lib/PhpParser/Node/Expr/Cast/Array_.php
  class Array_ (line 7) | class Array_ extends Cast {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Cast/Bool_.php
  class Bool_ (line 7) | class Bool_ extends Cast {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Cast/Double.php
  class Double (line 7) | class Double extends Cast {
    method getType (line 13) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Cast/Int_.php
  class Int_ (line 7) | class Int_ extends Cast {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Cast/Object_.php
  class Object_ (line 7) | class Object_ extends Cast {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Cast/String_.php
  class String_ (line 7) | class String_ extends Cast {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Cast/Unset_.php
  class Unset_ (line 7) | class Unset_ extends Cast {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Cast/Void_.php
  class Void_ (line 7) | class Void_ extends Cast {
    method getType (line 8) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/ClassConstFetch.php
  class ClassConstFetch (line 10) | class ClassConstFetch extends Expr {
    method __construct (line 23) | public function __construct(Node $class, $name, array $attributes = []) {
    method getSubNodeNames (line 29) | public function getSubNodeNames(): array {
    method getType (line 33) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Clone_.php
  class Clone_ (line 7) | class Clone_ extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Closure.php
  class Closure (line 10) | class Closure extends Expr implements FunctionLike {
    method __construct (line 47) | public function __construct(array $subNodes = [], array $attributes = ...
    method getSubNodeNames (line 58) | public function getSubNodeNames(): array {
    method returnsByRef (line 62) | public function returnsByRef(): bool {
    method getParams (line 66) | public function getParams(): array {
    method getReturnType (line 70) | public function getReturnType() {
    method getStmts (line 75) | public function getStmts(): array {
    method getAttrGroups (line 79) | public function getAttrGroups(): array {
    method getType (line 83) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/ClosureUse.php
  class ClosureUse (line 13) | class ClosureUse extends \PhpParser\Node\ClosureUse {

FILE: lib/PhpParser/Node/Expr/ConstFetch.php
  class ConstFetch (line 8) | class ConstFetch extends Expr {
    method __construct (line 18) | public function __construct(Name $name, array $attributes = []) {
    method getSubNodeNames (line 23) | public function getSubNodeNames(): array {
    method getType (line 27) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Empty_.php
  class Empty_ (line 7) | class Empty_ extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Error.php
  class Error (line 13) | class Error extends Expr {
    method __construct (line 19) | public function __construct(array $attributes = []) {
    method getSubNodeNames (line 23) | public function getSubNodeNames(): array {
    method getType (line 27) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/ErrorSuppress.php
  class ErrorSuppress (line 7) | class ErrorSuppress extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Eval_.php
  class Eval_ (line 7) | class Eval_ extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Exit_.php
  class Exit_ (line 7) | class Exit_ extends Expr {
    method __construct (line 21) | public function __construct(?Expr $expr = null, array $attributes = []) {
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/FuncCall.php
  class FuncCall (line 8) | class FuncCall extends CallLike {
    method __construct (line 21) | public function __construct(Node $name, array $args = [], array $attri...
    method getSubNodeNames (line 27) | public function getSubNodeNames(): array {
    method getType (line 31) | public function getType(): string {
    method getRawArgs (line 35) | public function getRawArgs(): array {

FILE: lib/PhpParser/Node/Expr/Include_.php
  class Include_ (line 7) | class Include_ extends Expr {
    method __construct (line 25) | public function __construct(Expr $expr, int $type, array $attributes =...
    method getSubNodeNames (line 31) | public function getSubNodeNames(): array {
    method getType (line 35) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Instanceof_.php
  class Instanceof_ (line 9) | class Instanceof_ extends Expr {
    method __construct (line 22) | public function __construct(Expr $expr, Node $class, array $attributes...
    method getSubNodeNames (line 28) | public function getSubNodeNames(): array {
    method getType (line 32) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Isset_.php
  class Isset_ (line 7) | class Isset_ extends Expr {
    method __construct (line 17) | public function __construct(array $vars, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/List_.php
  class List_ (line 8) | class List_ extends Expr {
    method __construct (line 22) | public function __construct(array $items, array $attributes = []) {
    method getSubNodeNames (line 27) | public function getSubNodeNames(): array {
    method getType (line 31) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Match_.php
  class Match_ (line 8) | class Match_ extends Node\Expr {
    method __construct (line 19) | public function __construct(Node\Expr $cond, array $arms = [], array $...
    method getSubNodeNames (line 25) | public function getSubNodeNames(): array {
    method getType (line 29) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/MethodCall.php
  class MethodCall (line 11) | class MethodCall extends CallLike {
    method __construct (line 27) | public function __construct(Expr $var, $name, array $args = [], array ...
    method getSubNodeNames (line 34) | public function getSubNodeNames(): array {
    method getType (line 38) | public function getType(): string {
    method getRawArgs (line 42) | public function getRawArgs(): array {

FILE: lib/PhpParser/Node/Expr/New_.php
  class New_ (line 10) | class New_ extends CallLike {
    method __construct (line 23) | public function __construct(Node $class, array $args = [], array $attr...
    method getSubNodeNames (line 29) | public function getSubNodeNames(): array {
    method getType (line 33) | public function getType(): string {
    method getRawArgs (line 37) | public function getRawArgs(): array {

FILE: lib/PhpParser/Node/Expr/NullsafeMethodCall.php
  class NullsafeMethodCall (line 11) | class NullsafeMethodCall extends CallLike {
    method __construct (line 27) | public function __construct(Expr $var, $name, array $args = [], array ...
    method getSubNodeNames (line 34) | public function getSubNodeNames(): array {
    method getType (line 38) | public function getType(): string {
    method getRawArgs (line 42) | public function getRawArgs(): array {

FILE: lib/PhpParser/Node/Expr/NullsafePropertyFetch.php
  class NullsafePropertyFetch (line 9) | class NullsafePropertyFetch extends Expr {
    method __construct (line 22) | public function __construct(Expr $var, $name, array $attributes = []) {
    method getSubNodeNames (line 28) | public function getSubNodeNames(): array {
    method getType (line 32) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/PostDec.php
  class PostDec (line 7) | class PostDec extends Expr {
    method __construct (line 17) | public function __construct(Expr $var, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/PostInc.php
  class PostInc (line 7) | class PostInc extends Expr {
    method __construct (line 17) | public function __construct(Expr $var, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/PreDec.php
  class PreDec (line 7) | class PreDec extends Expr {
    method __construct (line 17) | public function __construct(Expr $var, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/PreInc.php
  class PreInc (line 7) | class PreInc extends Expr {
    method __construct (line 17) | public function __construct(Expr $var, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Print_.php
  class Print_ (line 7) | class Print_ extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/PropertyFetch.php
  class PropertyFetch (line 9) | class PropertyFetch extends Expr {
    method __construct (line 22) | public function __construct(Expr $var, $name, array $attributes = []) {
    method getSubNodeNames (line 28) | public function getSubNodeNames(): array {
    method getType (line 32) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/ShellExec.php
  class ShellExec (line 8) | class ShellExec extends Expr {
    method __construct (line 18) | public function __construct(array $parts, array $attributes = []) {
    method getSubNodeNames (line 23) | public function getSubNodeNames(): array {
    method getType (line 27) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/StaticCall.php
  class StaticCall (line 11) | class StaticCall extends CallLike {
    method __construct (line 27) | public function __construct(Node $class, $name, array $args = [], arra...
    method getSubNodeNames (line 34) | public function getSubNodeNames(): array {
    method getType (line 38) | public function getType(): string {
    method getRawArgs (line 42) | public function getRawArgs(): array {

FILE: lib/PhpParser/Node/Expr/StaticPropertyFetch.php
  class StaticPropertyFetch (line 10) | class StaticPropertyFetch extends Expr {
    method __construct (line 23) | public function __construct(Node $class, $name, array $attributes = []) {
    method getSubNodeNames (line 29) | public function getSubNodeNames(): array {
    method getType (line 33) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Ternary.php
  class Ternary (line 7) | class Ternary extends Expr {
    method __construct (line 23) | public function __construct(Expr $cond, ?Expr $if, Expr $else, array $...
    method getSubNodeNames (line 30) | public function getSubNodeNames(): array {
    method getType (line 34) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Throw_.php
  class Throw_ (line 7) | class Throw_ extends Node\Expr {
    method __construct (line 17) | public function __construct(Node\Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/UnaryMinus.php
  class UnaryMinus (line 7) | class UnaryMinus extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/UnaryPlus.php
  class UnaryPlus (line 7) | class UnaryPlus extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Variable.php
  class Variable (line 7) | class Variable extends Expr {
    method __construct (line 17) | public function __construct($name, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/YieldFrom.php
  class YieldFrom (line 7) | class YieldFrom extends Expr {
    method __construct (line 17) | public function __construct(Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Expr/Yield_.php
  class Yield_ (line 7) | class Yield_ extends Expr {
    method __construct (line 20) | public function __construct(?Expr $value = null, ?Expr $key = null, ar...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/FunctionLike.php
  type FunctionLike (line 7) | interface FunctionLike extends Node {
    method returnsByRef (line 11) | public function returnsByRef(): bool;
    method getParams (line 18) | public function getParams(): array;
    method getReturnType (line 25) | public function getReturnType();
    method getStmts (line 32) | public function getStmts(): ?array;
    method getAttrGroups (line 39) | public function getAttrGroups(): array;

FILE: lib/PhpParser/Node/Identifier.php
  class Identifier (line 10) | class Identifier extends NodeAbstract {
    method __construct (line 30) | public function __construct(string $name, array $attributes = []) {
    method getSubNodeNames (line 39) | public function getSubNodeNames(): array {
    method toString (line 49) | public function toString(): string {
    method toLowerString (line 59) | public function toLowerString(): string {
    method isSpecialClassName (line 68) | public function isSpecialClassName(): bool {
    method __toString (line 78) | public function __toString(): string {
    method getType (line 82) | public function getType(): string {

FILE: lib/PhpParser/Node/InterpolatedStringPart.php
  class InterpolatedStringPart (line 7) | class InterpolatedStringPart extends NodeAbstract {
    method __construct (line 17) | public function __construct(string $value, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/IntersectionType.php
  class IntersectionType (line 5) | class IntersectionType extends ComplexType {
    method __construct (line 15) | public function __construct(array $types, array $attributes = []) {
    method getSubNodeNames (line 20) | public function getSubNodeNames(): array {
    method getType (line 24) | public function getType(): string {

FILE: lib/PhpParser/Node/MatchArm.php
  class MatchArm (line 8) | class MatchArm extends NodeAbstract {
    method __construct (line 16) | public function __construct(?array $conds, Node\Expr $body, array $att...
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Name.php
  class Name (line 7) | class Name extends NodeAbstract {
    method __construct (line 27) | final public function __construct($name, array $attributes = []) {
    method getSubNodeNames (line 32) | public function getSubNodeNames(): array {
    method getParts (line 42) | public function getParts(): array {
    method getFirst (line 51) | public function getFirst(): string {
    method getLast (line 63) | public function getLast(): string {
    method isUnqualified (line 75) | public function isUnqualified(): bool {
    method isQualified (line 84) | public function isQualified(): bool {
    method isFullyQualified (line 93) | public function isFullyQualified(): bool {
    method isRelative (line 102) | public function isRelative(): bool {
    method toString (line 113) | public function toString(): string {
    method toCodeString (line 124) | public function toCodeString(): string {
    method toLowerString (line 135) | public function toLowerString(): string {
    method isSpecialClassName (line 144) | public function isSpecialClassName(): bool {
    method __toString (line 155) | public function __toString(): string {
    method slice (line 175) | public function slice(int $offset, ?int $length = null) {
    method concat (line 226) | public static function concat($name1, $name2, array $attributes = []) {
    method prepareName (line 251) | private static function prepareName($name): string {
    method getType (line 275) | public function getType(): string {

FILE: lib/PhpParser/Node/Name/FullyQualified.php
  class FullyQualified (line 5) | class FullyQualified extends \PhpParser\Node\Name {
    method isUnqualified (line 11) | public function isUnqualified(): bool {
    method isQualified (line 20) | public function isQualified(): bool {
    method isFullyQualified (line 29) | public function isFullyQualified(): bool {
    method isRelative (line 38) | public function isRelative(): bool {
    method toCodeString (line 42) | public function toCodeString(): string {
    method getType (line 46) | public function getType(): string {

FILE: lib/PhpParser/Node/Name/Relative.php
  class Relative (line 5) | class Relative extends \PhpParser\Node\Name {
    method isUnqualified (line 11) | public function isUnqualified(): bool {
    method isQualified (line 20) | public function isQualified(): bool {
    method isFullyQualified (line 29) | public function isFullyQualified(): bool {
    method isRelative (line 38) | public function isRelative(): bool {
    method toCodeString (line 42) | public function toCodeString(): string {
    method getType (line 46) | public function getType(): string {

FILE: lib/PhpParser/Node/NullableType.php
  class NullableType (line 7) | class NullableType extends ComplexType {
    method __construct (line 17) | public function __construct(Node $type, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Param.php
  class Param (line 9) | class Param extends NodeAbstract {
    method __construct (line 40) | public function __construct(
    method getSubNodeNames (line 59) | public function getSubNodeNames(): array {
    method getType (line 63) | public function getType(): string {
    method isPromoted (line 70) | public function isPromoted(): bool {
    method isFinal (line 74) | public function isFinal(): bool {
    method isPublic (line 78) | public function isPublic(): bool {
    method isProtected (line 91) | public function isProtected(): bool {
    method isPrivate (line 95) | public function isPrivate(): bool {
    method isReadonly (line 99) | public function isReadonly(): bool {
    method isPublicSet (line 106) | public function isPublicSet(): bool {
    method isProtectedSet (line 113) | public function isProtectedSet(): bool {
    method isPrivateSet (line 120) | public function isPrivateSet(): bool {

FILE: lib/PhpParser/Node/PropertyHook.php
  class PropertyHook (line 13) | class PropertyHook extends NodeAbstract implements FunctionLike {
    method __construct (line 44) | public function __construct($name, $body, array $subNodes = [], array ...
    method returnsByRef (line 54) | public function returnsByRef(): bool {
    method getParams (line 58) | public function getParams(): array {
    method getReturnType (line 62) | public function getReturnType() {
    method isFinal (line 69) | public function isFinal(): bool {
    method getStmts (line 73) | public function getStmts(): ?array {
    method getAttrGroups (line 94) | public function getAttrGroups(): array {
    method getType (line 98) | public function getType(): string {
    method getSubNodeNames (line 102) | public function getSubNodeNames(): array {

FILE: lib/PhpParser/Node/PropertyItem.php
  class PropertyItem (line 8) | class PropertyItem extends NodeAbstract {
    method __construct (line 21) | public function __construct($name, ?Node\Expr $default = null, array $...
    method getSubNodeNames (line 27) | public function getSubNodeNames(): array {
    method getType (line 31) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar.php
  class Scalar (line 5) | abstract class Scalar extends Expr {

FILE: lib/PhpParser/Node/Scalar/DNumber.php
  class DNumber (line 13) | class DNumber extends Float_ {

FILE: lib/PhpParser/Node/Scalar/Encapsed.php
  class Encapsed (line 13) | class Encapsed extends InterpolatedString {

FILE: lib/PhpParser/Node/Scalar/EncapsedStringPart.php
  class EncapsedStringPart (line 15) | class EncapsedStringPart extends InterpolatedStringPart {

FILE: lib/PhpParser/Node/Scalar/Float_.php
  class Float_ (line 7) | class Float_ extends Scalar {
    method __construct (line 17) | public function __construct(float $value, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method fromString (line 29) | public static function fromString(string $str, array $attributes = [])...
    method parse (line 45) | public static function parse(string $str): float {
    method getType (line 72) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/Int_.php
  class Int_ (line 8) | class Int_ extends Scalar {
    method __construct (line 24) | public function __construct(int $value, array $attributes = []) {
    method getSubNodeNames (line 29) | public function getSubNodeNames(): array {
    method fromString (line 42) | public static function fromString(string $str, array $attributes = [],...
    method getType (line 76) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/InterpolatedString.php
  class InterpolatedString (line 9) | class InterpolatedString extends Scalar {
    method __construct (line 19) | public function __construct(array $parts, array $attributes = []) {
    method getSubNodeNames (line 24) | public function getSubNodeNames(): array {
    method getType (line 28) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/LNumber.php
  class LNumber (line 13) | class LNumber extends Int_ {

FILE: lib/PhpParser/Node/Scalar/MagicConst.php
  class MagicConst (line 7) | abstract class MagicConst extends Scalar {
    method __construct (line 13) | public function __construct(array $attributes = []) {
    method getSubNodeNames (line 17) | public function getSubNodeNames(): array {
    method getName (line 26) | abstract public function getName(): string;

FILE: lib/PhpParser/Node/Scalar/MagicConst/Class_.php
  class Class_ (line 7) | class Class_ extends MagicConst {
    method getName (line 8) | public function getName(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/MagicConst/Dir.php
  class Dir (line 7) | class Dir extends MagicConst {
    method getName (line 8) | public function getName(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/MagicConst/File.php
  class File (line 7) | class File extends MagicConst {
    method getName (line 8) | public function getName(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/MagicConst/Function_.php
  class Function_ (line 7) | class Function_ extends MagicConst {
    method getName (line 8) | public function getName(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/MagicConst/Line.php
  class Line (line 7) | class Line extends MagicConst {
    method getName (line 8) | public function getName(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/MagicConst/Method.php
  class Method (line 7) | class Method extends MagicConst {
    method getName (line 8) | public function getName(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php
  class Namespace_ (line 7) | class Namespace_ extends MagicConst {
    method getName (line 8) | public function getName(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/MagicConst/Property.php
  class Property (line 7) | class Property extends MagicConst {
    method getName (line 8) | public function getName(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/MagicConst/Trait_.php
  class Trait_ (line 7) | class Trait_ extends MagicConst {
    method getName (line 8) | public function getName(): string {
    method getType (line 12) | public function getType(): string {

FILE: lib/PhpParser/Node/Scalar/String_.php
  class String_ (line 8) | class String_ extends Scalar {
    method __construct (line 36) | public function __construct(string $value, array $attributes = []) {
    method getSubNodeNames (line 41) | public function getSubNodeNames(): array {
    method fromString (line 49) | public static function fromString(string $str, array $attributes = [],...
    method parse (line 71) | public static function parse(string $str, bool $parseUnicodeEscape = t...
    method parseEscapeSequences (line 101) | public static function parseEscapeSequences(string $str, ?string $quot...
    method codePointToUtf8 (line 141) | private static function codePointToUtf8(int $num): string {
    method getType (line 158) | public function getType(): string {

FILE: lib/PhpParser/Node/StaticVar.php
  class StaticVar (line 8) | class StaticVar extends NodeAbstract {
    method __construct (line 21) | public function __construct(
    method getSubNodeNames (line 29) | public function getSubNodeNames(): array {
    method getType (line 33) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt.php
  class Stmt (line 7) | abstract class Stmt extends NodeAbstract {

FILE: lib/PhpParser/Node/Stmt/Block.php
  class Block (line 7) | class Block extends Stmt {
    method __construct (line 17) | public function __construct(array $stmts, array $attributes = []) {
    method getType (line 22) | public function getType(): string {
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {

FILE: lib/PhpParser/Node/Stmt/Break_.php
  class Break_ (line 7) | class Break_ extends Node\Stmt {
    method __construct (line 17) | public function __construct(?Node\Expr $num = null, array $attributes ...
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Case_.php
  class Case_ (line 7) | class Case_ extends Node\Stmt {
    method __construct (line 20) | public function __construct(?Node\Expr $cond, array $stmts = [], array...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Catch_.php
  class Catch_ (line 8) | class Catch_ extends Node\Stmt {
    method __construct (line 24) | public function __construct(
    method getSubNodeNames (line 33) | public function getSubNodeNames(): array {
    method getType (line 37) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/ClassConst.php
  class ClassConst (line 8) | class ClassConst extends Node\Stmt {
    method __construct (line 27) | public function __construct(
    method getSubNodeNames (line 41) | public function getSubNodeNames(): array {
    method isPublic (line 48) | public function isPublic(): bool {
    method isProtected (line 56) | public function isProtected(): bool {
    method isPrivate (line 63) | public function isPrivate(): bool {
    method isFinal (line 70) | public function isFinal(): bool {
    method getType (line 74) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/ClassLike.php
  class ClassLike (line 8) | abstract class ClassLike extends Node\Stmt {
    method getTraitUses (line 22) | public function getTraitUses(): array {
    method getConstants (line 35) | public function getConstants(): array {
    method getProperties (line 48) | public function getProperties(): array {
    method getProperty (line 65) | public function getProperty(string $name): ?Property {
    method getMethods (line 83) | public function getMethods(): array {
    method getMethod (line 100) | public function getMethod(string $name): ?ClassMethod {

FILE: lib/PhpParser/Node/Stmt/ClassMethod.php
  class ClassMethod (line 9) | class ClassMethod extends Node\Stmt implements FunctionLike {
    method __construct (line 66) | public function __construct($name, array $subNodes = [], array $attrib...
    method getSubNodeNames (line 77) | public function getSubNodeNames(): array {
    method returnsByRef (line 81) | public function returnsByRef(): bool {
    method getParams (line 85) | public function getParams(): array {
    method getReturnType (line 89) | public function getReturnType() {
    method getStmts (line 93) | public function getStmts(): ?array {
    method getAttrGroups (line 97) | public function getAttrGroups(): array {
    method isPublic (line 104) | public function isPublic(): bool {
    method isProtected (line 112) | public function isProtected(): bool {
    method isPrivate (line 119) | public function isPrivate(): bool {
    method isAbstract (line 126) | public function isAbstract(): bool {
    method isFinal (line 133) | public function isFinal(): bool {
    method isStatic (line 140) | public function isStatic(): bool {
    method isMagic (line 147) | public function isMagic(): bool {
    method getType (line 151) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Class_.php
  class Class_ (line 8) | class Class_ extends ClassLike {
    method __construct (line 52) | public function __construct($name, array $subNodes = [], array $attrib...
    method getSubNodeNames (line 62) | public function getSubNodeNames(): array {
    method isAbstract (line 69) | public function isAbstract(): bool {
    method isFinal (line 76) | public function isFinal(): bool {
    method isReadonly (line 80) | public function isReadonly(): bool {
    method isAnonymous (line 87) | public function isAnonymous(): bool {
    method getType (line 91) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Const_.php
  class Const_ (line 7) | class Const_ extends Node\Stmt {
    method __construct (line 20) | public function __construct(
    method getSubNodeNames (line 30) | public function getSubNodeNames(): array {
    method getType (line 34) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Continue_.php
  class Continue_ (line 7) | class Continue_ extends Node\Stmt {
    method __construct (line 17) | public function __construct(?Node\Expr $num = null, array $attributes ...
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/DeclareDeclare.php
  class DeclareDeclare (line 15) | class DeclareDeclare extends DeclareItem {

FILE: lib/PhpParser/Node/Stmt/Declare_.php
  class Declare_ (line 8) | class Declare_ extends Node\Stmt {
    method __construct (line 21) | public function __construct(array $declares, ?array $stmts = null, arr...
    method getSubNodeNames (line 27) | public function getSubNodeNames(): array {
    method getType (line 31) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Do_.php
  class Do_ (line 7) | class Do_ extends Node\Stmt {
    method __construct (line 20) | public function __construct(Node\Expr $cond, array $stmts = [], array ...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Echo_.php
  class Echo_ (line 7) | class Echo_ extends Node\Stmt {
    method __construct (line 17) | public function __construct(array $exprs, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/ElseIf_.php
  class ElseIf_ (line 7) | class ElseIf_ extends Node\Stmt {
    method __construct (line 20) | public function __construct(Node\Expr $cond, array $stmts = [], array ...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Else_.php
  class Else_ (line 7) | class Else_ extends Node\Stmt {
    method __construct (line 17) | public function __construct(array $stmts = [], array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/EnumCase.php
  class EnumCase (line 8) | class EnumCase extends Node\Stmt {
    method __construct (line 22) | public function __construct($name, ?Node\Expr $expr = null, array $att...
    method getSubNodeNames (line 29) | public function getSubNodeNames(): array {
    method getType (line 33) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Enum_.php
  class Enum_ (line 7) | class Enum_ extends ClassLike {
    method __construct (line 27) | public function __construct($name, array $subNodes = [], array $attrib...
    method getSubNodeNames (line 37) | public function getSubNodeNames(): array {
    method getType (line 41) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Expression.php
  class Expression (line 10) | class Expression extends Node\Stmt {
    method __construct (line 20) | public function __construct(Node\Expr $expr, array $attributes = []) {
    method getSubNodeNames (line 25) | public function getSubNodeNames(): array {
    method getType (line 29) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Finally_.php
  class Finally_ (line 7) | class Finally_ extends Node\Stmt {
    method __construct (line 17) | public function __construct(array $stmts = [], array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/For_.php
  class For_ (line 7) | class For_ extends Node\Stmt {
    method __construct (line 32) | public function __construct(array $subNodes = [], array $attributes = ...
    method getSubNodeNames (line 40) | public function getSubNodeNames(): array {
    method getType (line 44) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Foreach_.php
  class Foreach_ (line 7) | class Foreach_ extends Node\Stmt {
    method __construct (line 34) | public function __construct(Node\Expr $expr, Node\Expr $valueVar, arra...
    method getSubNodeNames (line 43) | public function getSubNodeNames(): array {
    method getType (line 47) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Function_.php
  class Function_ (line 8) | class Function_ extends Node\Stmt implements FunctionLike {
    method __construct (line 43) | public function __construct($name, array $subNodes = [], array $attrib...
    method getSubNodeNames (line 53) | public function getSubNodeNames(): array {
    method returnsByRef (line 57) | public function returnsByRef(): bool {
    method getParams (line 61) | public function getParams(): array {
    method getReturnType (line 65) | public function getReturnType() {
    method getAttrGroups (line 69) | public function getAttrGroups(): array {
    method getStmts (line 74) | public function getStmts(): array {
    method getType (line 78) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Global_.php
  class Global_ (line 7) | class Global_ extends Node\Stmt {
    method __construct (line 17) | public function __construct(array $vars, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Goto_.php
  class Goto_ (line 8) | class Goto_ extends Stmt {
    method __construct (line 18) | public function __construct($name, array $attributes = []) {
    method getSubNodeNames (line 23) | public function getSubNodeNames(): array {
    method getType (line 27) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/GroupUse.php
  class GroupUse (line 9) | class GroupUse extends Stmt {
    method __construct (line 27) | public function __construct(Name $prefix, array $uses, int $type = Use...
    method getSubNodeNames (line 34) | public function getSubNodeNames(): array {
    method getType (line 38) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/HaltCompiler.php
  class HaltCompiler (line 7) | class HaltCompiler extends Stmt {
    method __construct (line 17) | public function __construct(string $remaining, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/If_.php
  class If_ (line 7) | class If_ extends Node\Stmt {
    method __construct (line 31) | public function __construct(Node\Expr $cond, array $subNodes = [], arr...
    method getSubNodeNames (line 39) | public function getSubNodeNames(): array {
    method getType (line 43) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/InlineHTML.php
  class InlineHTML (line 7) | class InlineHTML extends Stmt {
    method __construct (line 17) | public function __construct(string $value, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Interface_.php
  class Interface_ (line 7) | class Interface_ extends ClassLike {
    method __construct (line 25) | public function __construct($name, array $subNodes = [], array $attrib...
    method getSubNodeNames (line 33) | public function getSubNodeNames(): array {
    method getType (line 37) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Label.php
  class Label (line 8) | class Label extends Stmt {
    method __construct (line 18) | public function __construct($name, array $attributes = []) {
    method getSubNodeNames (line 23) | public function getSubNodeNames(): array {
    method getType (line 27) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Namespace_.php
  class Namespace_ (line 7) | class Namespace_ extends Node\Stmt {
    method __construct (line 24) | public function __construct(?Node\Name $name = null, ?array $stmts = [...
    method getSubNodeNames (line 30) | public function getSubNodeNames(): array {
    method getType (line 34) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Nop.php
  class Nop (line 8) | class Nop extends Node\Stmt {
    method getSubNodeNames (line 9) | public function getSubNodeNames(): array {
    method getType (line 13) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Property.php
  class Property (line 12) | class Property extends Node\Stmt {
    method __construct (line 34) | public function __construct(int $flags, array $props, array $attribute...
    method getSubNodeNames (line 43) | public function getSubNodeNames(): array {
    method isPublic (line 50) | public function isPublic(): bool {
    method isProtected (line 58) | public function isProtected(): bool {
    method isPrivate (line 65) | public function isPrivate(): bool {
    method isStatic (line 72) | public function isStatic(): bool {
    method isReadonly (line 79) | public function isReadonly(): bool {
    method isAbstract (line 86) | public function isAbstract(): bool {
    method isFinal (line 93) | public function isFinal(): bool {
    method isPublicSet (line 100) | public function isPublicSet(): bool {
    method isProtectedSet (line 107) | public function isProtectedSet(): bool {
    method isPrivateSet (line 114) | public function isPrivateSet(): bool {
    method getType (line 118) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/PropertyProperty.php
  class PropertyProperty (line 15) | class PropertyProperty extends PropertyItem {

FILE: lib/PhpParser/Node/Stmt/Return_.php
  class Return_ (line 7) | class Return_ extends Node\Stmt {
    method __construct (line 17) | public function __construct(?Node\Expr $expr = null, array $attributes...
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/StaticVar.php
  class StaticVar (line 13) | class StaticVar extends \PhpParser\Node\StaticVar {

FILE: lib/PhpParser/Node/Stmt/Static_.php
  class Static_ (line 8) | class Static_ extends Stmt {
    method __construct (line 18) | public function __construct(array $vars, array $attributes = []) {
    method getSubNodeNames (line 23) | public function getSubNodeNames(): array {
    method getType (line 27) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Switch_.php
  class Switch_ (line 7) | class Switch_ extends Node\Stmt {
    method __construct (line 20) | public function __construct(Node\Expr $cond, array $cases, array $attr...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/TraitUse.php
  class TraitUse (line 7) | class TraitUse extends Node\Stmt {
    method __construct (line 20) | public function __construct(array $traits, array $adaptations = [], ar...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/TraitUseAdaptation.php
  class TraitUseAdaptation (line 7) | abstract class TraitUseAdaptation extends Node\Stmt {

FILE: lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php
  class Alias (line 7) | class Alias extends Node\Stmt\TraitUseAdaptation {
    method __construct (line 22) | public function __construct(?Node\Name $trait, $method, ?int $newModif...
    method getSubNodeNames (line 30) | public function getSubNodeNames(): array {
    method getType (line 34) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php
  class Precedence (line 7) | class Precedence extends Node\Stmt\TraitUseAdaptation {
    method __construct (line 19) | public function __construct(Node\Name $trait, $method, array $insteado...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Trait_.php
  class Trait_ (line 7) | class Trait_ extends ClassLike {
    method __construct (line 20) | public function __construct($name, array $subNodes = [], array $attrib...
    method getSubNodeNames (line 27) | public function getSubNodeNames(): array {
    method getType (line 31) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/TryCatch.php
  class TryCatch (line 7) | class TryCatch extends Node\Stmt {
    method __construct (line 23) | public function __construct(array $stmts, array $catches, ?Finally_ $f...
    method getSubNodeNames (line 30) | public function getSubNodeNames(): array {
    method getType (line 34) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/Unset_.php
  class Unset_ (line 7) | class Unset_ extends Node\Stmt {
    method __construct (line 17) | public function __construct(array $vars, array $attributes = []) {
    method getSubNodeNames (line 22) | public function getSubNodeNames(): array {
    method getType (line 26) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/UseUse.php
  class UseUse (line 15) | class UseUse extends UseItem {

FILE: lib/PhpParser/Node/Stmt/Use_.php
  class Use_ (line 8) | class Use_ extends Stmt {
    method __construct (line 34) | public function __construct(array $uses, int $type = self::TYPE_NORMAL...
    method getSubNodeNames (line 40) | public function getSubNodeNames(): array {
    method getType (line 44) | public function getType(): string {

FILE: lib/PhpParser/Node/Stmt/While_.php
  class While_ (line 7) | class While_ extends Node\Stmt {
    method __construct (line 20) | public function __construct(Node\Expr $cond, array $stmts = [], array ...
    method getSubNodeNames (line 26) | public function getSubNodeNames(): array {
    method getType (line 30) | public function getType(): string {

FILE: lib/PhpParser/Node/UnionType.php
  class UnionType (line 5) | class UnionType extends ComplexType {
    method __construct (line 15) | public function __construct(array $types, array $attributes = []) {
    method getSubNodeNames (line 20) | public function getSubNodeNames(): array {
    method getType (line 24) | public function getType(): string {

FILE: lib/PhpParser/Node/UseItem.php
  class UseItem (line 9) | class UseItem extends NodeAbstract {
    method __construct (line 27) | public function __construct(Node\Name $name, $alias = null, int $type ...
    method getSubNodeNames (line 34) | public function getSubNodeNames(): array {
    method getAlias (line 41) | public function getAlias(): Identifier {
    method getType (line 49) | public function getType(): string {

FILE: lib/PhpParser/Node/VarLikeIdentifier.php
  class VarLikeIdentifier (line 12) | class VarLikeIdentifier extends Identifier {
    method getType (line 13) | public function getType(): string {

FILE: lib/PhpParser/Node/VariadicPlaceholder.php
  class VariadicPlaceholder (line 10) | class VariadicPlaceholder extends NodeAbstract {
    method __construct (line 16) | public function __construct(array $attributes = []) {
    method getType (line 20) | public function getType(): string {
    method getSubNodeNames (line 24) | public function getSubNodeNames(): array {

FILE: lib/PhpParser/NodeAbstract.php
  class NodeAbstract (line 5) | abstract class NodeAbstract implements Node, \JsonSerializable {
    method __construct (line 14) | public function __construct(array $attributes = []) {
    method getLine (line 24) | public function getLine(): int {
    method getStartLine (line 36) | public function getStartLine(): int {
    method getEndLine (line 48) | public function getEndLine(): int {
    method getStartTokenPos (line 61) | public function getStartTokenPos(): int {
    method getEndTokenPos (line 74) | public function getEndTokenPos(): int {
    method getStartFilePos (line 85) | public function getStartFilePos(): int {
    method getEndFilePos (line 96) | public function getEndFilePos(): int {
    method getComments (line 107) | public function getComments(): array {
    method getDocComment (line 116) | public function getDocComment(): ?Comment\Doc {
    method setDocComment (line 135) | public function setDocComment(Comment\Doc $docComment): void {
    method setAttribute (line 151) | public function setAttribute(string $key, $value): void {
    method hasAttribute (line 155) | public function hasAttribute(string $key): bool {
    method getAttribute (line 159) | public function getAttribute(string $key, $default = null) {
    method getAttributes (line 167) | public function getAttributes(): array {
    method setAttributes (line 171) | public function setAttributes(array $attributes): void {
    method jsonSerialize (line 178) | public function jsonSerialize(): array {

FILE: lib/PhpParser/NodeDumper.php
  class NodeDumper (line 15) | class NodeDumper {
    method __construct (line 44) | public function __construct(array $options = []) {
    method dump (line 60) | public function dump($node, ?string $code = null): string {
    method dumpRecursive (line 69) | protected function dumpRecursive($node, bool $indent = true): void {
    method dumpFlags (line 165) | protected function dumpFlags(int $flags): string {
    method dumpEnum (line 206) | private function dumpEnum(int $value, array $map): string {
    method dumpIncludeType (line 213) | private function dumpIncludeType(int $type): string {
    method dumpUseType (line 222) | private function dumpUseType(int $type): string {
    method dumpIntKind (line 231) | private function dumpIntKind(int $kind): string {
    method dumpStringKind (line 240) | private function dumpStringKind(int $kind): string {
    method dumpArrayKind (line 249) | private function dumpArrayKind(int $kind): string {
    method dumpListKind (line 256) | private function dumpListKind(int $kind): string {
    method dumpPosition (line 270) | protected function dumpPosition(Node $node): ?string {
    method toColumn (line 287) | private function toColumn(string $code, int $pos): int {

FILE: lib/PhpParser/NodeFinder.php
  class NodeFinder (line 8) | class NodeFinder {
    method find (line 17) | public function find($nodes, callable $filter): array {
    method findInstanceOf (line 44) | public function findInstanceOf($nodes, string $class): array {
    method findFirst (line 58) | public function findFirst($nodes, callable $filter): ?Node {
    method findFirstInstanceOf (line 85) | public function findFirstInstanceOf($nodes, string $class): ?Node {

FILE: lib/PhpParser/NodeTraverser.php
  class NodeTraverser (line 5) | class NodeTraverser implements NodeTraverserInterface {
    method __construct (line 37) | public function __construct(NodeVisitor ...$visitors) {
    method addVisitor (line 46) | public function addVisitor(NodeVisitor $visitor): void {
    method removeVisitor (line 53) | public function removeVisitor(NodeVisitor $visitor): void {
    method traverse (line 67) | public function traverse(array $nodes): array {
    method traverseNode (line 93) | protected function traverseNode(Node $node): void {
    method traverseArray (line 181) | protected function traverseArray(array $nodes): array {
    method ensureReplacementReasonable (line 271) | private function ensureReplacementReasonable(Node $old, Node $new): vo...

FILE: lib/PhpParser/NodeTraverserInterface.php
  type NodeTraverserInterface (line 5) | interface NodeTraverserInterface {
    method addVisitor (line 11) | public function addVisitor(NodeVisitor $visitor): void;
    method removeVisitor (line 16) | public function removeVisitor(NodeVisitor $visitor): void;
    method traverse (line 25) | public function traverse(array $nodes): array;

FILE: lib/PhpParser/NodeVisitor.php
  type NodeVisitor (line 5) | interface NodeVisitor {
    method beforeTraverse (line 59) | public function beforeTraverse(array $nodes);
    method enterNode (line 87) | public function enterNode(Node $node);
    method leaveNode (line 110) | public function leaveNode(Node $node);
    method afterTraverse (line 123) | public function afterTraverse(array $nodes);

FILE: lib/PhpParser/NodeVisitor/CloningVisitor.php
  class CloningVisitor (line 13) | class CloningVisitor extends NodeVisitorAbstract {
    method enterNode (line 14) | public function enterNode(Node $origNode) {

FILE: lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php
  class CommentAnnotatingVisitor (line 10) | class CommentAnnotatingVisitor extends NodeVisitorAbstract {
    method __construct (line 23) | public function __construct(array $tokens) {
    method enterNode (line 35) | public function enterNode(Node $node) {

FILE: lib/PhpParser/NodeVisitor/FindingVisitor.php
  class FindingVisitor (line 12) | class FindingVisitor extends NodeVisitorAbstract {
    method __construct (line 18) | public function __construct(callable $filterCallback) {
    method getFoundNodes (line 29) | public function getFoundNodes(): array {
    method beforeTraverse (line 33) | public function beforeTraverse(array $nodes): ?array {
    method enterNode (line 39) | public function enterNode(Node $node) {

FILE: lib/PhpParser/NodeVisitor/FirstFindingVisitor.php
  class FirstFindingVisitor (line 13) | class FirstFindingVisitor extends NodeVisitorAbstract {
    method __construct (line 19) | public function __construct(callable $filterCallback) {
    method getFoundNode (line 30) | public function getFoundNode(): ?Node {
    method beforeTraverse (line 34) | public function beforeTraverse(array $nodes): ?array {
    method enterNode (line 40) | public function enterNode(Node $node) {

FILE: lib/PhpParser/NodeVisitor/NameResolver.php
  class NameResolver (line 14) | class NameResolver extends NodeVisitorAbstract {
    method __construct (line 37) | public function __construct(?ErrorHandler $errorHandler = null, array ...
    method getNameContext (line 46) | public function getNameContext(): NameContext {
    method beforeTraverse (line 50) | public function beforeTraverse(array $nodes): ?array {
    method enterNode (line 55) | public function enterNode(Node $node) {
    method addAlias (line 172) | private function addAlias(Node\UseItem $use, int $type, ?Name $prefix ...
    method resolveSignature (line 184) | private function resolveSignature($node): void {
    method resolveType (line 197) | private function resolveType(?Node $node): ?Node {
    method resolveName (line 222) | protected function resolveName(Name $name, int $type): Name {
    method resolveClassName (line 253) | protected function resolveClassName(Name $name): Name {
    method addNamespacedName (line 257) | protected function addNamespacedName(Node $node): void {
    method resolveAttrGroups (line 262) | protected function resolveAttrGroups(Node $node): void {

FILE: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
  class NodeConnectingVisitor (line 19) | final class NodeConnectingVisitor extends NodeVisitorAbstract {
    method __construct (line 32) | public function __construct(bool $weakReferences = false) {
    method beforeTraverse (line 36) | public function beforeTraverse(array $nodes) {
    method enterNode (line 41) | public function enterNode(Node $node) {
    method leaveNode (line 68) | public function leaveNode(Node $node) {

FILE: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
  class ParentConnectingVisitor (line 19) | final class ParentConnectingVisitor extends NodeVisitorAbstract {
    method __construct (line 27) | public function __construct(bool $weakReferences = false) {
    method beforeTraverse (line 31) | public function beforeTraverse(array $nodes) {
    method enterNode (line 35) | public function enterNode(Node $node) {
    method leaveNode (line 48) | public function leaveNode(Node $node) {

FILE: lib/PhpParser/NodeVisitorAbstract.php
  class NodeVisitorAbstract (line 8) | abstract class NodeVisitorAbstract implements NodeVisitor {
    method beforeTraverse (line 9) | public function beforeTraverse(array $nodes) {
    method enterNode (line 13) | public function enterNode(Node $node) {
    method leaveNode (line 17) | public function leaveNode(Node $node) {
    method afterTraverse (line 21) | public function afterTraverse(array $nodes) {

FILE: lib/PhpParser/Parser.php
  type Parser (line 5) | interface Parser {
    method parse (line 16) | public function parse(string $code, ?ErrorHandler $errorHandler = null...
    method getTokens (line 23) | public function getTokens(): array;

FILE: lib/PhpParser/Parser/Php7.php
  class Php7 (line 19) | class Php7 extends \PhpParser\ParserAbstract
    method initReduceCallbacks (line 1251) | protected function initReduceCallbacks(): void {

FILE: lib/PhpParser/Parser/Php8.php
  class Php8 (line 19) | class Php8 extends \PhpParser\ParserAbstract
    method initReduceCallbacks (line 1240) | protected function initReduceCallbacks(): void {

FILE: lib/PhpParser/ParserAbstract.php
  class ParserAbstract (line 39) | abstract class ParserAbstract implements Parser {
    method initReduceCallbacks (line 148) | abstract protected function initReduceCallbacks(): void;
    method __construct (line 163) | public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = nu...
    method parse (line 187) | public function parse(string $code, ?ErrorHandler $errorHandler = null...
    method getTokens (line 224) | public function getTokens(): array {
    method doParse (line 229) | protected function doParse(): ?array {
    method emitError (line 425) | protected function emitError(Error $error): void {
    method getErrorMessage (line 437) | protected function getErrorMessage(int $symbol, int $state): string {
    method getExpectedTokens (line 453) | protected function getExpectedTokens(int $state): array {
    method getAttributes (line 488) | protected function getAttributes(int $tokenStartPos, int $tokenEndPos)...
    method getAttributesForToken (line 506) | protected function getAttributesForToken(int $tokenPos): array {
    method handleNamespaces (line 568) | protected function handleNamespaces(array $stmts): array {
    method fixupNamespaceAttributes (line 624) | private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt):...
    method getNamespaceErrorAttributes (line 643) | private function getNamespaceErrorAttributes(Namespace_ $node): array {
    method getNamespacingStyle (line 665) | private function getNamespacingStyle(array $stmts): ?string {
    method handleBuiltinTypes (line 709) | protected function handleBuiltinTypes(Name $name) {
    method getAttributesAt (line 729) | protected function getAttributesAt(int $stackPos): array {
    method getFloatCastKind (line 733) | protected function getFloatCastKind(string $cast): int {
    method getIntCastKind (line 746) | protected function getIntCastKind(string $cast): int {
    method getBoolCastKind (line 755) | protected function getBoolCastKind(string $cast): int {
    method getStringCastKind (line 764) | protected function getStringCastKind(string $cast): int {
    method parseLNumber (line 774) | protected function parseLNumber(string $str, array $attributes, bool $...
    method parseNumString (line 792) | protected function parseNumString(string $str, array $attributes) {
    method stripIndentation (line 806) | protected function stripIndentation(
    method parseDocString (line 843) | protected function parseDocString(
    method createCommentFromToken (line 927) | protected function createCommentFromToken(Token $token, int $tokenPos)...
    method getCommentBeforeToken (line 939) | protected function getCommentBeforeToken(int $tokenPos): ?Comment {
    method maybeCreateZeroLengthNop (line 956) | protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop {
    method maybeCreateNop (line 976) | protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos...
    method handleHaltCompiler (line 983) | protected function handleHaltCompiler(): string {
    method inlineHtmlHasLeadingNewline (line 992) | protected function inlineHtmlHasLeadingNewline(int $stackPos): bool {
    method createEmptyElemAttributes (line 1008) | protected function createEmptyElemAttributes(int $tokenPos): array {
    method fixupArrayDestructuring (line 1012) | protected function fixupArrayDestructuring(Array_ $node): Expr\List_ {
    method postprocessList (line 1028) | protected function postprocessList(Expr\List_ $node): void {
    method fixupAlternativeElse (line 1038) | protected function fixupAlternativeElse($node): void {
    method checkClassModifier (line 1055) | protected function checkClassModifier(int $a, int $b, int $modifierPos...
    method checkModifier (line 1064) | protected function checkModifier(int $a, int $b, int $modifierPos): vo...
    method checkParam (line 1074) | protected function checkParam(Param $node): void {
    method checkTryCatch (line 1090) | protected function checkTryCatch(TryCatch $node): void {
    method checkNamespace (line 1098) | protected function checkNamespace(Namespace_ $node): void {
    method checkClassName (line 1110) | private function checkClassName(?Identifier $name, int $namePos): void {
    method checkImplementedInterfaces (line 1120) | private function checkImplementedInterfaces(array $interfaces): void {
    method checkClass (line 1131) | protected function checkClass(Class_ $node, int $namePos): void {
    method checkInterface (line 1144) | protected function checkInterface(Interface_ $node, int $namePos): void {
    method checkEnum (line 1149) | protected function checkEnum(Enum_ $node, int $namePos): void {
    method checkClassMethod (line 1154) | protected function checkClassMethod(ClassMethod $node, int $modifierPo...
    method checkClassConst (line 1182) | protected function checkClassConst(ClassConst $node, int $modifierPos)...
    method checkUseUse (line 1192) | protected function checkUseUse(UseItem $node, int $namePos): void {
    method checkPropertyHooksForMultiProperty (line 1204) | protected function checkPropertyHooksForMultiProperty(Property $proper...
    method checkEmptyPropertyHookList (line 1212) | protected function checkEmptyPropertyHookList(array $hooks, int $hookP...
    method checkPropertyHook (line 1219) | protected function checkPropertyHook(PropertyHook $hook, ?int $paramLi...
    method checkPropertyHookModifiers (line 1232) | protected function checkPropertyHookModifiers(int $a, int $b, int $mod...
    method checkConstantAttributes (line 1247) | protected function checkConstantAttributes(Const_ $node): void {
    method checkPipeOperatorParentheses (line 1254) | protected function checkPipeOperatorParentheses(Expr $node): void {
    method addPropertyNameToHooks (line 1264) | protected function addPropertyNameToHooks(Node $node): void {
    method isSimpleExit (line 1276) | private function isSimpleExit(array $args): bool {
    method createExitExpr (line 1292) | protected function createExitExpr(string $name, int $namePos, array $a...
    method createTokenMap (line 1310) | protected function createTokenMap(): array {

FILE: lib/PhpParser/ParserFactory.php
  class ParserFactory (line 8) | class ParserFactory {
    method createForVersion (line 14) | public function createForVersion(PhpVersion $version): Parser {
    method createForNewestSupportedVersion (line 31) | public function createForNewestSupportedVersion(): Parser {
    method createForHostVersion (line 39) | public function createForHostVersion(): Parser {

FILE: lib/PhpParser/PhpVersion.php
  class PhpVersion (line 8) | class PhpVersion {
    method __construct (line 30) | private function __construct(int $id) {
    method fromComponents (line 37) | public static function fromComponents(int $major, int $minor): self {
    method getNewestSupported (line 45) | public static function getNewestSupported(): self {
    method getHostVersion (line 52) | public static function getHostVersion(): self {
    method fromString (line 59) | public static function fromString(string $version): self {
    method equals (line 69) | public function equals(PhpVersion $other): bool {
    method newerOrEqual (line 76) | public function newerOrEqual(PhpVersion $other): bool {
    method older (line 83) | public function older(PhpVersion $other): bool {
    method isHostVersion (line 90) | public function isHostVersion(): bool {
    method supportsBuiltinType (line 97) | public function supportsBuiltinType(string $type): bool {
    method supportsShortArraySyntax (line 105) | public function supportsShortArraySyntax(): bool {
    method supportsShortArrayDestructuring (line 112) | public function supportsShortArrayDestructuring(): bool {
    method supportsFlexibleHeredoc (line 119) | public function supportsFlexibleHeredoc(): bool {
    method supportsTrailingCommaInParamList (line 126) | public function supportsTrailingCommaInParamList(): bool {
    method allowsAssignNewByReference (line 133) | public function allowsAssignNewByReference(): bool {
    method allowsInvalidOctals (line 140) | public function allowsInvalidOctals(): bool {
    method allowsDelInIdentifiers (line 147) | public function allowsDelInIdentifiers(): bool {
    method supportsYieldWithoutParentheses (line 154) | public function supportsYieldWithoutParentheses(): bool {
    method supportsUnicodeEscapes (line 161) | public function supportsUnicodeEscapes(): bool {
    method supportsAttributes (line 168) | public function supportsAttributes(): bool {
    method supportsNewDereferenceWithoutParentheses (line 172) | public function supportsNewDereferenceWithoutParentheses(): bool {

FILE: lib/PhpParser/PrettyPrinter.php
  type PrettyPrinter (line 7) | interface PrettyPrinter {
    method prettyPrint (line 15) | public function prettyPrint(array $stmts): string;
    method prettyPrintExpr (line 24) | public function prettyPrintExpr(Expr $node): string;
    method prettyPrintFile (line 33) | public function prettyPrintFile(array $stmts): string;
    method printFormatPreserving (line 50) | public function printFormatPreserving(array $stmts, array $origStmts, ...

FILE: lib/PhpParser/PrettyPrinter/Standard.php
  class Standard (line 16) | class Standard extends PrettyPrinterAbstract {
    method pParam (line 19) | protected function pParam(Node\Param $node): string {
    method pArg (line 30) | protected function pArg(Node\Arg $node): string {
    method pVariadicPlaceholder (line 36) | protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node...
    method pConst (line 40) | protected function pConst(Node\Const_ $node): string {
    method pNullableType (line 44) | protected function pNullableType(Node\NullableType $node): string {
    method pUnionType (line 48) | protected function pUnionType(Node\UnionType $node): string {
    method pIntersectionType (line 60) | protected function pIntersectionType(Node\IntersectionType $node): str...
    method pIdentifier (line 64) | protected function pIdentifier(Node\Identifier $node): string {
    method pVarLikeIdentifier (line 68) | protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node): s...
    method pAttribute (line 72) | protected function pAttribute(Node\Attribute $node): string {
    method pAttributeGroup (line 77) | protected function pAttributeGroup(Node\AttributeGroup $node): string {
    method pName (line 83) | protected function pName(Name $node): string {
    method pName_FullyQualified (line 87) | protected function pName_FullyQualified(Name\FullyQualified $node): st...
    method pName_Relative (line 91) | protected function pName_Relative(Name\Relative $node): string {
    method pScalar_MagicConst_Class (line 97) | protected function pScalar_MagicConst_Class(MagicConst\Class_ $node): ...
    method pScalar_MagicConst_Dir (line 101) | protected function pScalar_MagicConst_Dir(MagicConst\Dir $node): string {
    method pScalar_MagicConst_File (line 105) | protected function pScalar_MagicConst_File(MagicConst\File $node): str...
    method pScalar_MagicConst_Function (line 109) | protected function pScalar_MagicConst_Function(MagicConst\Function_ $n...
    method pScalar_MagicConst_Line (line 113) | protected function pScalar_MagicConst_Line(MagicConst\Line $node): str...
    method pScalar_MagicConst_Method (line 117) | protected function pScalar_MagicConst_Method(MagicConst\Method $node):...
    method pScalar_MagicConst_Namespace (line 121) | protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ ...
    method pScalar_MagicConst_Trait (line 125) | protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): ...
    method pScalar_MagicConst_Property (line 129) | protected function pScalar_MagicConst_Property(MagicConst\Property $no...
    method indentString (line 135) | private function indentString(string $str): string {
    method pScalar_String (line 139) | protected function pScalar_String(Scalar\String_ $node): string {
    method pScalar_InterpolatedString (line 180) | protected function pScalar_InterpolatedString(Scalar\InterpolatedStrin...
    method pScalar_Int (line 199) | protected function pScalar_Int(Scalar\Int_ $node): string {
    method pScalar_Float (line 234) | protected function pScalar_Float(Scalar\Float_ $node): string {
    method pExpr_Assign (line 263) | protected function pExpr_Assign(Expr\Assign $node, int $precedence, in...
    method pExpr_AssignRef (line 267) | protected function pExpr_AssignRef(Expr\AssignRef $node, int $preceden...
    method pExpr_AssignOp_Plus (line 271) | protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $prece...
    method pExpr_AssignOp_Minus (line 275) | protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $pre...
    method pExpr_AssignOp_Mul (line 279) | protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precede...
    method pExpr_AssignOp_Div (line 283) | protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precede...
    method pExpr_AssignOp_Concat (line 287) | protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $p...
    method pExpr_AssignOp_Mod (line 291) | protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precede...
    method pExpr_AssignOp_BitwiseAnd (line 295) | protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node...
    method pExpr_AssignOp_BitwiseOr (line 299) | protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, ...
    method pExpr_AssignOp_BitwiseXor (line 303) | protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node...
    method pExpr_AssignOp_ShiftLeft (line 307) | protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, ...
    method pExpr_AssignOp_ShiftRight (line 311) | protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node...
    method pExpr_AssignOp_Pow (line 315) | protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precede...
    method pExpr_AssignOp_Coalesce (line 319) | protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, in...
    method pExpr_BinaryOp_Plus (line 325) | protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $prece...
    method pExpr_BinaryOp_Minus (line 329) | protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $pre...
    method pExpr_BinaryOp_Mul (line 333) | protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precede...
    method pExpr_BinaryOp_Div (line 337) | protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precede...
    method pExpr_BinaryOp_Concat (line 341) | protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $p...
    method pExpr_BinaryOp_Mod (line 345) | protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precede...
    method pExpr_BinaryOp_BooleanAnd (line 349) | protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node...
    method pExpr_BinaryOp_BooleanOr (line 353) | protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, ...
    method pExpr_BinaryOp_BitwiseAnd (line 357) | protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node...
    method pExpr_BinaryOp_BitwiseOr (line 361) | protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, ...
    method pExpr_BinaryOp_BitwiseXor (line 365) | protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node...
    method pExpr_BinaryOp_ShiftLeft (line 369) | protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, ...
    method pExpr_BinaryOp_ShiftRight (line 373) | protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node...
    method pExpr_BinaryOp_Pow (line 377) | protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precede...
    method pExpr_BinaryOp_LogicalAnd (line 381) | protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node...
    method pExpr_BinaryOp_LogicalOr (line 385) | protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, ...
    method pExpr_BinaryOp_LogicalXor (line 389) | protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node...
    method pExpr_BinaryOp_Equal (line 393) | protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $pre...
    method pExpr_BinaryOp_NotEqual (line 397) | protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, in...
    method pExpr_BinaryOp_Identical (line 401) | protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, ...
    method pExpr_BinaryOp_NotIdentical (line 405) | protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $...
    method pExpr_BinaryOp_Spaceship (line 409) | protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, ...
    method pExpr_BinaryOp_Greater (line 413) | protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int ...
    method pExpr_BinaryOp_GreaterOrEqual (line 417) | protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqu...
    method pExpr_BinaryOp_Smaller (line 421) | protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int ...
    method pExpr_BinaryOp_SmallerOrEqual (line 425) | protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqu...
    method pExpr_BinaryOp_Coalesce (line 429) | protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, in...
    method pExpr_BinaryOp_Pipe (line 433) | protected function pExpr_BinaryOp_Pipe(BinaryOp\Pipe $node, int $prece...
    method pExpr_Instanceof (line 441) | protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $prece...
    method pExpr_BooleanNot (line 450) | protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $preced...
    method pExpr_BitwiseNot (line 454) | protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $preced...
    method pExpr_UnaryMinus (line 458) | protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $preced...
    method pExpr_UnaryPlus (line 462) | protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $preceden...
    method pExpr_PreInc (line 466) | protected function pExpr_PreInc(Expr\PreInc $node): string {
    method pExpr_PreDec (line 470) | protected function pExpr_PreDec(Expr\PreDec $node): string {
    method pExpr_PostInc (line 474) | protected function pExpr_PostInc(Expr\PostInc $node): string {
    method pExpr_PostDec (line 478) | protected function pExpr_PostDec(Expr\PostDec $node): string {
    method pExpr_ErrorSuppress (line 482) | protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $...
    method pExpr_YieldFrom (line 486) | protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $preceden...
    method pExpr_Print (line 490) | protected function pExpr_Print(Expr\Print_ $node, int $precedence, int...
    method pExpr_Cast_Int (line 496) | protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, in...
    method pExpr_Cast_Double (line 500) | protected function pExpr_Cast_Double(Cast\Double $node, int $precedenc...
    method pExpr_Cast_String (line 513) | protected function pExpr_Cast_String(Cast\String_ $node, int $preceden...
    method pExpr_Cast_Array (line 517) | protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence...
    method pExpr_Cast_Object (line 521) | protected function pExpr_Cast_Object(Cast\Object_ $node, int $preceden...
    method pExpr_Cast_Bool (line 525) | protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, ...
    method pExpr_Cast_Unset (line 529) | protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence...
    method pExpr_Cast_Void (line 533) | protected function pExpr_Cast_Void(Cast\Void_ $node, int $precedence, ...
    method pExpr_FuncCall (line 539) | protected function pExpr_FuncCall(Expr\FuncCall $node): string {
    method pExpr_MethodCall (line 544) | protected function pExpr_MethodCall(Expr\MethodCall $node): string {
    method pExpr_NullsafeMethodCall (line 549) | protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $n...
    method pExpr_StaticCall (line 554) | protected function pExpr_StaticCall(Expr\StaticCall $node): string {
    method pExpr_Empty (line 564) | protected function pExpr_Empty(Expr\Empty_ $node): string {
    method pExpr_Isset (line 568) | protected function pExpr_Isset(Expr\Isset_ $node): string {
    method pExpr_Eval (line 572) | protected function pExpr_Eval(Expr\Eval_ $node): string {
    method pExpr_Include (line 576) | protected function pExpr_Include(Expr\Include_ $node, int $precedence,...
    method pExpr_List (line 587) | protected function pExpr_List(Expr\List_ $node): string {
    method pExpr_Error (line 599) | protected function pExpr_Error(Expr\Error $node): string {
    method pExpr_Variable (line 603) | protected function pExpr_Variable(Expr\Variable $node): string {
    method pExpr_Array (line 611) | protected function pExpr_Array(Expr\Array_ $node): string {
    method pKey (line 621) | protected function pKey(?Node $node): string {
    method pArrayItem (line 636) | protected function pArrayItem(Node\ArrayItem $node): string {
    method pExpr_ArrayDimFetch (line 643) | protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node): stri...
    method pExpr_ConstFetch (line 648) | protected function pExpr_ConstFetch(Expr\ConstFetch $node): string {
    method pExpr_ClassConstFetch (line 652) | protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): ...
    method pExpr_PropertyFetch (line 656) | protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): stri...
    method pExpr_NullsafePropertyFetch (line 660) | protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFe...
    method pExpr_StaticPropertyFetch (line 664) | protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch ...
    method pExpr_ShellExec (line 668) | protected function pExpr_ShellExec(Expr\ShellExec $node): string {
    method pExpr_Closure (line 672) | protected function pExpr_Closure(Expr\Closure $node): string {
    method pExpr_Match (line 682) | protected function pExpr_Match(Expr\Match_ $node): string {
    method pMatchArm (line 689) | protected function pMatchArm(Node\MatchArm $node): string {
    method pExpr_ArrowFunction (line 702) | protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $...
    method pClosureUse (line 714) | protected function pClosureUse(Node\ClosureUse $node): string {
    method pExpr_New (line 718) | protected function pExpr_New(Expr\New_ $node): string {
    method pExpr_Clone (line 727) | protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int...
    method pExpr_Ternary (line 731) | protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, ...
    method pExpr_Exit (line 740) | protected function pExpr_Exit(Expr\Exit_ $node): string {
    method pExpr_Throw (line 746) | protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int...
    method pExpr_Yield (line 750) | protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int...
    method pStmt_Namespace (line 766) | protected function pStmt_Namespace(Stmt\Namespace_ $node): string {
    method pStmt_Use (line 776) | protected function pStmt_Use(Stmt\Use_ $node): string {
    method pStmt_GroupUse (line 781) | protected function pStmt_GroupUse(Stmt\GroupUse $node): string {
    method pUseItem (line 786) | protected function pUseItem(Node\UseItem $node): string {
    method pUseType (line 791) | protected function pUseType(int $type): string {
    method pStmt_Interface (line 796) | protected function pStmt_Interface(Stmt\Interface_ $node): string {
    method pStmt_Enum (line 803) | protected function pStmt_Enum(Stmt\Enum_ $node): string {
    method pStmt_Class (line 811) | protected function pStmt_Class(Stmt\Class_ $node): string {
    method pStmt_Trait (line 815) | protected function pStmt_Trait(Stmt\Trait_ $node): string {
    method pStmt_EnumCase (line 821) | protected function pStmt_EnumCase(Stmt\EnumCase $node): string {
    method pStmt_TraitUse (line 828) | protected function pStmt_TraitUse(Stmt\TraitUse $node): string {
    method pStmt_TraitUseAdaptation_Precedence (line 835) | protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAd...
    method pStmt_TraitUseAdaptation_Alias (line 840) | protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptat...
    method pStmt_Property (line 848) | protected function pStmt_Property(Stmt\Property $node): string {
    method pPropertyItem (line 856) | protected function pPropertyItem(Node\PropertyItem $node): string {
    method pPropertyHook (line 861) | protected function pPropertyHook(Node\PropertyHook $node): string {
    method pStmt_ClassMethod (line 870) | protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string {
    method pStmt_ClassConst (line 881) | protected function pStmt_ClassConst(Stmt\ClassConst $node): string {
    method pStmt_Function (line 889) | protected function pStmt_Function(Stmt\Function_ $node): string {
    method pStmt_Const (line 897) | protected function pStmt_Const(Stmt\Const_ $node): string {
    method pStmt_Declare (line 903) | protected function pStmt_Declare(Stmt\Declare_ $node): string {
    method pDeclareItem (line 908) | protected function pDeclareItem(Node\DeclareItem $node): string {
    method pStmt_If (line 914) | protected function pStmt_If(Stmt\If_ $node): string {
    method pStmt_ElseIf (line 921) | protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string {
    method pStmt_Else (line 926) | protected function pStmt_Else(Stmt\Else_ $node): string {
    method pStmt_For (line 934) | protected function pStmt_For(Stmt\For_ $node): string {
    method pStmt_Foreach (line 942) | protected function pStmt_Foreach(Stmt\Foreach_ $node): string {
    method pStmt_While (line 949) | protected function pStmt_While(Stmt\While_ $node): string {
    method pStmt_Do (line 954) | protected function pStmt_Do(Stmt\Do_ $node): string {
    method pStmt_Switch (line 959) | protected function pStmt_Switch(Stmt\Switch_ $node): string {
    method pStmt_Case (line 964) | protected function pStmt_Case(Stmt\Case_ $node): string {
    method pStmt_TryCatch (line 969) | protected function pStmt_TryCatch(Stmt\TryCatch $node): string {
    method pStmt_Catch (line 975) | protected function pStmt_Catch(Stmt\Catch_ $node): string {
    method pStmt_Finally (line 981) | protected function pStmt_Finally(Stmt\Finally_ $node): string {
    method pStmt_Break (line 985) | protected function pStmt_Break(Stmt\Break_ $node): string {
    method pStmt_Continue (line 989) | protected function pStmt_Continue(Stmt\Continue_ $node): string {
    method pStmt_Return (line 993) | protected function pStmt_Return(Stmt\Return_ $node): string {
    method pStmt_Label (line 997) | protected function pStmt_Label(Stmt\Label $node): string {
    method pStmt_Goto (line 1001) | protected function pStmt_Goto(Stmt\Goto_ $node): string {
    method pStmt_Expression (line 1007) | protected function pStmt_Expression(Stmt\Expression $node): string {
    method pStmt_Echo (line 1011) | protected function pStmt_Echo(Stmt\Echo_ $node): string {
    method pStmt_Static (line 1015) | protected function pStmt_Static(Stmt\Static_ $node): string {
    method pStmt_Global (line 1019) | protected function pStmt_Global(Stmt\Global_ $node): string {
    method pStaticVar (line 1023) | protected function pStaticVar(Node\StaticVar $node): string {
    method pStmt_Unset (line 1028) | protected function pStmt_Unset(Stmt\Unset_ $node): string {
    method pStmt_InlineHTML (line 1032) | protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string {
    method pStmt_HaltCompiler (line 1037) | protected function pStmt_HaltCompiler(Stmt\HaltCompiler $node): string {
    method pStmt_Nop (line 1041) | protected function pStmt_Nop(Stmt\Nop $node): string {
    method pStmt_Block (line 1045) | protected function pStmt_Block(Stmt\Block $node): string {
    method pClassCommon (line 1051) | protected function pClassCommon(Stmt\Class_ $node, string $afterClassT...
    method pObjectProperty (line 1060) | protected function pObjectProperty(Node $node): string {
    method pEncapsList (line 1070) | protected function pEncapsList(array $encapsList, ?string $quote): str...
    method pSingleQuotedString (line 1083) | protected function pSingleQuotedString(string $string): string {
    method escapeString (line 1092) | protected function escapeString(string $string, ?string $quote): string {
    method containsEndLabel (line 1130) | protected function containsEndLabel(string $string, string $label, boo...
    method encapsedContainsEndLabel (line 1137) | protected function encapsedContainsEndLabel(array $parts, string $labe...
    method pDereferenceLhs (line 1148) | protected function pDereferenceLhs(Node $node): string {
    method pStaticDereferenceLhs (line 1156) | protected function pStaticDereferenceLhs(Node $node): string {
    method pCallLhs (line 1164) | protected function pCallLhs(Node $node): string {
    method pNewOperand (line 1172) | protected function pNewOperand(Node $node): string {
    method hasNodeWithComments (line 1183) | protected function hasNodeWithComments(array $nodes): bool {
    method pMaybeMultiline (line 1193) | protected function pMaybeMultiline(array $nodes, bool $trailingComma =...
    method hasParamWithAttributes (line 1203) | private function hasParamWithAttributes(array $params): bool {
    method pParams (line 1213) | protected function pParams(array $params): string {
    method pAttrGroups (line 1223) | protected function pAttrGroups(array $nodes, bool $inline = false): st...

FILE: lib/PhpParser/PrettyPrinterAbstract.php
  class PrettyPrinterAbstract (line 22) | abstract class PrettyPrinterAbstract implements PrettyPrinter {
    method __construct (line 196) | public function __construct(array $options = []) {
    method resetState (line 224) | protected function resetState(): void {
    method setIndentLevel (line 235) | protected function setIndentLevel(int $level): void {
    method indent (line 249) | protected function indent(): void {
    method outdent (line 257) | protected function outdent(): void {
    method prettyPrint (line 269) | public function prettyPrint(array $stmts): string {
    method prettyPrintExpr (line 283) | public function prettyPrintExpr(Expr $node): string {
    method prettyPrintFile (line 295) | public function prettyPrintFile(array $stmts): string {
    method preprocessNodes (line 317) | protected function preprocessNodes(array $nodes): void {
    method handleMagicTokens (line 331) | protected function handleMagicTokens(string $str): string {
    method pStmts (line 352) | protected function pStmts(array $nodes, bool $indent = true): string {
    method pInfixOp (line 389) | protected function pInfixOp(
    method pPrefixOp (line 416) | protected function pPrefixOp(string $class, string $operatorString, No...
    method pPostfixOp (line 446) | protected function pPostfixOp(string $class, Node $node, string $opera...
    method pImplode (line 469) | protected function pImplode(array $nodes, string $glue = ''): string {
    method pCommaSeparated (line 489) | protected function pCommaSeparated(array $nodes): string {
    method pCommaSeparatedMultiline (line 503) | protected function pCommaSeparatedMultiline(array $nodes, bool $traili...
    method pComments (line 535) | protected function pComments(array $comments): string {
    method printFormatPreserving (line 560) | public function printFormatPreserving(array $stmts, array $origStmts, ...
    method pFallback (line 588) | protected function pFallback(Node $node, int $precedence, int $lhsPrec...
    method p (line 604) | protected function p(
    method pArray (line 785) | protected function pArray(
    method pFixup (line 1063) | protected function pFixup(int $fixup, Node $subNode, ?string $parentCl...
    method safeAppend (line 1141) | protected function safeAppend(string &$str, string $append): void {
    method callLhsRequiresParens (line 1166) | protected function callLhsRequiresParens(Node $node): bool {
    method dereferenceLhsRequiresParens (line 1187) | protected function dereferenceLhsRequiresParens(Node $node): bool {
    method staticDereferenceLhsRequiresParens (line 1200) | protected function staticDereferenceLhsRequiresParens(Node $node): bool {
    method newOperandRequiresParens (line 1226) | protected function newOperandRequiresParens(Node $node): bool {
    method pModifiers (line 1248) | protected function pModifiers(int $modifiers): string {
    method pStatic (line 1261) | protected function pStatic(bool $static): string {
    method isMultiline (line 1272) | protected function isMultiline(array $nodes): bool {
    method initializeLabelCharMap (line 1304) | protected function initializeLabelCharMap(): void {
    method initializeNodeListDiffer (line 1325) | protected function initializeNodeListDiffer(): void {
    method initializeFixupMap (line 1345) | protected function initializeFixupMap(): void {
    method initializeRemovalMap (line 1434) | protected function initializeRemovalMap(): void {
    method initializeInsertionMap (line 1482) | protected function initializeInsertionMap(): void {
    method initializeListInsertionMap (line 1527) | protected function initializeListInsertionMap(): void {
    method initializeEmptyListInsertionMap (line 1632) | protected function initializeEmptyListInsertionMap(): void {
    method initializeModifierChangeMap (line 1698) | protected function initializeModifierChangeMap(): void {

FILE: lib/PhpParser/Token.php
  class Token (line 8) | class Token extends Internal\TokenPolyfill {
    method getEndPos (line 10) | public function getEndPos(): int {
    method getEndLine (line 15) | public function getEndLine(): int {

FILE: lib/PhpParser/compatibility_tokens.php
  function defineCompatibilityTokens (line 6) | function defineCompatibilityTokens(): void {

FILE: test/PhpParser/Builder/ClassConstTest.php
  class ClassConstTest (line 18) | class ClassConstTest extends \PHPUnit\Framework\TestCase {
    method createClassConstBuilder (line 19) | public function createClassConstBuilder($name, $value) {
    method testModifiers (line 23) | public function testModifiers(): void {
    method testDocComment (line 85) | public function testDocComment(): void {
    method testAddConst (line 105) | public function testAddConst(): void {
    method testAddAttribute (line 121) | public function testAddAttribute(): void {
    method testType (line 145) | public function testType(): void {
    method testValues (line 160) | public function testValues($value, $expectedValueNode): void {
    method provideTestDefaultValues (line 168) | public static function provideTestDefaultValues() {

FILE: test/PhpParser/Builder/ClassTest.php
  class ClassTest (line 16) | class ClassTest extends \PHPUnit\Framework\TestCase {
    method createClassBuilder (line 17) | protected function createClassBuilder($class) {
    method testExtendsImplements (line 21) | public function testExtendsImplements(): void {
    method testAbstract (line 43) | public function testAbstract(): void {
    method testFinal (line 57) | public function testFinal(): void {
    method testReadonly (line 71) | public function testReadonly(): void {
    method testStatementOrder (line 85) | public function testStatementOrder(): void {
    method testDocComment (line 111) | public function testDocComment(): void {
    method testAddAttribute (line 144) | public function testAddAttribute(): void {
    method testInvalidStmtError (line 165) | public function testInvalidStmtError(): void {
    method testInvalidDocComment (line 173) | public function testInvalidDocComment(): void {
    method testEmptyName (line 180) | public function testEmptyName(): void {
    method testInvalidName (line 187) | public function testInvalidName(): void {

FILE: test/PhpParser/Builder/EnumCaseTest.php
  class EnumCaseTest (line 15) | class EnumCaseTest extends \PHPUnit\Framework\TestCase {
    method createEnumCaseBuilder (line 16) | public function createEnumCaseBuilder($name) {
    method testDocComment (line 20) | public function testDocComment(): void {
    method testAddAttribute (line 38) | public function testAddAttribute(): void {
    method testValues (line 62) | public function testValues($value, $expectedValueNode): void {
    method provideTestDefaultValues (line 71) | public static function provideTestDefaultValues() {

FILE: test/PhpParser/Builder/EnumTest.php
  class EnumTest (line 15) | class EnumTest extends \PHPUnit\Framework\TestCase {
    method createEnumBuilder (line 16) | protected function createEnumBuilder($class) {
    method testImplements (line 20) | public function testImplements(): void {
    method testSetScalarType (line 37) | public function testSetScalarType(): void {
    method testStatementOrder (line 51) | public function testStatementOrder(): void {
    method testDocComment (line 76) | public function testDocComment(): void {
    method testAddAttribute (line 109) | public function testAddAttribute(): void {
    method testInvalidStmtError (line 130) | public function testInvalidStmtError(): void {
    method testInvalidDocComment (line 138) | public function testInvalidDocComment(): void {
    method testEmptyName (line 145) | public function testEmptyName(): void {
    method testInvalidName (line 152) | public function testInvalidName(): void {

FILE: test/PhpParser/Builder/FunctionTest.php
  class FunctionTest (line 18) | class FunctionTest extends \PHPUnit\Framework\TestCase {
    method createFunctionBuilder (line 19) | public function createFunctionBuilder($name) {
    method testReturnByRef (line 23) | public function testReturnByRef(): void {
    method testParams (line 37) | public function testParams(): void {
    method testStmts (line 56) | public function testStmts(): void {
    method testDocComment (line 79) | public function testDocComment(): void {
    method testAddAttribute (line 89) | public function testAddAttribute(): void {
    method testReturnType (line 105) | public function testReturnType(): void {
    method testInvalidNullableVoidType (line 115) | public function testInvalidNullableVoidType(): void {
    method testInvalidParamError (line 121) | public function testInvalidParamError(): void {
    method testAddNonStmt (line 129) | public function testAddNonStmt(): void {

FILE: test/PhpParser/Builder/InterfaceTest.php
  class InterfaceTest (line 16) | class InterfaceTest extends \PHPUnit\Framework\TestCase {
    method createInterfaceBuilder (line 17) | protected function createInterfaceBuilder() {
    method dump (line 21) | private function dump($node) {
    method testEmpty (line 26) | public function testEmpty(): void {
    method testExtending (line 32) | public function testExtending(): void {
    method testAddMethod (line 45) | public function testAddMethod(): void {
    method testAddConst (line 51) | public function testAddConst(): void {
    method testOrder (line 59) | public function testOrder(): void {
    method testDocComment (line 74) | public function testDocComment(): void {
    method testAddAttribute (line 84) | public function testAddAttribute(): void {
    method testInvalidStmtError (line 100) | public function testInvalidStmtError(): void {
    method testFullFunctional (line 106) | public function testFullFunctional(): void {

FILE: test/PhpParser/Builder/MethodTest.php
  class MethodTest (line 19) | class MethodTest extends \PHPUnit\Framework\TestCase {
    method createMethodBuilder (line 20) | public function createMethodBuilder($name) {
    method testModifiers (line 24) | public function testModifiers(): void {
    method testReturnByRef (line 66) | public function testReturnByRef(): void {
    method testParams (line 80) | public function testParams(): void {
    method testStmts (line 99) | public function testStmts(): void {
    method testDocComment (line 121) | public function testDocComment(): void {
    method testAddAttribute (line 131) | public function testAddAttribute(): void {
    method testReturnType (line 147) | public function testReturnType(): void {
    method testAddStmtToAbstractMethodError (line 156) | public function testAddStmtToAbstractMethodError(): void {
    method testMakeMethodWithStmtsAbstractError (line 165) | public function testMakeMethodWithStmtsAbstractError(): void {
    method testInvalidParamError (line 174) | public function testInvalidParamError(): void {

FILE: test/PhpParser/Builder/NamespaceTest.php
  class NamespaceTest (line 9) | class NamespaceTest extends \PHPUnit\Framework\TestCase {
    method createNamespaceBuilder (line 10) | protected function createNamespaceBuilder($fqn) {
    method testCreation (line 14) | public function testCreation(): void {

FILE: test/PhpParser/Builder/ParamTest.php
  class ParamTest (line 16) | class ParamTest extends \PHPUnit\Framework\TestCase {
    method createParamBuilder (line 17) | public function createParamBuilder($name) {
    method testDefaultValues (line 24) | public function testDefaultValues($value, $expectedValueNode): void {
    method provideTestDefaultValues (line 33) | public static function provideTestDefaultValues() {
    method testTypes (line 92) | public function testTypes($typeHint, $expectedType): void {
    method provideTestTypes (line 110) | public static function provideTestTypes() {
    method provideTestNullableTypes (line 130) | public static function provideTestNullableTypes() {
    method provideTestUnionTypes (line 145) | public static function provideTestUnionTypes() {
    method testVoidTypeError (line 172) | public function testVoidTypeError(): void {
    method testInvalidTypeError (line 178) | public function testInvalidTypeError(): void {
    method testByRef (line 184) | public function testByRef(): void {
    method testVariadic (line 196) | public function testVariadic(): void {
    method testMakePublic (line 208) | public function testMakePublic(): void {
    method testMakeProtected (line 220) | public function testMakeProtected(): void {
    method testMakePrivate (line 242) | public function testMakePrivate(): void {
    method testMakeReadonly (line 264) | public function testMakeReadonly(): void {
    method testAddAttribute (line 276) | public function testAddAttribute(): void {

FILE: test/PhpParser/Builder/PropertyTest.php
  class PropertyTest (line 20) | class PropertyTest extends \PHPUnit\Framework\TestCase {
    method createPropertyBuilder (line 21) | public function createPropertyBuilder($name) {
    method testModifiers (line 25) | public function testModifiers(): void {
    method testAbstractWithoutHook (line 101) | public function testAbstractWithoutHook() {
    method testDocComment (line 107) | public function testDocComment(): void {
    method testDefaultValues (line 126) | public function testDefaultValues($value, $expectedValueNode): void {
    method testAddAttribute (line 135) | public function testAddAttribute(): void {
    method testAddHook (line 161) | public function testAddHook(): void {
    method provideTestDefaultValues (line 178) | public static function provideTestDefaultValues() {

FILE: test/PhpParser/Builder/TraitTest.php
  class TraitTest (line 21) | class TraitTest extends \PHPUnit\Framework\TestCase {
    method createTraitBuilder (line 22) | protected function createTraitBuilder($class) {
    method testStmtAddition (line 26) | public function testStmtAddition(): void {
    method testInvalidStmtError (line 52) | public function testInvalidStmtError(): void {
    method testGetMethods (line 60) | public function testGetMethods(): void {
    method testGetProperties (line 80) | public function testGetProperties(): void {
    method testAddAttribute (line 98) | public function testAddAttribute(): void {

FILE: test/PhpParser/Builder/TraitUseAdaptationTest.php
  class TraitUseAdaptationTest (line 10) | class TraitUseAdaptationTest extends \PHPUnit\Framework\TestCase {
    method createTraitUseAdaptationBuilder (line 11) | protected function createTraitUseAdaptationBuilder($trait, $method) {
    method testAsMake (line 15) | public function testAsMake(): void {
    method testInsteadof (line 39) | public function testInsteadof(): void {
    method testAsOnNotAlias (line 55) | public function testAsOnNotAlias(): void {
    method testInsteadofOnNotPrecedence (line 64) | public function testInsteadofOnNotPrecedence(): void {
    method testInsteadofWithoutTrait (line 73) | public function testInsteadofWithoutTrait(): void {
    method testMakeOnNotAlias (line 81) | public function testMakeOnNotAlias(): void {
    method testMultipleMake (line 90) | public function testMultipleMake(): void {
    method testUndefinedType (line 99) | public function testUndefinedType(): void {

FILE: test/PhpParser/Builder/TraitUseTest.php
  class TraitUseTest (line 8) | class TraitUseTest extends \PHPUnit\Framework\TestCase {
    method createTraitUseBuilder (line 9) | protected function createTraitUseBuilder(...$traits) {
    method testAnd (line 13) | public function testAnd(): void {
    method testWith (line 28) | public function testWith(): void {
    method testInvalidAdaptationNode (line 44) | public function testInvalidAdaptationNode(): void {

FILE: test/PhpParser/Builder/UseTest.php
  class UseTest (line 9) | class UseTest extends \PHPUnit\Framework\TestCase {
    method createUseBuilder (line 10) | protected function createUseBuilder($name, $type = Stmt\Use_::TYPE_NOR...
    method testCreation (line 14) | public function testCreation(): void {

FILE: test/PhpParser/BuilderFactoryTest.php
  class BuilderFactoryTest (line 14) | class BuilderFactoryTest extends \PHPUnit\Framework\TestCase {
    method testFactory (line 18) | public function testFactory($methodName, $className): void {
    method provideTestFactory (line 23) | public static function provideTestFactory() {
    method testFactoryClassConst (line 41) | public function testFactoryClassConst(): void {
    method testAttribute (line 46) | public function testAttribute(): void {
    method testVal (line 56) | public function testVal(): void {
    method testConcat (line 66) | public function testConcat(): void {
    method testConcatOneError (line 86) | public function testConcatOneError(): void {
    method testConcatInvalidExpr (line 92) | public function testConcatInvalidExpr(): void {
    method testArgs (line 98) | public function testArgs(): void {
    method testNamedArgs (line 111) | public function testNamedArgs(): void {
    method testCalls (line 122) | public function testCalls(): void {
    method testConstFetches (line 198) | public function testConstFetches(): void {
    method testVar (line 218) | public function testVar(): void {
    method testPropertyFetch (line 230) | public function testPropertyFetch(): void {
    method testInvalidIdentifier (line 246) | public function testInvalidIdentifier(): void {
    method testInvalidIdentifierOrExpr (line 252) | public function testInvalidIdentifierOrExpr(): void {
    method testInvalidNameOrExpr (line 258) | public function testInvalidNameOrExpr(): void {
    method testInvalidVar (line 264) | public function testInvalidVar(): void {
    method testIntegration (line 270) | public function testIntegration(): void {

FILE: test/PhpParser/BuilderHelpersTest.php
  class BuilderHelpersTest (line 12) | class BuilderHelpersTest extends \PHPUnit\Framework\TestCase {
    method testNormalizeNode (line 13) | public function testNormalizeNode(): void {
    method testNormalizeStmt (line 25) | public function testNormalizeStmt(): void {
    method testNormalizeStmtInvalidType (line 39) | public function testNormalizeStmtInvalidType(): void {
    method testNormalizeIdentifier (line 45) | public function testNormalizeIdentifier(): void {
    method testNormalizeIdentifierOrExpr (line 55) | public function testNormalizeIdentifierOrExpr(): void {
    method testNormalizeName (line 68) | public function testNormalizeName(): void {
    method testNormalizeNameInvalidType (line 86) | public function testNormalizeNameInvalidType(): void {
    method testNormalizeNameOrExpr (line 92) | public function testNormalizeNameOrExpr(): void {
    method testNormalizeNameOrExpInvalidType (line 113) | public function testNormalizeNameOrExpInvalidType(): void {
    method testNormalizeType (line 119) | public function testNormalizeType(): void {
    method testNormalizeTypeNullableVoid (line 160) | public function testNormalizeTypeNullableVoid(): void {
    method testNormalizeTypeNullableMixed (line 166) | public function testNormalizeTypeNullableMixed(): void {
    method testNormalizeTypeNullableNever (line 172) | public function testNormalizeTypeNullableNever(): void {
    method testNormalizeValue (line 178) | public function testNormalizeValue(): void {
    method testNormalizeDocComment (line 204) | public function testNormalizeDocComment(): void {
    method testNormalizeAttribute (line 215) | public function testNormalizeAttribute(): void {
    method testNormalizeValueEnum (line 227) | public function testNormalizeValueEnum() {

FILE: test/PhpParser/CodeParsingTest.php
  class CodeParsingTest (line 8) | class CodeParsingTest extends CodeTestAbstract {
    method testParse (line 12) | public function testParse($name, $code, $expected, $modeLine): void {
    method createParser (line 21) | public function createParser(?string $version): Parser {
    method getParseOutput (line 29) | public function getParseOutput(Parser $parser, $code, array $modes) {
    method provideTestParse (line 53) | public static function provideTestParse() {
    method formatErrorMessage (line 57) | private function formatErrorMessage(Error $e, $code) {
    method checkAttributes (line 65) | private function checkAttributes($stmts): void {

FILE: test/PhpParser/CodeTestAbstract.php
  class CodeTestAbstract (line 5) | abstract class CodeTestAbstract extends \PHPUnit\Framework\TestCase {
    method getTests (line 6) | protected static function getTests($directory, $fileExtension, $chunks...
    method parseModeLine (line 26) | public function parseModeLine(?string $modeLine): array {

FILE: test/PhpParser/CodeTestParser.php
  class CodeTestParser (line 5) | class CodeTestParser {
    method parseTest (line 6) | public function parseTest($code, $chunksPerTest) {
    method reconstructTest (line 36) | public function reconstructTest($name, array $tests) {
    method extractMode (line 53) | private function extractMode(string $expected): array {

FILE: test/PhpParser/CommentTest.php
  class CommentTest (line 5) | class CommentTest extends \PHPUnit\Framework\TestCase {
    method testGetters (line 6) | public function testGetters(): void {
    method testReformatting (line 23) | public function testReformatting($commentText, $reformattedText): void {
    method provideTestReformatting (line 28) | public static function provideTestReformatting() {

FILE: test/PhpParser/CompatibilityTest.php
  class CompatibilityTest (line 11) | class CompatibilityTest extends \PHPUnit\Framework\TestCase {
    method testAliases1 (line 16) | public function testAliases1(): void {
    method testAliases2 (line 44) | public function testAliases2(): void {

FILE: test/PhpParser/ConstExprEvaluatorTest.php
  class ConstExprEvaluatorTest (line 8) | class ConstExprEvaluatorTest extends \PHPUnit\Framework\TestCase {
    method testEvaluate (line 10) | public function testEvaluate($exprString, $expected): void {
    method provideTestEvaluate (line 17) | public static function provideTestEvaluate() {
    method testEvaluateFails (line 78) | public function testEvaluateFails(): void {
    method testEvaluateFallback (line 85) | public function testEvaluateFallback(): void {
    method testEvaluateSilently (line 102) | public function testEvaluateSilently($expr, $exception, $msg): void {
    method provideTestEvaluateSilently (line 119) | public static function provideTestEvaluateSilently() {

FILE: test/PhpParser/ErrorHandler/CollectingTest.php
  class CollectingTest (line 7) | class CollectingTest extends \PHPUnit\Framework\TestCase {
    method testHandleError (line 8) | public function testHandleError(): void {

FILE: test/PhpParser/ErrorHandler/ThrowingTest.php
  class ThrowingTest (line 7) | class ThrowingTest extends \PHPUnit\Framework\TestCase {
    method testHandleError (line 8) | public function testHandleError(): void {

FILE: test/PhpParser/ErrorTest.php
  class ErrorTest (line 5) | class ErrorTest extends \PHPUnit\Framework\TestCase {
    method testConstruct (line 6) | public function testConstruct() {
    method testSetMessageAndLine (line 25) | public function testSetMessageAndLine(Error $error): void {
    method testUnknownLine (line 34) | public function testUnknownLine(): void {
    method testColumnInfo (line 43) | public function testColumnInfo($code, $startPos, $endPos, $startColumn...
    method provideTestColumnInfo (line 54) | public static function provideTestColumnInfo() {
    method testNoColumnInfo (line 75) | public function testNoColumnInfo(): void {
    method testInvalidPosInfo (line 93) | public function testInvalidPosInfo(): void {

FILE: test/PhpParser/Internal/DifferTest.php
  class DifferTest (line 5) | class DifferTest extends \PHPUnit\Framework\TestCase {
    method formatDiffString (line 6) | private function formatDiffString(array $diff) {
    method testDiff (line 31) | public function testDiff($oldStr, $newStr, $expectedDiffStr): void {
    method provideTestDiff (line 39) | public static function provideTestDiff() {
    method testDiffWithReplacements (line 52) | public function testDiffWithReplacements($oldStr, $newStr, $expectedDi...
    method provideTestDiffWithReplacements (line 60) | public static function provideTestDiffWithReplacements() {
    method testNonContiguousIndices (line 69) | public function testNonContiguousIndices(): void {

FILE: test/PhpParser/JsonDecoderTest.php
  class JsonDecoderTest (line 5) | class JsonDecoderTest extends \PHPUnit\Framework\TestCase {
    method testRoundTrip (line 6) | public function testRoundTrip(): void {
    method testDecodingError (line 26) | public function testDecodingError($json, $expectedMessage): void {
    method provideTestDecodingError (line 33) | public static function provideTestDecodingError() {

FILE: test/PhpParser/Lexer/EmulativeTest.php
  class EmulativeTest (line 14) | class EmulativeTest extends LexerTest {
    method getLexer (line 15) | protected function getLexer() {
    method testReplaceKeywords (line 22) | public function testReplaceKeywords(string $keyword, int $expectedToke...
    method testReplaceKeywordsUppercase (line 35) | public function testReplaceKeywordsUppercase(string $keyword, int $exp...
    method testNoReplaceKeywordsAfterObjectOperator (line 49) | public function testNoReplaceKeywordsAfterObjectOperator(string $keywo...
    method testNoReplaceKeywordsAfterObjectOperatorWithSpaces (line 64) | public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(str...
    method testNoReplaceKeywordsAfterNullsafeObjectOperator (line 80) | public function testNoReplaceKeywordsAfterNullsafeObjectOperator(strin...
    method provideTestReplaceKeywords (line 92) | public static function provideTestReplaceKeywords() {
    method assertSameTokens (line 121) | private function assertSameTokens(array $expectedTokens, array $tokens...
    method testLexNewFeatures (line 135) | public function testLexNewFeatures(string $code, array $expectedTokens...
    method testLeaveStuffAloneInStrings (line 143) | public function testLeaveStuffAloneInStrings(string $code): void {
    method testErrorAfterEmulation (line 159) | public function testErrorAfterEmulation($code): void {
    method provideTestLexNewFeatures (line 179) | public static function provideTestLexNewFeatures() {
    method testTargetVersion (line 454) | public function testTargetVersion(string $phpVersion, string $code, ar...
    method provideTestTargetVersion (line 459) | public static function provideTestTargetVersion() {

FILE: test/PhpParser/LexerTest.php
  class LexerTest (line 7) | class LexerTest extends \PHPUnit\Framework\TestCase {
    method getLexer (line 9) | protected function getLexer() {
    method testError (line 16) | public function testError($code, $messages): void {
    method provideTestError (line 32) | public static function provideTestError() {
    method testDefaultErrorHandler (line 48) | public function testDefaultErrorHandler(): void {
    method testLex (line 58) | public function testLex($code, $expectedTokens): void {
    method provideTestLex (line 73) | public static function provideTestLex() {
    method testGetTokens (line 100) | public function testGetTokens(): void {

FILE: test/PhpParser/ModifiersTest.php
  class ModifiersTest (line 8) | class ModifiersTest extends TestCase {
    method testToString (line 9) | public function testToString() {
    method testToStringInvalid (line 13) | public function testToStringInvalid() {

FILE: test/PhpParser/NameContextTest.php
  class NameContextTest (line 8) | class NameContextTest extends \PHPUnit\Framework\TestCase {
    method testGetPossibleNames (line 12) | public function testGetPossibleNames($type, $name, $expectedPossibleNa...
    method provideTestGetPossibleNames (line 35) | public static function provideTestGetPossibleNames() {

FILE: test/PhpParser/Node/Expr/CallableLikeTest.php
  class CallableLikeTest (line 11) | class CallableLikeTest extends \PHPUnit\Framework\TestCase {
    method testIsFirstClassCallable (line 15) | public function testIsFirstClassCallable(CallLike $node, bool $isFirst...
    method testGetArg (line 25) | public function testGetArg(CallLike $node, ?Arg $expected): void {
    method provideTestIsFirstClassCallable (line 29) | public static function provideTestIsFirstClassCallable() {
    method provideTestGetArg (line 47) | public static function provideTestGetArg() {

FILE: test/PhpParser/Node/IdentifierTest.php
  class IdentifierTest (line 5) | class IdentifierTest extends \PHPUnit\Framework\TestCase {
    method testConstructorThrows (line 6) | public function testConstructorThrows(): void {
    method testToString (line 11) | public function testToString(): void {
    method testIsSpecialClassName (line 20) | public function testIsSpecialClassName($identifier, $expected): void {
    method provideTestIsSpecialClassName (line 25) | public static function provideTestIsSpecialClassName() {

FILE: test/PhpParser/Node/NameTest.php
  class NameTest (line 5) | class NameTest extends \PHPUnit\Framework\TestCase {
    method testConstruct (line 6) | public function testConstruct(): void {
    method testGet (line 17) | public function testGet(): void {
    method testToString (line 29) | public function testToString(): void {
    method testSlice (line 37) | public function testSlice(): void {
    method testSliceOffsetTooLarge (line 53) | public function testSliceOffsetTooLarge(): void {
    method testSliceOffsetTooSmall (line 59) | public function testSliceOffsetTooSmall(): void {
    method testSliceLengthTooLarge (line 65) | public function testSliceLengthTooLarge(): void {
    method testSliceLengthTooSmall (line 71) | public function testSliceLengthTooSmall(): void {
    method testSliceLengthTooLargeWithOffset (line 77) | public function testSliceLengthTooLargeWithOffset(): void {
    method testConcat (line 83) | public function testConcat(): void {
    method testNameTypes (line 101) | public function testNameTypes(): void {
    method testInvalidArg (line 131) | public function testInvalidArg(): void {
    method testInvalidEmptyString (line 137) | public function testInvalidEmptyString(): void {
    method testInvalidEmptyArray (line 143) | public function testInvalidEmptyArray(): void {
    method testIsSpecialClassName (line 150) | public function testIsSpecialClassName($name, $expected): void {
    method provideTestIsSpecialClassName (line 155) | public static function provideTestIsSpecialClassName() {

FILE: test/PhpParser/Node/ParamTest.php
  class ParamTest (line 8) | class ParamTest extends \PHPUnit\Framework\TestCase {
    method testNoModifiers (line 9) | public function testNoModifiers(): void {
    method testModifiers (line 25) | public function testModifiers(string $modifier): void {
    method provideModifiers (line 32) | public static function provideModifiers() {
    method testSetVisibility (line 42) | public function testSetVisibility() {
    method testPromotedPropertyWithoutVisibilityModifier (line 55) | public function testPromotedPropertyWithoutVisibilityModifier(): void {
    method testNonPromotedPropertyIsNotPublic (line 64) | public function testNonPromotedPropertyIsNotPublic(): void {

FILE: test/PhpParser/Node/PropertyHookTest.php
  class PropertyHookTest (line 15) | class PropertyHookTest extends \PHPUnit\Framework\TestCase {
    method testModifiers (line 19) | public function testModifiers($modifier): void {
    method testNoModifiers (line 31) | public function testNoModifiers(): void {
    method provideModifiers (line 37) | public static function provideModifiers() {
    method testGetStmts (line 43) | public function testGetStmts(): void {
    method testGetStmtsSetHookFromParser (line 54) | public function testGetStmtsSetHookFromParser(): void {
    method testGetStmtsUnknownHook (line 73) | public function testGetStmtsUnknownHook(): void {
    method testGetStmtsSetHookWithoutPropertyName (line 82) | public function testGetStmtsSetHookWithoutPropertyName(): void {

FILE: test/PhpParser/Node/Scalar/DNumberTest.php
  class DNumberTest (line 9) | class DNumberTest extends \PHPUnit\Framework\TestCase {
    method testRawValue (line 10) | public function testRawValue(): void {

FILE: test/PhpParser/Node/Scalar/MagicConstTest.php
  class MagicConstTest (line 5) | class MagicConstTest extends \PHPUnit\Framework\TestCase {
    method testGetName (line 9) | public function testGetName(MagicConst $magicConst, $name): void {
    method provideTestGetName (line 13) | public static function provideTestGetName() {

FILE: test/PhpParser/Node/Scalar/NumberTest.php
  class NumberTest (line 8) | class NumberTest extends \PHPUnit\Framework\TestCase {
    method testRawValue (line 9) | public function testRawValue(): void {

FILE: test/PhpParser/Node/Scalar/StringTest.php
  class StringTest (line 8) | class StringTest extends \PHPUnit\Framework\TestCase {
    method testRawValue (line 9) | public function testRawValue(): void {
    method testParseEscapeSequences (line 28) | public function testParseEscapeSequences($expected, $string, $quote): ...
    method testCreate (line 38) | public function testCreate($expected, $string): void {
    method provideTestParseEscapeSequences (line 45) | public static function provideTestParseEscapeSequences() {
    method provideTestParse (line 60) | public static function provideTestParse() {

FILE: test/PhpParser/Node/Stmt/ClassConstTest.php
  class ClassConstTest (line 7) | class ClassConstTest extends \PHPUnit\Framework\TestCase {
    method testModifiers (line 11) | public function testModifiers($modifier): void {
    method testNoModifiers (line 20) | public function testNoModifiers(): void {
    method provideModifiers (line 29) | public static function provideModifiers() {

FILE: test/PhpParser/Node/Stmt/ClassMethodTest.php
  class ClassMethodTest (line 10) | class ClassMethodTest extends \PHPUnit\Framework\TestCase {
    method testModifiers (line 14) | public function testModifiers($modifier): void {
    method testNoModifiers (line 22) | public function testNoModifiers(): void {
    method provideModifiers (line 34) | public static function provideModifiers() {
    method testImplicitPublic (line 52) | public function testImplicitPublic(string $modifier): void {
    method implicitPublicModifiers (line 60) | public static function implicitPublicModifiers() {
    method testMagic (line 73) | public function testMagic(string $name): void {
    method provideMagics (line 78) | public static function provideMagics() {
    method testFunctionLike (line 98) | public function testFunctionLike(): void {

FILE: test/PhpParser/Node/Stmt/ClassTest.php
  class ClassTest (line 9) | class ClassTest extends \PHPUnit\Framework\TestCase {
    method testIsAbstract (line 10) | public function testIsAbstract(): void {
    method testIsFinal (line 18) | public function testIsFinal(): void {
    method testGetTraitUses (line 26) | public function testGetTraitUses(): void {
    method testGetMethods (line 42) | public function testGetMethods(): void {
    method testGetConstants (line 62) | public function testGetConstants(): void {
    method testGetProperties (line 79) | public function testGetProperties(): void {
    method testGetProperty (line 97) | public function testGetProperty(): void {
    method testGetMethod (line 122) | public function testGetMethod(): void {

FILE: test/PhpParser/Node/Stmt/InterfaceTest.php
  class InterfaceTest (line 8) | class InterfaceTest extends \PHPUnit\Framework\TestCase {
    method testGetMethods (line 9) | public function testGetMethods(): void {
    method testGetConstants (line 27) | public function testGetConstants(): void {

FILE: test/PhpParser/Node/Stmt/PropertyTest.php
  class PropertyTest (line 7) | class PropertyTest extends \PHPUnit\Framework\TestCase {
    method testModifiers (line 11) | public function testModifiers($modifier): void {
    method testNoModifiers (line 20) | public function testNoModifiers(): void {
    method testStaticImplicitlyPublic (line 33) | public function testStaticImplicitlyPublic(): void {
    method provideModifiers (line 42) | public static function provideModifiers() {
    method testSetVisibility (line 52) | public function testSetVisibility() {
    method testIsFinal (line 61) | public function testIsFinal() {
    method testIsAbstract (line 66) | public function testIsAbstract() {

FILE: test/PhpParser/NodeAbstractTest.php
  class DummyNode (line 5) | class DummyNode extends NodeAbstract {
    method __construct (line 10) | public function __construct($subNode1, $subNode2, $notSubNode, $attrib...
    method getSubNodeNames (line 17) | public function getSubNodeNames(): array {
    method getType (line 22) | public function getType(): string {
  class NodeAbstractTest (line 27) | class NodeAbstractTest extends \PHPUnit\Framework\TestCase {
    method provideNodes (line 28) | public static function provideNodes() {
    method testConstruct (line 53) | public function testConstruct(array $attributes, Node $node) {
    method testGetDocComment (line 78) | public function testGetDocComment(array $attributes, Node $node): void {
    method testSetDocComment (line 91) | public function testSetDocComment(): void {
    method testChange (line 122) | public function testChange(array $attributes, DummyNode $node): void {
    method testIteration (line 140) | public function testIteration(array $attributes, Node $node): void {
    method testAttributes (line 162) | public function testAttributes(): void {
    method testJsonSerialization (line 204) | public function testJsonSerialization(): void {

FILE: test/PhpParser/NodeDumperTest.php
  class NodeDumperTest (line 5) | class NodeDumperTest extends \PHPUnit\Framework\TestCase {
    method canonicalize (line 6) | private function canonicalize($string) {
    method testDump (line 13) | public function testDump($node, $dump): void {
    method provideTestDump (line 19) | public static function provideTestDump() {
    method testDumpWithPositions (line 60) | public function testDumpWithPositions(): void {
    method testError (line 93) | public function testError(): void {

FILE: test/PhpParser/NodeFinderTest.php
  class NodeFinderTest (line 7) | class NodeFinderTest extends \PHPUnit\Framework\TestCase {
    method getStmtsAndVars (line 8) | private function getStmtsAndVars() {
    method testFind (line 17) | public function testFind(): void {
    method testFindInstanceOf (line 32) | public function testFindInstanceOf(): void {
    method testFindFirst (line 40) | public function testFindFirst(): void {
    method testFindFirstInstanceOf (line 55) | public function testFindFirstInstanceOf(): void {

FILE: test/PhpParser/NodeTraverserTest.php
  class NodeTraverserTest (line 11) | class NodeTraverserTest extends \PHPUnit\Framework\TestCase {
    method testNonModifying (line 12) | public function testNonModifying(): void {
    method testModifying (line 35) | public function testModifying(): void {
    method testRemoveFromLeave (line 78) | public function testRemoveFromLeave(): void {
    method testRemoveFromEnter (line 102) | public function testRemoveFromEnter(): void {
    method testReturnArrayFromEnter (line 125) | public function testReturnArrayFromEnter(): void {
    method testMerge (line 150) | public function testMerge(): void {
    method testInvalidDeepArray (line 170) | public function testInvalidDeepArray(): void {
    method testDontTraverseChildren (line 180) | public function testDontTraverseChildren(): void {
    method testDontTraverseCurrentAndChildren (line 215) | public function testDontTraverseCurrentAndChildren(): void {
    method testStopTraversal (line 257) | public function testStopTraversal(): void {
    method testReplaceWithNull (line 346) | public function testReplaceWithNull(): void {
    method testRemovingVisitor (line 384) | public function testRemovingVisitor(): void {
    method testNoCloneNodes (line 407) | public function testNoCloneNodes(): void {
    method testInvalidReturn (line 418) | public function testInvalidReturn($stmts, $visitor, $message): void {
    method provideTestInvalidReturn (line 427) | public static function provideTestInvalidReturn() {

FILE: test/PhpParser/NodeVisitor/FindingVisitorTest.php
  class FindingVisitorTest (line 9) | class FindingVisitorTest extends \PHPUnit\Framework\TestCase {
    method testFindVariables (line 10) | public function testFindVariables(): void {
    method testFindAll (line 30) | public function testFindAll(): void {

FILE: test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php
  class FirstFindingVisitorTest (line 9) | class FirstFindingVisitorTest extends \PHPUnit\Framework\TestCase {
    method testFindFirstVariable (line 10) | public function testFindFirstVariable(): void {
    method testFindNone (line 24) | public function testFindNone(): void {

FILE: test/PhpParser/NodeVisitor/NameResolverTest.php
  class NameResolverTest (line 11) | class NameResolverTest extends \PHPUnit\Framework\TestCase {
    method canonicalize (line 12) | private function canonicalize($string) {
    method testResolveNames (line 19) | public function testResolveNames(): void {
    method testResolveLocations (line 179) | public function testResolveLocations(): void {
    method testNoResolveSpecialName (line 369) | public function testNoResolveSpecialName(): void {
    method testAddDeclarationNamespacedName (line 378) | public function testAddDeclarationNamespacedName(): void {
    method testAddRuntimeResolvedNamespacedName (line 413) | public function testAddRuntimeResolvedNamespacedName(): void {
    method testError (line 439) | public function testError(Node $stmt, $errorMsg): void {
    method provideTestError (line 448) | public static function provideTestError() {
    method testClassNameIsCaseInsensitive (line 490) | public function testClassNameIsCaseInsensitive(): void {
    method testSpecialClassNamesAreCaseInsensitive (line 511) | public function testSpecialClassNamesAreCaseInsensitive(): void {
    method testAddOriginalNames (line 542) | public function testAddOriginalNames(): void {
    method testAttributeOnlyMode (line 561) | public function testAttributeOnlyMode(): void {
    method parseAndResolve (line 583) | private function parseAndResolve(string $code): array {

FILE: test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php
  class NodeConnectingVisitorTest (line 12) | final class NodeConnectingVisitorTest extends \PHPUnit\Framework\TestCase {
    method testConnectsNodeToItsParentNodeAndItsSiblingNodes (line 13) | public function testConnectsNodeToItsParentNodeAndItsSiblingNodes(): v...
    method testWeakReferences (line 34) | public function testWeakReferences(): void {

FILE: test/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php
  class ParentConnectingVisitorTest (line 10) | final class ParentConnectingVisitorTest extends \PHPUnit\Framework\TestC...
    method testConnectsChildNodeToParentNode (line 11) | public function testConnectsChildNodeToParentNode(): void {
    method testWeakReferences (line 27) | public function testWeakReferences(): void {

FILE: test/PhpParser/NodeVisitorForTesting.php
  class NodeVisitorForTesting (line 5) | class NodeVisitorForTesting implements NodeVisitor {
    method __construct (line 10) | public function __construct(array $returns = []) {
    method beforeTraverse (line 15) | public function beforeTraverse(array $nodes): ?array {
    method enterNode (line 19) | public function enterNode(Node $node) {
    method leaveNode (line 23) | public function leaveNode(Node $node) {
    method afterTraverse (line 27) | public function afterTraverse(array $nodes): ?array {
    method traceEvent (line 31) | private function traceEvent(string $method, $param) {
    method __destruct (line 43) | public function __destruct() {

FILE: test/PhpParser/Parser/Php7Test.php
  class Php7Test (line 8) | class Php7Test extends ParserTestAbstract
    method getParser (line 10) | protected function getParser(Lexer $lexer) {

FILE: test/PhpParser/Parser/Php8Test.php
  class Php8Test (line 8) | class Php8Test extends ParserTestAbstract
    method getParser (line 10) | protected function getParser(Lexer $lexer) {

FILE: test/PhpParser/ParserFactoryTest.php
  class ParserFactoryTest (line 11) | class ParserFactoryTest extends \PHPUnit\Framework\TestCase {
    method testCreate (line 12) | public function testCreate(): void {

FILE: test/PhpParser/ParserTestAbstract.php
  class ParserTestAbstract (line 10) | abstract class ParserTestAbstract extends \PHPUnit\Framework\TestCase {
    method getParser (line 12) | abstract protected function getParser(Lexer $lexer);
    method testParserThrowsSyntaxError (line 14) | public function testParserThrowsSyntaxError(): void {
    method testParserThrowsSpecialError (line 21) | public function testParserThrowsSpecialError(): void {
    method testParserThrowsLexerError (line 28) | public function testParserThrowsLexerError(): void {
    method testAttributeAssignment (line 35) | public function testAttributeAssignment(): void {
    method testInvalidToken (line 110) | public function testInvalidToken(): void {
    method testExtraAttributes (line 121) | public function testExtraAttributes($code, $expectedAttributes): void {
    method provideTestExtraAttributes (line 131) | public static function provideTestExtraAttributes() {
    method testListKindAttribute (line 183) | public function testListKindAttribute(): void {
    method testGetTokens (line 192) | public function testGetTokens(): void {
  class InvalidTokenLexer (line 207) | class InvalidTokenLexer extends Lexer {
    method tokenize (line 208) | public function tokenize(string $code, ?ErrorHandler $errorHandler = n...

FILE: test/PhpParser/PhpVersionTest.php
  class PhpVersionTest (line 5) | class PhpVersionTest extends \PHPUnit\Framework\TestCase {
    method testConstruction (line 6) | public function testConstruction(): void {
    method testInvalidVersion (line 20) | public function testInvalidVersion(): void {
    method testEquals (line 26) | public function testEquals(): void {

FILE: test/PhpParser/PrettyPrinterTest.php
  class PrettyPrinterTest (line 15) | class PrettyPrinterTest extends CodeTestAbstract {
    method createParserAndPrinter (line 17) | private function createParserAndPrinter(array $options): array {
    method doTestPrettyPrintMethod (line 31) | protected function doTestPrettyPrintMethod($method, $name, $code, $exp...
    method testPrettyPrint (line 40) | public function testPrettyPrint($name, $code, $expected, $mode): void {
    method testPrettyPrintFile (line 47) | public function testPrettyPrintFile($name, $code, $expected, $mode): v...
    method provideTestPrettyPrint (line 51) | public static function provideTestPrettyPrint() {
    method provideTestPrettyPrintFile (line 55) | public static function provideTestPrettyPrintFile() {
    method testPrettyPrintExpr (line 59) | public function testPrettyPrintExpr(): void {
    method testCommentBeforeInlineHTML (line 73) | public function testCommentBeforeInlineHTML(): void {
    method testArraySyntaxDefault (line 81) | public function testArraySyntaxDefault(): void {
    method testKindAttributes (line 93) | public function testKindAttributes($node, $expected): void {
    method provideTestKindAttributes (line 99) | public static function provideTestKindAttributes() {
    method testUnnaturalLiterals (line 149) | public function testUnnaturalLiterals($node, $expected): void {
    method provideTestUnnaturalLiterals (line 155) | public static function provideTestUnnaturalLiterals() {
    method printCustomRawValue (line 169) | public function printCustomRawValue($node, $expected): void {
    method provideTestCustomRawValue (line 175) | public static function provideTestCustomRawValue() {
    method testPrettyPrintWithError (line 190) | public function testPrettyPrintWithError(): void {
    method testPrettyPrintWithErrorInClassConstFetch (line 200) | public function testPrettyPrintWithErrorInClassConstFetch(): void {
    method testFormatPreservingPrint (line 213) | public function testFormatPreservingPrint($name, $code, $modification,...
    method provideTestFormatPreservingPrint (line 239) | public static function provideTestFormatPreservingPrint() {
    method testRoundTripPrint (line 246) | public function testRoundTripPrint($name, $code, $expected, $modeLine)...
    method provideTestRoundTripPrint (line 270) | public static function provideTestRoundTripPrint() {
    method testWindowsNewline (line 277) | public function testWindowsNewline(): void {
    method testInvalidNewline (line 319) | public function testInvalidNewline(): void {
    method testInvalidIndent (line 325) | public function testInvalidIndent(): void {

FILE: test/PhpParser/TokenTest.php
  class TokenTest (line 5) | class TokenTest extends \PHPUnit\Framework\TestCase {
    method testGetTokenName (line 6) | public function testGetTokenName(): void {
    method testIs (line 13) | public function testIs(): void {
    method testIsIgnorable (line 26) | public function testIsIgnorable(int $id, string $text, bool $isIgnorab...
    method provideTestIsIgnorable (line 31) | public static function provideTestIsIgnorable() {
    method testToString (line 41) | public function testToString(): void {

FILE: test/bootstrap.php
  function canonicalize (line 7) | function canonicalize($str) {
  function filesInDir (line 22) | function filesInDir($directory, $fileExtension) {

FILE: test_old/run.php
  function showHelp (line 10) | function showHelp($error) {

FILE: tools/fuzzing/target.php
  method setTokens (line 43) | public function setTokens(array $tokens): void {
  method beforeTraverse (line 47) | public function beforeTraverse(array $nodes): void {
  method leaveNode (line 51) | public function leaveNode(PhpParser\Node $node) {
Condensed preview — 664 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,281K chars).
[
  {
    "path": ".editorconfig",
    "chars": 149,
    "preview": "root = true\n\n[*.y]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\ntrim_trailing_whitespace = true\nindent_s"
  },
  {
    "path": ".gitattributes",
    "chars": 544,
    "preview": "/.github         export-ignore\n/doc             export-ignore\n/grammar         export-ignore\n/test            export-ign"
  },
  {
    "path": ".github/workflows/main.yml",
    "chars": 3850,
    "preview": "# https://help.github.com/en/categories/automating-your-workflow-with-github-actions\nname: Main\non:\n  push:\n  pull_reque"
  },
  {
    "path": ".gitignore",
    "chars": 107,
    "preview": ".idea/\nvendor/\ncomposer.lock\ngrammar/kmyacc.exe\ngrammar/y.output\n.phpunit.result.cache\n.php-cs-fixer.cache\n"
  },
  {
    "path": ".php-cs-fixer.dist.php",
    "chars": 1008,
    "preview": "<?php\n\n$finder = PhpCsFixer\\Finder::create()\n    ->exclude('PhpParser/Parser')\n    ->in(__DIR__ . '/lib')\n    ->in(__DIR"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 51983,
    "preview": "Version 5.7.0 (2025-12-06)\n--------------------------\n\n### Fixed\n\n* Fixed changing modifier on anonymous class with form"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 1561,
    "preview": "## Coding Style\n\nThis project uses PSR-12 with consistent brace placement. This means that the opening brace is\nalways o"
  },
  {
    "path": "LICENSE",
    "chars": 1520,
    "preview": "BSD 3-Clause License\n\nCopyright (c) 2011, Nikita Popov\nAll rights reserved.\n\nRedistribution and use in source and binary"
  },
  {
    "path": "Makefile",
    "chars": 222,
    "preview": ".PHONY: phpstan php-cs-fixer\n\ntools/vendor:\n\tcomposer install -d tools\n\nphpstan: tools/vendor\n\tphp tools/vendor/bin/phps"
  },
  {
    "path": "README.md",
    "chars": 6304,
    "preview": "PHP Parser\n==========\n\n[![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)]("
  },
  {
    "path": "UPGRADE-1.0.md",
    "chars": 4761,
    "preview": "Upgrading from PHP-Parser 0.9 to 1.0\n====================================\n\n### PHP version requirements\n\nPHP-Parser now "
  },
  {
    "path": "UPGRADE-2.0.md",
    "chars": 2896,
    "preview": "Upgrading from PHP-Parser 1.x to 2.0\n====================================\n\n### PHP version requirements\n\nPHP-Parser now "
  },
  {
    "path": "UPGRADE-3.0.md",
    "chars": 7284,
    "preview": "Upgrading from PHP-Parser 2.x to 3.0\n====================================\n\nThe backwards-incompatible changes in this re"
  },
  {
    "path": "UPGRADE-4.0.md",
    "chars": 3953,
    "preview": "Upgrading from PHP-Parser 3.x to 4.0\n====================================\n\n### PHP version requirements\n\nPHP-Parser now "
  },
  {
    "path": "UPGRADE-5.0.md",
    "chars": 19788,
    "preview": "Upgrading from PHP-Parser 4.x to 5.0\n====================================\n\n### PHP version requirements\n\nPHP-Parser now "
  },
  {
    "path": "bin/php-parse",
    "chars": 6549,
    "preview": "#!/usr/bin/env php\n<?php\n\nforeach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {"
  },
  {
    "path": "composer.json",
    "chars": 843,
    "preview": "{\n    \"name\": \"nikic/php-parser\",\n    \"type\": \"library\",\n    \"description\": \"A PHP parser written in PHP\",\n    \"keywords"
  },
  {
    "path": "doc/0_Introduction.markdown",
    "chars": 4599,
    "preview": "Introduction\n============\n\nThis project is a PHP parser **written in PHP itself**.\n\nWhat is this for?\n-----------------\n"
  },
  {
    "path": "doc/2_Usage_of_basic_components.markdown",
    "chars": 19061,
    "preview": "Usage of basic components\n=========================\n\nThis document explains how to use the parser, the pretty printer an"
  },
  {
    "path": "doc/README.md",
    "chars": 1603,
    "preview": "Table of Contents\n=================\n\nGuide\n-----\n\n  1. [Introduction](0_Introduction.markdown)\n  2. [Usage of basic comp"
  },
  {
    "path": "doc/component/AST_builders.markdown",
    "chars": 5552,
    "preview": "AST builders\n============\n\nWhen PHP-Parser is used to generate (or modify) code by first creating an Abstract Syntax Tre"
  },
  {
    "path": "doc/component/Constant_expression_evaluation.markdown",
    "chars": 3450,
    "preview": "Constant expression evaluation\n==============================\n\nInitializers for constants, properties, parameters, etc. "
  },
  {
    "path": "doc/component/Error_handling.markdown",
    "chars": 2299,
    "preview": "Error handling\n==============\n\nErrors during parsing or analysis are represented using the `PhpParser\\Error` exception c"
  },
  {
    "path": "doc/component/FAQ.markdown",
    "chars": 2599,
    "preview": "Frequently Asked Questions\n==========================\n\n * [How can the parent of a node be obtained?](#how-can-the-paren"
  },
  {
    "path": "doc/component/JSON_representation.markdown",
    "chars": 3758,
    "preview": "JSON representation\n===================\n\nNodes (and comments) implement the `JsonSerializable` interface. As such, it is"
  },
  {
    "path": "doc/component/Lexer.markdown",
    "chars": 6330,
    "preview": "Lexer component documentation\n=============================\n\nThe lexer is responsible for providing tokens to the parser"
  },
  {
    "path": "doc/component/Name_resolution.markdown",
    "chars": 4154,
    "preview": "Name resolution\n===============\n\nSince the introduction of namespaces in PHP 5.3, literal names in PHP code are subject "
  },
  {
    "path": "doc/component/Performance.markdown",
    "chars": 2147,
    "preview": "Performance\n===========\n\nParsing is computationally expensive task, to which the PHP language is not very well suited.\nN"
  },
  {
    "path": "doc/component/Pretty_printing.markdown",
    "chars": 6120,
    "preview": "Pretty printing\n===============\n\nPretty printing is the process of converting a syntax tree back to PHP code. In its bas"
  },
  {
    "path": "doc/component/Walking_the_AST.markdown",
    "chars": 12696,
    "preview": "Walking the AST\n===============\n\nThe most common way to work with the AST is by using a node traverser and one or more n"
  },
  {
    "path": "grammar/README.md",
    "chars": 1194,
    "preview": "What do all those files mean?\n=============================\n\n * `php.y`:              PHP 5-8 grammar written in a pseud"
  },
  {
    "path": "grammar/parser.template",
    "chars": 2441,
    "preview": "<?php declare(strict_types=1);\n$meta #\n#semval($) $self->semValue\n#semval($,%t) $self->semValue\n#semval(%n) $stackPos-(%"
  },
  {
    "path": "grammar/php.y",
    "chars": 61848,
    "preview": "%pure_parser\n%expect 2\n\n%right T_VOID_CAST\n%right T_THROW\n%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE"
  },
  {
    "path": "grammar/phpyLang.php",
    "chars": 5303,
    "preview": "<?php declare(strict_types=1);\n\n///////////////////////////////\n/// Utility regex constants ///\n////////////////////////"
  },
  {
    "path": "grammar/rebuildParsers.php",
    "chars": 2217,
    "preview": "<?php declare(strict_types=1);\n\nrequire __DIR__ . '/phpyLang.php';\n\n$parserToDefines = [\n    'Php7' => ['PHP7' => true],"
  },
  {
    "path": "lib/PhpParser/Builder/ClassConst.php",
    "chars": 3875,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParse"
  },
  {
    "path": "lib/PhpParser/Builder/Class_.php",
    "chars": 4171,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParser"
  },
  {
    "path": "lib/PhpParser/Builder/Declaration.php",
    "chars": 1261,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\n\nabstract cla"
  },
  {
    "path": "lib/PhpParser/Builder/EnumCase.php",
    "chars": 2004,
    "preview": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParse"
  },
  {
    "path": "lib/PhpParser/Builder/Enum_.php",
    "chars": 3258,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParser"
  },
  {
    "path": "lib/PhpParser/Builder/FunctionLike.php",
    "chars": 1806,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser\\BuilderHelpers;\nuse PhpParser\\Node;\n\nabstrac"
  },
  {
    "path": "lib/PhpParser/Builder/Function_.php",
    "chars": 1691,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParser"
  },
  {
    "path": "lib/PhpParser/Builder/Interface_.php",
    "chars": 2628,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParser"
  },
  {
    "path": "lib/PhpParser/Builder/Method.php",
    "chars": 3756,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParser"
  },
  {
    "path": "lib/PhpParser/Builder/Namespace_.php",
    "chars": 1073,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParser"
  },
  {
    "path": "lib/PhpParser/Builder/Param.php",
    "chars": 4466,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParser"
  },
  {
    "path": "lib/PhpParser/Builder/Property.php",
    "chars": 5747,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParser"
  },
  {
    "path": "lib/PhpParser/Builder/TraitUse.php",
    "chars": 1654,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser\\Builder;\nuse PhpParser\\BuilderHelpers;\nuse P"
  },
  {
    "path": "lib/PhpParser/Builder/TraitUseAdaptation.php",
    "chars": 4266,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser\\Builder;\nuse PhpParser\\BuilderHelpers;\nuse P"
  },
  {
    "path": "lib/PhpParser/Builder/Trait_.php",
    "chars": 2356,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser;\nuse PhpParser\\BuilderHelpers;\nuse PhpParser"
  },
  {
    "path": "lib/PhpParser/Builder/Use_.php",
    "chars": 1277,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Builder;\n\nuse PhpParser\\Builder;\nuse PhpParser\\BuilderHelpers;\nuse P"
  },
  {
    "path": "lib/PhpParser/Builder.php",
    "chars": 202,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\ninterface Builder {\n    /**\n     * Returns the built node.\n     *\n"
  },
  {
    "path": "lib/PhpParser/BuilderFactory.php",
    "chars": 10549,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\nuse PhpParser\\Node\\Arg;\nuse PhpParser\\Node\\Expr;\nuse PhpParser\\Nod"
  },
  {
    "path": "lib/PhpParser/BuilderHelpers.php",
    "chars": 9962,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\nuse PhpParser\\Node\\ComplexType;\nuse PhpParser\\Node\\Expr;\nuse PhpPa"
  },
  {
    "path": "lib/PhpParser/Comment/Doc.php",
    "chars": 103,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Comment;\n\nclass Doc extends \\PhpParser\\Comment {\n}\n"
  },
  {
    "path": "lib/PhpParser/Comment.php",
    "chars": 6907,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\nclass Comment implements \\JsonSerializable {\n    protected string "
  },
  {
    "path": "lib/PhpParser/ConstExprEvaluationException.php",
    "chars": 112,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\nclass ConstExprEvaluationException extends \\Exception {\n}\n"
  },
  {
    "path": "lib/PhpParser/ConstExprEvaluator.php",
    "chars": 9551,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\nuse PhpParser\\Node\\Expr;\nuse PhpParser\\Node\\Scalar;\n\nuse function "
  },
  {
    "path": "lib/PhpParser/Error.php",
    "chars": 4952,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\nclass Error extends \\RuntimeException {\n    protected string $rawM"
  },
  {
    "path": "lib/PhpParser/ErrorHandler/Collecting.php",
    "chars": 869,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\ErrorHandler;\n\nuse PhpParser\\Error;\nuse PhpParser\\ErrorHandler;\n\n/**"
  },
  {
    "path": "lib/PhpParser/ErrorHandler/Throwing.php",
    "chars": 368,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\ErrorHandler;\n\nuse PhpParser\\Error;\nuse PhpParser\\ErrorHandler;\n\n/**"
  },
  {
    "path": "lib/PhpParser/ErrorHandler.php",
    "chars": 300,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\ninterface ErrorHandler {\n    /**\n     * Handle an error generated "
  },
  {
    "path": "lib/PhpParser/Internal/DiffElem.php",
    "chars": 763,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Internal;\n\n/**\n * @internal\n */\nclass DiffElem {\n    public const TY"
  },
  {
    "path": "lib/PhpParser/Internal/Differ.php",
    "chars": 5093,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Internal;\n\n/**\n * Implements the Myers diff algorithm.\n *\n * Myers, "
  },
  {
    "path": "lib/PhpParser/Internal/PrintableNewAnonClassNode.php",
    "chars": 2669,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Internal;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Expr;\n\n/**\n * This"
  },
  {
    "path": "lib/PhpParser/Internal/TokenPolyfill.php",
    "chars": 9632,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Internal;\n\nif (\\PHP_VERSION_ID >= 80000) {\n    class TokenPolyfill e"
  },
  {
    "path": "lib/PhpParser/Internal/TokenStream.php",
    "chars": 9239,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Internal;\n\nuse PhpParser\\Token;\n\n/**\n * Provides operations on token"
  },
  {
    "path": "lib/PhpParser/JsonDecoder.php",
    "chars": 3520,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\nclass JsonDecoder {\n    /** @var \\ReflectionClass<Node>[] Node typ"
  },
  {
    "path": "lib/PhpParser/Lexer/Emulative.php",
    "chars": 8612,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer;\n\nuse PhpParser\\Error;\nuse PhpParser\\ErrorHandler;\nuse PhpPars"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php",
    "chars": 3344,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\nuse PhpParser\\Token;"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php",
    "chars": 1473,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\nuse PhpParser\\Token;"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php",
    "chars": 701,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\n\nfinal class EnumTok"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php",
    "chars": 1569,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\nuse PhpParser\\Token;"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php",
    "chars": 458,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\n\n// Retained for rev"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php",
    "chars": 1835,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\Token;\n\nabstract class KeywordEm"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php",
    "chars": 422,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\n\nfinal class MatchTo"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php",
    "chars": 2282,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\nuse PhpParser\\Token;"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php",
    "chars": 1444,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\Lexer\\TokenEmulator\\TokenEmulato"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php",
    "chars": 437,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\n\nfinal class Propert"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php",
    "chars": 976,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\n\n/*\n * In PHP 8.1, \""
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php",
    "chars": 905,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\n\nfinal class Readonl"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php",
    "chars": 1013,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\n\n/**\n * Reverses emu"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php",
    "chars": 819,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\nuse PhpParser\\Token;"
  },
  {
    "path": "lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php",
    "chars": 3108,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Lexer\\TokenEmulator;\n\nuse PhpParser\\PhpVersion;\nuse PhpParser\\Token;"
  },
  {
    "path": "lib/PhpParser/Lexer.php",
    "chars": 4366,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\nrequire __DIR__ . '/compatibility_tokens.php';\n\nclass Lexer {\n    "
  },
  {
    "path": "lib/PhpParser/Modifiers.php",
    "chars": 2779,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\n/**\n * Modifiers used (as a bit mask) by various flags subnodes, f"
  },
  {
    "path": "lib/PhpParser/NameContext.php",
    "chars": 10053,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser;\n\nuse PhpParser\\Node\\Name;\nuse PhpParser\\Node\\Name\\FullyQualified;\nu"
  },
  {
    "path": "lib/PhpParser/Node/Arg.php",
    "chars": 1299,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\NodeAbstract;\n\nclass Arg extends NodeAbstract {"
  },
  {
    "path": "lib/PhpParser/Node/ArrayItem.php",
    "chars": 1212,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\NodeAbstract;\n\nclass ArrayItem extends NodeAbst"
  },
  {
    "path": "lib/PhpParser/Node/Attribute.php",
    "chars": 820,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\Node;\nuse PhpParser\\NodeAbstract;\n\nclass Attrib"
  },
  {
    "path": "lib/PhpParser/Node/AttributeGroup.php",
    "chars": 647,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\NodeAbstract;\n\nclass AttributeGroup extends Nod"
  },
  {
    "path": "lib/PhpParser/Node/ClosureUse.php",
    "chars": 973,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\NodeAbstract;\n\nclass ClosureUse extends NodeAbs"
  },
  {
    "path": "lib/PhpParser/Node/ComplexType.php",
    "chars": 323,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\NodeAbstract;\n\n/**\n * This is a base class for "
  },
  {
    "path": "lib/PhpParser/Node/Const_.php",
    "chars": 971,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\NodeAbstract;\n\nclass Const_ extends NodeAbstrac"
  },
  {
    "path": "lib/PhpParser/Node/DeclareItem.php",
    "chars": 992,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\Node;\nuse PhpParser\\NodeAbstract;\n\nclass Declar"
  },
  {
    "path": "lib/PhpParser/Node/Expr/ArrayDimFetch.php",
    "chars": 822,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass ArrayDimFetch extends Ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/ArrayItem.php",
    "chars": 305,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nrequire __DIR__ . '/../ArrayItem.php';\n\nif (false) {\n   "
  },
  {
    "path": "lib/PhpParser/Node/Expr/Array_.php",
    "chars": 831,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\ArrayItem;\nuse PhpParser\\Node\\Expr;\n\n"
  },
  {
    "path": "lib/PhpParser/Node/Expr/ArrowFunction.php",
    "chars": 2552,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Expr;\nuse PhpPars"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Assign.php",
    "chars": 774,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Assign extends Expr {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php",
    "chars": 235,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Bitwis"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php",
    "chars": 233,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Bitwis"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php",
    "chars": 235,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Bitwis"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/Coalesce.php",
    "chars": 231,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Coales"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/Concat.php",
    "chars": 227,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Concat"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/Div.php",
    "chars": 221,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Div ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/Minus.php",
    "chars": 225,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Minus "
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/Mod.php",
    "chars": 221,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Mod ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/Mul.php",
    "chars": 221,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Mul ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/Plus.php",
    "chars": 223,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Plus e"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/Pow.php",
    "chars": 221,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass Pow ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php",
    "chars": 233,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass ShiftL"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php",
    "chars": 235,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\AssignOp;\n\nuse PhpParser\\Node\\Expr\\AssignOp;\n\nclass ShiftR"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignOp.php",
    "chars": 726,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nabstract class AssignOp extend"
  },
  {
    "path": "lib/PhpParser/Node/Expr/AssignRef.php",
    "chars": 823,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass AssignRef extends Expr {"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php",
    "chars": 311,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Bitwis"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php",
    "chars": 309,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Bitwis"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php",
    "chars": 311,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Bitwis"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php",
    "chars": 312,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Boolea"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php",
    "chars": 310,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Boolea"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php",
    "chars": 308,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Coales"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Concat.php",
    "chars": 303,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Concat"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Div.php",
    "chars": 297,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Div ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Equal.php",
    "chars": 302,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Equal "
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Greater.php",
    "chars": 305,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Greate"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php",
    "chars": 320,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Greate"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Identical.php",
    "chars": 311,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Identi"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php",
    "chars": 313,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Logica"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php",
    "chars": 310,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Logica"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php",
    "chars": 313,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Logica"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Minus.php",
    "chars": 301,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Minus "
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Mod.php",
    "chars": 297,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Mod ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Mul.php",
    "chars": 297,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Mul ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php",
    "chars": 308,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass NotEqu"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php",
    "chars": 317,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass NotIde"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Pipe.php",
    "chars": 300,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Pipe e"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Plus.php",
    "chars": 299,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Plus e"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Pow.php",
    "chars": 298,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Pow ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php",
    "chars": 310,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass ShiftL"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php",
    "chars": 312,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass ShiftR"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Smaller.php",
    "chars": 305,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Smalle"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php",
    "chars": 320,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Smalle"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php",
    "chars": 311,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\BinaryOp;\n\nuse PhpParser\\Node\\Expr\\BinaryOp;\n\nclass Spaces"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BinaryOp.php",
    "chars": 1095,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nabstract class BinaryOp extend"
  },
  {
    "path": "lib/PhpParser/Node/Expr/BitwiseNot.php",
    "chars": 652,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass BitwiseNot extends Expr "
  },
  {
    "path": "lib/PhpParser/Node/Expr/BooleanNot.php",
    "chars": 652,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass BooleanNot extends Expr "
  },
  {
    "path": "lib/PhpParser/Node/Expr/CallLike.php",
    "chars": 1805,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Arg;\nuse PhpParser\\Node\\Expr;\nuse Php"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Cast/Array_.php",
    "chars": 210,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\Cast;\n\nuse PhpParser\\Node\\Expr\\Cast;\n\nclass Array_ extends"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Cast/Bool_.php",
    "chars": 348,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\Cast;\n\nuse PhpParser\\Node\\Expr\\Cast;\n\nclass Bool_ extends "
  },
  {
    "path": "lib/PhpParser/Node/Expr/Cast/Double.php",
    "chars": 401,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\Cast;\n\nuse PhpParser\\Node\\Expr\\Cast;\n\nclass Double extends"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Cast/Int_.php",
    "chars": 344,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\Cast;\n\nuse PhpParser\\Node\\Expr\\Cast;\n\nclass Int_ extends C"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Cast/Object_.php",
    "chars": 212,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\Cast;\n\nuse PhpParser\\Node\\Expr\\Cast;\n\nclass Object_ extend"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Cast/String_.php",
    "chars": 354,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\Cast;\n\nuse PhpParser\\Node\\Expr\\Cast;\n\nclass String_ extend"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Cast/Unset_.php",
    "chars": 210,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\Cast;\n\nuse PhpParser\\Node\\Expr\\Cast;\n\nclass Unset_ extends"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Cast/Void_.php",
    "chars": 208,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr\\Cast;\n\nuse PhpParser\\Node\\Expr\\Cast;\n\nclass Void_ extends "
  },
  {
    "path": "lib/PhpParser/Node/Expr/Cast.php",
    "chars": 567,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nabstract class Cast extends Ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/ClassConstFetch.php",
    "chars": 986,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Expr;\nuse PhpPars"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Clone_.php",
    "chars": 637,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Clone_ extends Expr {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr/Closure.php",
    "chars": 2836,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\ClosureUse;\nuse P"
  },
  {
    "path": "lib/PhpParser/Node/Expr/ClosureUse.php",
    "chars": 309,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nrequire __DIR__ . '/../ClosureUse.php';\n\nif (false) {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr/ConstFetch.php",
    "chars": 683,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\nuse PhpParser\\Node\\Name;\n\nclass"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Empty_.php",
    "chars": 640,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Empty_ extends Expr {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr/Error.php",
    "chars": 757,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\n/**\n * Error node used during "
  },
  {
    "path": "lib/PhpParser/Node/Expr/ErrorSuppress.php",
    "chars": 662,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass ErrorSuppress extends Ex"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Eval_.php",
    "chars": 637,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Eval_ extends Expr {\n   "
  },
  {
    "path": "lib/PhpParser/Node/Expr/Exit_.php",
    "chars": 758,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Exit_ extends Expr {\n   "
  },
  {
    "path": "lib/PhpParser/Node/Expr/FuncCall.php",
    "chars": 994,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Expr;\n\nclass Func"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Include_.php",
    "chars": 951,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Include_ extends Expr {\n"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Instanceof_.php",
    "chars": 860,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Expr;\nuse PhpPars"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Isset_.php",
    "chars": 642,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Isset_ extends Expr {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr/List_.php",
    "chars": 879,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\ArrayItem;\nuse PhpParser\\Node\\Expr;\n\n"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Match_.php",
    "chars": 782,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\MatchArm;\n\nclass "
  },
  {
    "path": "lib/PhpParser/Node/Expr/MethodCall.php",
    "chars": 1277,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Arg;\nuse PhpParse"
  },
  {
    "path": "lib/PhpParser/Node/Expr/New_.php",
    "chars": 1101,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Arg;\nuse PhpParse"
  },
  {
    "path": "lib/PhpParser/Node/Expr/NullsafeMethodCall.php",
    "chars": 1300,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Arg;\nuse PhpParse"
  },
  {
    "path": "lib/PhpParser/Node/Expr/NullsafePropertyFetch.php",
    "chars": 971,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Expr;\nuse PhpPars"
  },
  {
    "path": "lib/PhpParser/Node/Expr/PostDec.php",
    "chars": 639,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass PostDec extends Expr {\n "
  },
  {
    "path": "lib/PhpParser/Node/Expr/PostInc.php",
    "chars": 639,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass PostInc extends Expr {\n "
  },
  {
    "path": "lib/PhpParser/Node/Expr/PreDec.php",
    "chars": 636,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass PreDec extends Expr {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr/PreInc.php",
    "chars": 636,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass PreInc extends Expr {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr/Print_.php",
    "chars": 640,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Print_ extends Expr {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr/PropertyFetch.php",
    "chars": 945,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Expr;\nuse PhpPars"
  },
  {
    "path": "lib/PhpParser/Node/Expr/ShellExec.php",
    "chars": 795,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\nuse PhpParser\\Node\\Interpolated"
  },
  {
    "path": "lib/PhpParser/Node/Expr/StaticCall.php",
    "chars": 1288,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Arg;\nuse PhpParse"
  },
  {
    "path": "lib/PhpParser/Node/Expr/StaticPropertyFetch.php",
    "chars": 1014,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\nuse PhpParser\\Node\\Expr;\nuse PhpPars"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Ternary.php",
    "chars": 967,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Ternary extends Expr {\n "
  },
  {
    "path": "lib/PhpParser/Node/Expr/Throw_.php",
    "chars": 668,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node;\n\nclass Throw_ extends Node\\Expr {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr/UnaryMinus.php",
    "chars": 652,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass UnaryMinus extends Expr "
  },
  {
    "path": "lib/PhpParser/Node/Expr/UnaryPlus.php",
    "chars": 649,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass UnaryPlus extends Expr {"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Variable.php",
    "chars": 637,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Variable extends Expr {\n"
  },
  {
    "path": "lib/PhpParser/Node/Expr/YieldFrom.php",
    "chars": 666,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass YieldFrom extends Expr {"
  },
  {
    "path": "lib/PhpParser/Node/Expr/Yield_.php",
    "chars": 846,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\nclass Yield_ extends Expr {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Expr.php",
    "chars": 133,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\NodeAbstract;\n\nabstract class Expr extends Node"
  },
  {
    "path": "lib/PhpParser/Node/FunctionLike.php",
    "chars": 731,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\Node;\n\ninterface FunctionLike extends Node {\n  "
  },
  {
    "path": "lib/PhpParser/Node/Identifier.php",
    "chars": 2117,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\NodeAbstract;\n\n/**\n * Represents a non-namespac"
  },
  {
    "path": "lib/PhpParser/Node/InterpolatedStringPart.php",
    "chars": 850,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\NodeAbstract;\n\nclass InterpolatedStringPart ext"
  },
  {
    "path": "lib/PhpParser/Node/IntersectionType.php",
    "chars": 665,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nclass IntersectionType extends ComplexType {\n    /** @var (Id"
  },
  {
    "path": "lib/PhpParser/Node/MatchArm.php",
    "chars": 652,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node;\n\nuse PhpParser\\Node;\nuse PhpParser\\NodeAbstract;\n\nclass MatchA"
  },
  {
    "path": "lib/PhpParser/Node/Name/FullyQualified.php",
    "chars": 1170,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Name;\n\nclass FullyQualified extends \\PhpParser\\Node\\Name {\n    "
  },
  {
    "path": "lib/PhpParser/Node/Name/Relative.php",
    "chars": 1167,
    "preview": "<?php declare(strict_types=1);\n\nnamespace PhpParser\\Node\\Name;\n\nclass Relative extends \\PhpParser\\Node\\Name {\n    /**\n  "
  }
]

// ... and 464 more files (download for full content)

About this extraction

This page contains the full source code of the nikic/PHP-Parser GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 664 files (2.1 MB), approximately 571.7k tokens, and a symbol index with 2042 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!