@appthreat/atom-parsetools 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/plugins/autoload.php +1 -1
- package/plugins/bin/bundler +1 -1
- package/plugins/bin/ruby_ast_gen +1 -1
- package/plugins/composer/autoload_classmap.php +22 -8
- package/plugins/composer/autoload_real.php +4 -4
- package/plugins/composer/autoload_static.php +26 -12
- package/plugins/composer/installed.json +12 -10
- package/plugins/composer/installed.php +9 -9
- package/plugins/nikic/php-parser/README.md +20 -12
- package/plugins/nikic/php-parser/bin/php-parse +11 -10
- package/plugins/nikic/php-parser/composer.json +6 -4
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php +19 -17
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Class_.php +35 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +11 -4
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +8 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +26 -27
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +7 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Function_.php +7 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +11 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Method.php +16 -15
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +5 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Param.php +38 -35
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Property.php +82 -20
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +6 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +25 -28
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +16 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Use_.php +8 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Builder.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/BuilderFactory.php +46 -70
- package/plugins/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +23 -20
- package/plugins/nikic/php-parser/lib/PhpParser/Comment/Doc.php +1 -2
- package/plugins/nikic/php-parser/lib/PhpParser/Comment.php +37 -67
- package/plugins/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php +3 -3
- package/plugins/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php +15 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Error.php +26 -33
- package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php +6 -9
- package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php +11 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/Differ.php +36 -22
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +20 -13
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php +237 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +70 -74
- package/plugins/nikic/php-parser/lib/PhpParser/JsonDecoder.php +15 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +72 -97
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php +93 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +11 -18
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +10 -15
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +12 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +24 -26
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +6 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +22 -29
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php +19 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php +3 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +10 -15
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +6 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +10 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer.php +69 -513
- package/plugins/nikic/php-parser/lib/PhpParser/Modifiers.php +85 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NameContext.php +24 -25
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Arg.php +13 -15
- package/plugins/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php +43 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Attribute.php +9 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +5 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php +36 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +1 -2
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Const_.php +9 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php +37 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +10 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +4 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +11 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +33 -28
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +9 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php +9 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +8 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +3 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +5 -6
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +5 -6
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +10 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +33 -26
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +4 -27
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +5 -6
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +10 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +10 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +13 -14
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +11 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +12 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +8 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +12 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +10 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +12 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +10 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +6 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +10 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +9 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +12 -13
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +11 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +12 -13
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +6 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +6 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +10 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr.php +1 -2
- package/plugins/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +5 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Identifier.php +24 -14
- package/plugins/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php +32 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +6 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +8 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +8 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +8 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Name.php +78 -54
- package/plugins/nikic/php-parser/lib/PhpParser/Node/NullableType.php +11 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Param.php +83 -24
- package/plugins/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php +105 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php +37 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +4 -70
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +4 -24
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +5 -22
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php +78 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php +82 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +4 -73
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php +15 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +30 -26
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar.php +1 -2
- package/plugins/nikic/php-parser/lib/PhpParser/Node/StaticVar.php +39 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php +29 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +8 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +10 -11
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +11 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +24 -32
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +17 -17
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +47 -54
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +46 -89
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +17 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +8 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +5 -26
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +12 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +9 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +9 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +11 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +17 -13
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +19 -15
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +20 -17
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +28 -24
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +16 -14
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +18 -15
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +13 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +11 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +4 -5
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +68 -38
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +5 -26
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +8 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +4 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +8 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +9 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +8 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +12 -13
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +9 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +3 -4
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +10 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +11 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +5 -44
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +16 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +9 -10
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt.php +1 -2
- package/plugins/nikic/php-parser/lib/PhpParser/Node/UnionType.php +7 -8
- package/plugins/nikic/php-parser/lib/PhpParser/Node/UseItem.php +55 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +2 -3
- package/plugins/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php +2 -2
- package/plugins/nikic/php-parser/lib/PhpParser/Node.php +28 -29
- package/plugins/nikic/php-parser/lib/PhpParser/NodeAbstract.php +23 -20
- package/plugins/nikic/php-parser/lib/PhpParser/NodeDumper.php +177 -84
- package/plugins/nikic/php-parser/lib/PhpParser/NodeFinder.php +28 -19
- package/plugins/nikic/php-parser/lib/PhpParser/NodeTraverser.php +156 -160
- package/plugins/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +4 -7
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +1 -2
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php +82 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +6 -7
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +6 -7
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +37 -28
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +29 -8
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +23 -13
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor.php +59 -7
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +1 -2
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php7.php +2034 -2141
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php8.php +2814 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Parser.php +9 -3
- package/plugins/nikic/php-parser/lib/PhpParser/ParserAbstract.php +503 -269
- package/plugins/nikic/php-parser/lib/PhpParser/ParserFactory.php +15 -49
- package/plugins/nikic/php-parser/lib/PhpParser/PhpVersion.php +171 -0
- package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +428 -339
- package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinter.php +51 -0
- package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +563 -445
- package/plugins/nikic/php-parser/lib/PhpParser/Token.php +18 -0
- package/plugins/nikic/php-parser/lib/PhpParser/compatibility_tokens.php +68 -0
- package/plugins/rubyastgen/Gemfile +3 -2
- package/plugins/rubyastgen/Gemfile.lock +10 -5
- package/plugins/rubyastgen/bundle/bundler/setup.rb +4 -2
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/bundle +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/bundler +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/Gemfile +2 -1
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/README.md +7 -4
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-8738b155eb4f/bin/console +11 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-8738b155eb4f/exe/ruby_ast_gen +60 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/lib/ruby_ast_gen/node_handling.rb +49 -31
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/lib/ruby_ast_gen/version.rb +1 -1
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/lib/ruby_ast_gen.rb +24 -10
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/ruby_ast_gen.gemspec +4 -4
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-8738b155eb4f/spec/ruby_ast_gen_spec.rb +299 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/update_version.rb +6 -5
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.4.0/gem.build_complete +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.4.0/gem_make.out +44 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.4.0/mkmf.log +74 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.4.0/prism/prism.so +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/gem_make.out +6 -6
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/racc/cparse.so +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/CHANGELOG.md +5239 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/LICENSE.md +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/README.md +58 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/bundler.gemspec +46 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/exe/bundle +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/exe/bundler +4 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/build_metadata.rb +45 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/capistrano.rb +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/checksum.rb +264 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ci_detector.rb +75 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/add.rb +49 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/binstubs.rb +57 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/cache.rb +43 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/check.rb +40 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/clean.rb +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/common.rb +138 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/config.rb +204 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/console.rb +42 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/doctor.rb +161 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/exec.rb +89 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/fund.rb +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/gem.rb +467 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/info.rb +83 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/init.rb +51 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/inject.rb +60 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/install.rb +199 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/issue.rb +41 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/list.rb +66 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/lock.rb +94 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/open.rb +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/outdated.rb +297 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/platform.rb +48 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/plugin.rb +35 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/pristine.rb +60 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/remove.rb +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/show.rb +75 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/update.rb +123 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/viz.rb +31 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli.rb +799 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client/cache.rb +96 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client/cache_file.rb +148 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client/parser.rb +84 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client/updater.rb +105 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client.rb +97 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/constants.rb +14 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/current_ruby.rb +82 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/definition.rb +1170 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/dependency.rb +151 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/deployment.rb +69 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/deprecate.rb +44 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/digest.rb +71 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/dsl.rb +638 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/endpoint_specification.rb +174 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/env.rb +148 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/environment_preserver.rb +68 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/errors.rb +281 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/feature_flag.rb +50 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/base.rb +52 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/compact_index.rb +120 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/dependency.rb +78 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/downloader.rb +91 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/index.rb +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher.rb +331 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/force_platform.rb +16 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/friendly_errors.rb +126 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/gem_helper.rb +237 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/gem_helpers.rb +144 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/gem_tasks.rb +7 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/gem_version_promoter.rb +147 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/graph.rb +152 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/index.rb +205 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/injector.rb +285 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/inline.rb +98 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/installer/gem_installer.rb +85 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/installer/parallel_installer.rb +203 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/installer/standalone.rb +113 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/installer.rb +243 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/lazy_specification.rb +234 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/lockfile_generator.rb +104 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/lockfile_parser.rb +300 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-add.1 +76 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-add.1.ronn +87 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-binstubs.1 +33 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-binstubs.1.ronn +44 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-cache.1 +68 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-cache.1.ronn +108 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-check.1 +24 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-check.1.ronn +31 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-clean.1 +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-clean.1.ronn +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-config.1 +317 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-config.1.ronn +408 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-console.1 +33 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-console.1.ronn +39 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-doctor.1 +30 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-doctor.1.ronn +33 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-env.1 +9 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-env.1.ronn +10 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-exec.1 +107 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-exec.1.ronn +154 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-fund.1 +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-fund.1.ronn +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-gem.1 +87 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-gem.1.ronn +149 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-help.1 +9 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-help.1.ronn +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-info.1 +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-info.1.ronn +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-init.1 +20 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-init.1.ronn +32 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-inject.1 +31 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-inject.1.ronn +32 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-install.1 +218 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-install.1.ronn +387 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-issue.1 +45 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-issue.1.ronn +37 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-licenses.1 +9 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-licenses.1.ronn +10 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-list.1 +35 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-list.1.ronn +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-lock.1 +75 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-lock.1.ronn +115 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-open.1 +32 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-open.1.ronn +28 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-outdated.1 +103 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-outdated.1.ronn +110 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-platform.1 +49 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-platform.1.ronn +49 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-plugin.1 +58 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-plugin.1.ronn +63 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-pristine.1 +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-pristine.1.ronn +34 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-remove.1 +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-remove.1.ronn +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-show.1 +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-show.1.ronn +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-update.1 +281 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-update.1.ronn +359 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-version.1 +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-version.1.ronn +24 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-viz.1 +30 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-viz.1.ronn +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle.1 +102 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle.1.ronn +116 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/gemfile.5 +472 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/gemfile.5.ronn +558 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/index.txt +33 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/match_metadata.rb +30 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/match_platform.rb +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/match_remote_metadata.rb +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/materialization.rb +59 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/mirror.rb +221 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/api/source.rb +322 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/api.rb +81 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/dsl.rb +53 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/events.rb +85 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/index.rb +197 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/installer/git.rb +34 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/installer/path.rb +26 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/installer/rubygems.rb +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/installer.rb +132 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/source_list.rb +31 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin.rb +378 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/process_lock.rb +20 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/remote_specification.rb +126 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/base.rb +118 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/candidate.rb +85 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/incompatibility.rb +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/package.rb +94 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/root.rb +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/spec_group.rb +74 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/strategy.rb +40 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver.rb +522 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/retry.rb +66 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ruby_dsl.rb +62 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ruby_version.rb +137 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/rubygems_ext.rb +485 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/rubygems_gem_installer.rb +172 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/rubygems_integration.rb +455 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/runtime.rb +320 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/safe_marshal.rb +31 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/self_manager.rb +206 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/settings/validator.rb +102 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/settings.rb +599 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/setup.rb +39 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/shared_helpers.rb +398 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/similarity_detector.rb +63 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/gemspec.rb +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/git/git_proxy.rb +472 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/git.rb +452 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/metadata.rb +63 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/path/installer.rb +53 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/path.rb +250 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/rubygems/remote.rb +76 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/rubygems.rb +522 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/rubygems_aggregate.rb +68 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source.rb +118 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source_list.rb +273 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source_map.rb +71 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/spec_set.rb +367 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/stub_specification.rb +146 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/Executable +27 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/Executable.bundler +109 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/Executable.standalone +14 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/Gemfile +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +132 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/Gemfile.tt +24 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/LICENSE.txt.tt +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/README.md.tt +49 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/Rakefile.tt +67 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/{bundler/gems/ruby_ast_gen-2a9186207494/bin/console → gems/bundler-2.6.7/lib/bundler/templates/newgem/bin/console.tt} +1 -1
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1/bin/setup → bundler-2.6.7/lib/bundler/templates/newgem/bin/setup.tt} +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/circleci/config.yml.tt +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +10 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/github/workflows/main.yml.tt +37 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/gitignore.tt +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/gitlab-ci.yml.tt +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +9 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/lib/newgem.rb.tt +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/newgem.gemspec.tt +52 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/rspec.tt +3 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/rubocop.yml.tt +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +11 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/standard.yml.tt +3 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/test/minitest/test_helper.rb.tt +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +13 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ui/rg_proxy.rb +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ui/shell.rb +187 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ui/silent.rb +96 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ui.rb +9 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/uri_credentials_filter.rb +43 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/uri_normalizer.rb +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/connection_pool/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/connection_pool/LICENSE +20 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +224 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/connection_pool/lib/connection_pool/version.rb +3 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +186 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/fileutils/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/fileutils/lib/fileutils.rb +2696 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/net-http-persistent/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +41 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +65 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +79 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +1111 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +20 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +169 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +182 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +150 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/package.rb +43 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +121 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +45 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +61 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +42 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/term.rb +105 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/version.rb +3 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +129 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +423 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +236 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +178 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/securerandom/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/securerandom/COPYING +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/LICENSE.md +20 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/actions/create_file.rb +105 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/actions/create_link.rb +61 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +108 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +143 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +371 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +130 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/actions.rb +340 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/base.rb +825 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/command.rb +151 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +107 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/error.rb +106 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/group.rb +292 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb +37 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb +88 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +86 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +195 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser/option.rb +178 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser/options.rb +294 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +72 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/runner.rb +335 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +388 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/color.rb +112 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/column_printer.rb +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/html.rb +81 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/table_printer.rb +118 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +38 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/util.rb +285 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor.rb +674 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/tsort/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/tsort/lib/tsort.rb +455 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/.document +1 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/COPYING +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/common.rb +880 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/file.rb +100 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/generic.rb +1579 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/http.rb +125 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/https.rb +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/ldaps.rb +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/mailto.rb +293 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/version.rb +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/ws.rb +83 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/wss.rb +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri.rb +104 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_fileutils.rb +4 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_net_http.rb +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_persistent.rb +11 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_pub_grub.rb +4 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_securerandom.rb +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_thor.rb +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_timeout.rb +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_tsort.rb +4 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_uri.rb +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/version.rb +13 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vlad.rb +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/worker.rb +117 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/yaml_serializer.rb +98 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler.rb +701 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.3/COPYING +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.3/bin/setup +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/lib/ostruct.rb +5 -2
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/ostruct.gemspec +2 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/BSDmakefile +58 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/CHANGELOG.md +684 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/CODE_OF_CONDUCT.md +76 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/CONTRIBUTING.md +58 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/LICENSE.md +7 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/Makefile +108 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/README.md +141 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/config.yml +4486 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/build_system.md +119 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/configuration.md +68 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/cruby_compilation.md +27 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/design.md +53 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/encoding.md +121 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/fuzzing.md +88 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/heredocs.md +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/javascript.md +118 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/local_variable_depth.md +229 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/mapping.md +117 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/parser_translation.md +39 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/parsing_rules.md +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/releasing.md +96 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/relocation.md +34 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/ripper_translation.md +72 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/ruby_api.md +44 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/ruby_parser_translation.md +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/serialization.md +233 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/testing.md +55 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/Makefile +273 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/api_node.c +6939 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/api_pack.c +276 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/extconf.rb +127 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/extension.c +1406 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/extension.h +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/ast.h +7964 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/defines.h +260 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/diagnostic.h +451 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/encoding.h +283 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/node.h +129 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/options.h +442 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/pack.h +163 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/parser.h +933 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/prettyprint.h +34 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/regexp.h +43 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/static_literals.h +121 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_buffer.h +228 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_char.h +204 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_constant_pool.h +218 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_integer.h +126 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_list.h +97 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_memchr.h +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_newline_list.h +113 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_string.h +190 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_strncasecmp.h +32 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_strpbrk.h +46 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/version.h +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism.h +383 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/compiler.rb +496 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/desugar_compiler.rb +391 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/dispatcher.rb +2194 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/dot_visitor.rb +4758 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/dsl.rb +1000 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/ffi.rb +560 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/inspect_visitor.rb +2389 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/lex_compat.rb +927 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/mutation_compiler.rb +769 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/node.rb +18645 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/node_ext.rb +508 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/pack.rb +228 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/parse_result/comments.rb +187 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/parse_result/errors.rb +65 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/parse_result/newlines.rb +154 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/parse_result.rb +910 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/pattern.rb +268 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/polyfill/append_as_bytes.rb +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/polyfill/byteindex.rb +13 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/polyfill/unpack1.rb +14 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/prism.so +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/reflection.rb +413 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/relocation.rb +504 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/serialize.rb +2392 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/string_query.rb +30 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser/builder.rb +61 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser/compiler.rb +2212 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser/lexer.rb +812 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser.rb +355 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser33.rb +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser34.rb +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser35.rb +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/ripper/sexp.rb +125 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/ripper/shim.rb +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/ripper.rb +3458 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/ruby_parser.rb +1646 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation.rb +14 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/visitor.rb +508 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism.rb +89 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/prism.gemspec +170 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/compiler.rbi +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/dsl.rbi +524 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/inspect_visitor.rbi +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/node.rbi +8722 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/node_ext.rbi +107 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/parse_result.rbi +404 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/reflection.rbi +58 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/string_query.rbi +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/parser.rbi +11 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/parser33.rbi +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/parser34.rbi +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/parser35.rbi +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/ripper.rbi +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/visitor.rbi +473 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism.rbi +66 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/compiler.rbs +9 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/dispatcher.rbs +16 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/dot_visitor.rbs +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/dsl.rbs +351 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/inspect_visitor.rbs +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/lex_compat.rbs +10 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/mutation_compiler.rbs +159 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/node.rbs +3614 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/node_ext.rbs +82 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/pack.rbs +43 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/parse_result.rbs +192 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/pattern.rbs +13 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/reflection.rbs +50 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/relocation.rbs +185 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/serialize.rbs +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/string_query.rbs +11 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/visitor.rbs +169 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism.rbs +254 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/diagnostic.c +842 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/encoding.c +5235 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/node.c +8674 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/options.c +328 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/pack.c +509 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/prettyprint.c +8939 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/prism.c +23184 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/regexp.c +790 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/serialize.c +2266 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/static_literals.c +617 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/token_type.c +701 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_buffer.c +357 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_char.c +318 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_constant_pool.c +342 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_integer.c +670 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_list.c +49 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_memchr.c +35 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_newline_list.c +125 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_string.c +383 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_strncasecmp.c +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_strpbrk.c +206 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +3 -3
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/ast-2.4.3.gemspec +1 -1
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/bundler-2.6.7.gemspec +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/{ostruct-0.6.1.gemspec → ostruct-0.6.3.gemspec} +5 -4
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/parser-3.3.8.0.gemspec +1 -1
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/prism-1.4.0.gemspec +24 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/racc-1.8.1.gemspec +1 -1
- package/rbastgen.js +1 -1
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +0 -47
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +0 -76
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +0 -23
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +0 -105
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +0 -55
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php5.php +0 -2682
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +0 -148
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-2a9186207494/exe/ruby_ast_gen +0 -59
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-2a9186207494/spec/ruby_ast_gen_spec.rb +0 -175
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/.rspec +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/LICENSE.txt +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/Rakefile +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/bin/setup +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/spec/spec_helper.rb +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → bundler-2.6.7/lib/bundler/vendor/fileutils}/COPYING +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/BSDL +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/Gemfile +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/README.md +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/Rakefile +0 -0
- /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/bin/console +0 -0
|
@@ -3,162 +3,223 @@
|
|
|
3
3
|
namespace PhpParser;
|
|
4
4
|
|
|
5
5
|
use PhpParser\Internal\DiffElem;
|
|
6
|
+
use PhpParser\Internal\Differ;
|
|
6
7
|
use PhpParser\Internal\PrintableNewAnonClassNode;
|
|
7
8
|
use PhpParser\Internal\TokenStream;
|
|
9
|
+
use PhpParser\Node\AttributeGroup;
|
|
8
10
|
use PhpParser\Node\Expr;
|
|
9
11
|
use PhpParser\Node\Expr\AssignOp;
|
|
10
12
|
use PhpParser\Node\Expr\BinaryOp;
|
|
11
13
|
use PhpParser\Node\Expr\Cast;
|
|
14
|
+
use PhpParser\Node\IntersectionType;
|
|
15
|
+
use PhpParser\Node\MatchArm;
|
|
16
|
+
use PhpParser\Node\Param;
|
|
17
|
+
use PhpParser\Node\PropertyHook;
|
|
12
18
|
use PhpParser\Node\Scalar;
|
|
13
19
|
use PhpParser\Node\Stmt;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
const FIXUP_PREC_LEFT
|
|
18
|
-
const FIXUP_PREC_RIGHT
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Expr\
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Cast\
|
|
42
|
-
Cast\
|
|
43
|
-
Cast\
|
|
44
|
-
Cast\
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
BinaryOp\
|
|
52
|
-
BinaryOp\
|
|
53
|
-
BinaryOp\
|
|
54
|
-
BinaryOp\
|
|
55
|
-
BinaryOp\
|
|
56
|
-
BinaryOp\
|
|
57
|
-
BinaryOp\
|
|
58
|
-
BinaryOp\
|
|
59
|
-
BinaryOp\
|
|
60
|
-
BinaryOp\
|
|
61
|
-
BinaryOp\
|
|
62
|
-
BinaryOp\
|
|
63
|
-
BinaryOp\
|
|
64
|
-
BinaryOp\
|
|
65
|
-
BinaryOp\
|
|
66
|
-
BinaryOp\
|
|
67
|
-
BinaryOp\
|
|
68
|
-
BinaryOp\
|
|
69
|
-
BinaryOp\
|
|
70
|
-
BinaryOp\
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Expr\
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
AssignOp\
|
|
78
|
-
AssignOp\
|
|
79
|
-
AssignOp\
|
|
80
|
-
AssignOp\
|
|
81
|
-
AssignOp\
|
|
82
|
-
AssignOp\
|
|
83
|
-
AssignOp\
|
|
84
|
-
AssignOp\
|
|
85
|
-
AssignOp\
|
|
86
|
-
AssignOp\
|
|
87
|
-
AssignOp\
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
20
|
+
use PhpParser\Node\UnionType;
|
|
21
|
+
|
|
22
|
+
abstract class PrettyPrinterAbstract implements PrettyPrinter {
|
|
23
|
+
protected const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence
|
|
24
|
+
protected const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence
|
|
25
|
+
protected const FIXUP_PREC_UNARY = 2; // Only operand affected by precedence
|
|
26
|
+
protected const FIXUP_CALL_LHS = 3; // LHS of call
|
|
27
|
+
protected const FIXUP_DEREF_LHS = 4; // LHS of dereferencing operation
|
|
28
|
+
protected const FIXUP_STATIC_DEREF_LHS = 5; // LHS of static dereferencing operation
|
|
29
|
+
protected const FIXUP_BRACED_NAME = 6; // Name operand that may require bracing
|
|
30
|
+
protected const FIXUP_VAR_BRACED_NAME = 7; // Name operand that may require ${} bracing
|
|
31
|
+
protected const FIXUP_ENCAPSED = 8; // Encapsed string part
|
|
32
|
+
protected const FIXUP_NEW = 9; // New/instanceof operand
|
|
33
|
+
|
|
34
|
+
protected const MAX_PRECEDENCE = 1000;
|
|
35
|
+
|
|
36
|
+
/** @var array<class-string, array{int, int, int}> */
|
|
37
|
+
protected array $precedenceMap = [
|
|
38
|
+
// [precedence, precedenceLHS, precedenceRHS]
|
|
39
|
+
// Where the latter two are the precedences to use for the LHS and RHS of a binary operator,
|
|
40
|
+
// where 1 is added to one of the sides depending on associativity. This information is not
|
|
41
|
+
// used for unary operators and set to -1.
|
|
42
|
+
Expr\Clone_::class => [-10, 0, 1],
|
|
43
|
+
BinaryOp\Pow::class => [ 0, 0, 1],
|
|
44
|
+
Expr\BitwiseNot::class => [ 10, -1, -1],
|
|
45
|
+
Expr\UnaryPlus::class => [ 10, -1, -1],
|
|
46
|
+
Expr\UnaryMinus::class => [ 10, -1, -1],
|
|
47
|
+
Cast\Int_::class => [ 10, -1, -1],
|
|
48
|
+
Cast\Double::class => [ 10, -1, -1],
|
|
49
|
+
Cast\String_::class => [ 10, -1, -1],
|
|
50
|
+
Cast\Array_::class => [ 10, -1, -1],
|
|
51
|
+
Cast\Object_::class => [ 10, -1, -1],
|
|
52
|
+
Cast\Bool_::class => [ 10, -1, -1],
|
|
53
|
+
Cast\Unset_::class => [ 10, -1, -1],
|
|
54
|
+
Expr\ErrorSuppress::class => [ 10, -1, -1],
|
|
55
|
+
Expr\Instanceof_::class => [ 20, -1, -1],
|
|
56
|
+
Expr\BooleanNot::class => [ 30, -1, -1],
|
|
57
|
+
BinaryOp\Mul::class => [ 40, 41, 40],
|
|
58
|
+
BinaryOp\Div::class => [ 40, 41, 40],
|
|
59
|
+
BinaryOp\Mod::class => [ 40, 41, 40],
|
|
60
|
+
BinaryOp\Plus::class => [ 50, 51, 50],
|
|
61
|
+
BinaryOp\Minus::class => [ 50, 51, 50],
|
|
62
|
+
BinaryOp\Concat::class => [ 50, 51, 50],
|
|
63
|
+
BinaryOp\ShiftLeft::class => [ 60, 61, 60],
|
|
64
|
+
BinaryOp\ShiftRight::class => [ 60, 61, 60],
|
|
65
|
+
BinaryOp\Smaller::class => [ 70, 70, 70],
|
|
66
|
+
BinaryOp\SmallerOrEqual::class => [ 70, 70, 70],
|
|
67
|
+
BinaryOp\Greater::class => [ 70, 70, 70],
|
|
68
|
+
BinaryOp\GreaterOrEqual::class => [ 70, 70, 70],
|
|
69
|
+
BinaryOp\Equal::class => [ 80, 80, 80],
|
|
70
|
+
BinaryOp\NotEqual::class => [ 80, 80, 80],
|
|
71
|
+
BinaryOp\Identical::class => [ 80, 80, 80],
|
|
72
|
+
BinaryOp\NotIdentical::class => [ 80, 80, 80],
|
|
73
|
+
BinaryOp\Spaceship::class => [ 80, 80, 80],
|
|
74
|
+
BinaryOp\BitwiseAnd::class => [ 90, 91, 90],
|
|
75
|
+
BinaryOp\BitwiseXor::class => [100, 101, 100],
|
|
76
|
+
BinaryOp\BitwiseOr::class => [110, 111, 110],
|
|
77
|
+
BinaryOp\BooleanAnd::class => [120, 121, 120],
|
|
78
|
+
BinaryOp\BooleanOr::class => [130, 131, 130],
|
|
79
|
+
BinaryOp\Coalesce::class => [140, 140, 141],
|
|
80
|
+
Expr\Ternary::class => [150, 150, 150],
|
|
81
|
+
Expr\Assign::class => [160, -1, -1],
|
|
82
|
+
Expr\AssignRef::class => [160, -1, -1],
|
|
83
|
+
AssignOp\Plus::class => [160, -1, -1],
|
|
84
|
+
AssignOp\Minus::class => [160, -1, -1],
|
|
85
|
+
AssignOp\Mul::class => [160, -1, -1],
|
|
86
|
+
AssignOp\Div::class => [160, -1, -1],
|
|
87
|
+
AssignOp\Concat::class => [160, -1, -1],
|
|
88
|
+
AssignOp\Mod::class => [160, -1, -1],
|
|
89
|
+
AssignOp\BitwiseAnd::class => [160, -1, -1],
|
|
90
|
+
AssignOp\BitwiseOr::class => [160, -1, -1],
|
|
91
|
+
AssignOp\BitwiseXor::class => [160, -1, -1],
|
|
92
|
+
AssignOp\ShiftLeft::class => [160, -1, -1],
|
|
93
|
+
AssignOp\ShiftRight::class => [160, -1, -1],
|
|
94
|
+
AssignOp\Pow::class => [160, -1, -1],
|
|
95
|
+
AssignOp\Coalesce::class => [160, -1, -1],
|
|
96
|
+
Expr\YieldFrom::class => [170, -1, -1],
|
|
97
|
+
Expr\Yield_::class => [175, -1, -1],
|
|
98
|
+
Expr\Print_::class => [180, -1, -1],
|
|
99
|
+
BinaryOp\LogicalAnd::class => [190, 191, 190],
|
|
100
|
+
BinaryOp\LogicalXor::class => [200, 201, 200],
|
|
101
|
+
BinaryOp\LogicalOr::class => [210, 211, 210],
|
|
102
|
+
Expr\Include_::class => [220, -1, -1],
|
|
103
|
+
Expr\ArrowFunction::class => [230, -1, -1],
|
|
104
|
+
Expr\Throw_::class => [240, -1, -1],
|
|
94
105
|
];
|
|
95
106
|
|
|
96
107
|
/** @var int Current indentation level. */
|
|
97
|
-
protected $indentLevel;
|
|
108
|
+
protected int $indentLevel;
|
|
109
|
+
/** @var string String for single level of indentation */
|
|
110
|
+
private string $indent;
|
|
111
|
+
/** @var int Width in spaces to indent by. */
|
|
112
|
+
private int $indentWidth;
|
|
113
|
+
/** @var bool Whether to use tab indentation. */
|
|
114
|
+
private bool $useTabs;
|
|
115
|
+
/** @var int Width in spaces of one tab. */
|
|
116
|
+
private int $tabWidth = 4;
|
|
117
|
+
|
|
118
|
+
/** @var string Newline style. Does not include current indentation. */
|
|
119
|
+
protected string $newline;
|
|
98
120
|
/** @var string Newline including current indentation. */
|
|
99
|
-
protected $nl;
|
|
100
|
-
/** @var string Token placed at end of doc string to ensure it is followed by a newline.
|
|
101
|
-
|
|
121
|
+
protected string $nl;
|
|
122
|
+
/** @var string|null Token placed at end of doc string to ensure it is followed by a newline.
|
|
123
|
+
* Null if flexible doc strings are used. */
|
|
124
|
+
protected ?string $docStringEndToken;
|
|
102
125
|
/** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */
|
|
103
|
-
protected $canUseSemicolonNamespaces;
|
|
104
|
-
/** @var array
|
|
105
|
-
protected $
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
/** @var
|
|
110
|
-
protected $
|
|
111
|
-
/** @var
|
|
112
|
-
protected $
|
|
126
|
+
protected bool $canUseSemicolonNamespaces;
|
|
127
|
+
/** @var bool Whether to use short array syntax if the node specifies no preference */
|
|
128
|
+
protected bool $shortArraySyntax;
|
|
129
|
+
/** @var PhpVersion PHP version to target */
|
|
130
|
+
protected PhpVersion $phpVersion;
|
|
131
|
+
|
|
132
|
+
/** @var TokenStream|null Original tokens for use in format-preserving pretty print */
|
|
133
|
+
protected ?TokenStream $origTokens;
|
|
134
|
+
/** @var Internal\Differ<Node> Differ for node lists */
|
|
135
|
+
protected Differ $nodeListDiffer;
|
|
136
|
+
/** @var array<string, bool> Map determining whether a certain character is a label character */
|
|
137
|
+
protected array $labelCharMap;
|
|
113
138
|
/**
|
|
114
|
-
* @var int
|
|
115
|
-
*
|
|
139
|
+
* @var array<string, array<string, int>> Map from token classes and subnode names to FIXUP_* constants.
|
|
140
|
+
* This is used during format-preserving prints to place additional parens/braces if necessary.
|
|
116
141
|
*/
|
|
117
|
-
protected $fixupMap;
|
|
142
|
+
protected array $fixupMap;
|
|
118
143
|
/**
|
|
119
|
-
* @var int
|
|
120
|
-
*
|
|
121
|
-
*
|
|
144
|
+
* @var array<string, array{left?: int|string, right?: int|string}> Map from "{$node->getType()}->{$subNode}"
|
|
145
|
+
* to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped
|
|
146
|
+
* when removing this node.
|
|
122
147
|
*/
|
|
123
|
-
protected $removalMap;
|
|
148
|
+
protected array $removalMap;
|
|
124
149
|
/**
|
|
125
|
-
* @var
|
|
126
|
-
*
|
|
127
|
-
*
|
|
150
|
+
* @var array<string, array{int|string|null, bool, string|null, string|null}> Map from
|
|
151
|
+
* "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight].
|
|
152
|
+
* $find is an optional token after which the insertion occurs. $extraLeft/Right
|
|
153
|
+
* are optionally added before/after the main insertions.
|
|
128
154
|
*/
|
|
129
|
-
protected $insertionMap;
|
|
155
|
+
protected array $insertionMap;
|
|
130
156
|
/**
|
|
131
|
-
* @var string
|
|
132
|
-
*
|
|
157
|
+
* @var array<string, string> Map From "{$class}->{$subNode}" to string that should be inserted
|
|
158
|
+
* between elements of this list subnode.
|
|
133
159
|
*/
|
|
134
|
-
protected $listInsertionMap;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
*
|
|
138
|
-
|
|
160
|
+
protected array $listInsertionMap;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @var array<string, array{int|string|null, string, string}>
|
|
164
|
+
*/
|
|
165
|
+
protected array $emptyListInsertionMap;
|
|
166
|
+
/** @var array<string, array{string, int}> Map from "{$class}->{$subNode}" to [$printFn, $token]
|
|
167
|
+
* where $printFn is the function to print the modifiers and $token is the token before which
|
|
168
|
+
* the modifiers should be reprinted. */
|
|
169
|
+
protected array $modifierChangeMap;
|
|
139
170
|
|
|
140
171
|
/**
|
|
141
172
|
* Creates a pretty printer instance using the given options.
|
|
142
173
|
*
|
|
143
174
|
* Supported options:
|
|
144
|
-
* *
|
|
145
|
-
*
|
|
175
|
+
* * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.4). This option
|
|
176
|
+
* controls compatibility of the generated code with older PHP
|
|
177
|
+
* versions in cases where a simple stylistic choice exists (e.g.
|
|
178
|
+
* array() vs []). It is safe to pretty-print an AST for a newer
|
|
179
|
+
* PHP version while specifying an older target (but the result will
|
|
180
|
+
* of course not be compatible with the older version in that case).
|
|
181
|
+
* * string $newline: The newline style to use. Should be "\n" (default) or "\r\n".
|
|
182
|
+
* * string $indent: The indentation to use. Should either be all spaces or a single
|
|
183
|
+
* tab. Defaults to four spaces (" ").
|
|
184
|
+
* * bool $shortArraySyntax: Whether to use [] instead of array() as the default array
|
|
185
|
+
* syntax, if the node does not specify a format. Defaults to whether
|
|
186
|
+
* the phpVersion support short array syntax.
|
|
146
187
|
*
|
|
147
|
-
* @param array
|
|
188
|
+
* @param array{
|
|
189
|
+
* phpVersion?: PhpVersion, newline?: string, indent?: string, shortArraySyntax?: bool
|
|
190
|
+
* } $options Dictionary of formatting options
|
|
148
191
|
*/
|
|
149
192
|
public function __construct(array $options = []) {
|
|
150
|
-
$this->
|
|
193
|
+
$this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4);
|
|
194
|
+
|
|
195
|
+
$this->newline = $options['newline'] ?? "\n";
|
|
196
|
+
if ($this->newline !== "\n" && $this->newline != "\r\n") {
|
|
197
|
+
throw new \LogicException('Option "newline" must be one of "\n" or "\r\n"');
|
|
198
|
+
}
|
|
151
199
|
|
|
152
|
-
$
|
|
153
|
-
|
|
200
|
+
$this->shortArraySyntax =
|
|
201
|
+
$options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax();
|
|
202
|
+
$this->docStringEndToken =
|
|
203
|
+
$this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand();
|
|
204
|
+
|
|
205
|
+
$this->indent = $indent = $options['indent'] ?? ' ';
|
|
206
|
+
if ($indent === "\t") {
|
|
207
|
+
$this->useTabs = true;
|
|
208
|
+
$this->indentWidth = $this->tabWidth;
|
|
209
|
+
} elseif ($indent === \str_repeat(' ', \strlen($indent))) {
|
|
210
|
+
$this->useTabs = false;
|
|
211
|
+
$this->indentWidth = \strlen($indent);
|
|
212
|
+
} else {
|
|
213
|
+
throw new \LogicException('Option "indent" must either be all spaces or a single tab');
|
|
214
|
+
}
|
|
154
215
|
}
|
|
155
216
|
|
|
156
217
|
/**
|
|
157
218
|
* Reset pretty printing state.
|
|
158
219
|
*/
|
|
159
|
-
protected function resetState() {
|
|
220
|
+
protected function resetState(): void {
|
|
160
221
|
$this->indentLevel = 0;
|
|
161
|
-
$this->nl =
|
|
222
|
+
$this->nl = $this->newline;
|
|
162
223
|
$this->origTokens = null;
|
|
163
224
|
}
|
|
164
225
|
|
|
@@ -167,26 +228,31 @@ abstract class PrettyPrinterAbstract
|
|
|
167
228
|
*
|
|
168
229
|
* @param int $level Level in number of spaces
|
|
169
230
|
*/
|
|
170
|
-
protected function setIndentLevel(int $level) {
|
|
231
|
+
protected function setIndentLevel(int $level): void {
|
|
171
232
|
$this->indentLevel = $level;
|
|
172
|
-
$this->
|
|
233
|
+
if ($this->useTabs) {
|
|
234
|
+
$tabs = \intdiv($level, $this->tabWidth);
|
|
235
|
+
$spaces = $level % $this->tabWidth;
|
|
236
|
+
$this->nl = $this->newline . \str_repeat("\t", $tabs) . \str_repeat(' ', $spaces);
|
|
237
|
+
} else {
|
|
238
|
+
$this->nl = $this->newline . \str_repeat(' ', $level);
|
|
239
|
+
}
|
|
173
240
|
}
|
|
174
241
|
|
|
175
242
|
/**
|
|
176
243
|
* Increase indentation level.
|
|
177
244
|
*/
|
|
178
|
-
protected function indent() {
|
|
179
|
-
$this->indentLevel +=
|
|
180
|
-
$this->nl .=
|
|
245
|
+
protected function indent(): void {
|
|
246
|
+
$this->indentLevel += $this->indentWidth;
|
|
247
|
+
$this->nl .= $this->indent;
|
|
181
248
|
}
|
|
182
249
|
|
|
183
250
|
/**
|
|
184
251
|
* Decrease indentation level.
|
|
185
252
|
*/
|
|
186
|
-
protected function outdent() {
|
|
187
|
-
assert($this->indentLevel >=
|
|
188
|
-
$this->indentLevel
|
|
189
|
-
$this->nl = "\n" . str_repeat(' ', $this->indentLevel);
|
|
253
|
+
protected function outdent(): void {
|
|
254
|
+
assert($this->indentLevel >= $this->indentWidth);
|
|
255
|
+
$this->setIndentLevel($this->indentLevel - $this->indentWidth);
|
|
190
256
|
}
|
|
191
257
|
|
|
192
258
|
/**
|
|
@@ -196,7 +262,7 @@ abstract class PrettyPrinterAbstract
|
|
|
196
262
|
*
|
|
197
263
|
* @return string Pretty printed statements
|
|
198
264
|
*/
|
|
199
|
-
public function prettyPrint(array $stmts)
|
|
265
|
+
public function prettyPrint(array $stmts): string {
|
|
200
266
|
$this->resetState();
|
|
201
267
|
$this->preprocessNodes($stmts);
|
|
202
268
|
|
|
@@ -210,7 +276,7 @@ abstract class PrettyPrinterAbstract
|
|
|
210
276
|
*
|
|
211
277
|
* @return string Pretty printed node
|
|
212
278
|
*/
|
|
213
|
-
public function prettyPrintExpr(Expr $node)
|
|
279
|
+
public function prettyPrintExpr(Expr $node): string {
|
|
214
280
|
$this->resetState();
|
|
215
281
|
return $this->handleMagicTokens($this->p($node));
|
|
216
282
|
}
|
|
@@ -222,15 +288,15 @@ abstract class PrettyPrinterAbstract
|
|
|
222
288
|
*
|
|
223
289
|
* @return string Pretty printed statements
|
|
224
290
|
*/
|
|
225
|
-
public function prettyPrintFile(array $stmts)
|
|
291
|
+
public function prettyPrintFile(array $stmts): string {
|
|
226
292
|
if (!$stmts) {
|
|
227
|
-
return "<?php
|
|
293
|
+
return "<?php" . $this->newline . $this->newline;
|
|
228
294
|
}
|
|
229
295
|
|
|
230
|
-
$p = "<?php
|
|
296
|
+
$p = "<?php" . $this->newline . $this->newline . $this->prettyPrint($stmts);
|
|
231
297
|
|
|
232
298
|
if ($stmts[0] instanceof Stmt\InlineHTML) {
|
|
233
|
-
$p = preg_replace('/^<\?php\s+\?>\n?/', '', $p);
|
|
299
|
+
$p = preg_replace('/^<\?php\s+\?>\r?\n?/', '', $p);
|
|
234
300
|
}
|
|
235
301
|
if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) {
|
|
236
302
|
$p = preg_replace('/<\?php$/', '', rtrim($p));
|
|
@@ -244,7 +310,7 @@ abstract class PrettyPrinterAbstract
|
|
|
244
310
|
*
|
|
245
311
|
* @param Node[] $nodes Array of nodes
|
|
246
312
|
*/
|
|
247
|
-
protected function preprocessNodes(array $nodes) {
|
|
313
|
+
protected function preprocessNodes(array $nodes): void {
|
|
248
314
|
/* We can use semicolon-namespaces unless there is a global namespace declaration */
|
|
249
315
|
$this->canUseSemicolonNamespaces = true;
|
|
250
316
|
foreach ($nodes as $node) {
|
|
@@ -256,15 +322,17 @@ abstract class PrettyPrinterAbstract
|
|
|
256
322
|
}
|
|
257
323
|
|
|
258
324
|
/**
|
|
259
|
-
* Handles (and removes)
|
|
260
|
-
*
|
|
261
|
-
* @param string $str
|
|
262
|
-
* @return string
|
|
325
|
+
* Handles (and removes) doc-string-end tokens.
|
|
263
326
|
*/
|
|
264
|
-
protected function handleMagicTokens(string $str)
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
327
|
+
protected function handleMagicTokens(string $str): string {
|
|
328
|
+
if ($this->docStringEndToken !== null) {
|
|
329
|
+
// Replace doc-string-end tokens with nothing or a newline
|
|
330
|
+
$str = str_replace(
|
|
331
|
+
$this->docStringEndToken . ';' . $this->newline,
|
|
332
|
+
';' . $this->newline,
|
|
333
|
+
$str);
|
|
334
|
+
$str = str_replace($this->docStringEndToken, $this->newline, $str);
|
|
335
|
+
}
|
|
268
336
|
|
|
269
337
|
return $str;
|
|
270
338
|
}
|
|
@@ -272,12 +340,12 @@ abstract class PrettyPrinterAbstract
|
|
|
272
340
|
/**
|
|
273
341
|
* Pretty prints an array of nodes (statements) and indents them optionally.
|
|
274
342
|
*
|
|
275
|
-
* @param Node[] $nodes
|
|
276
|
-
* @param bool
|
|
343
|
+
* @param Node[] $nodes Array of nodes
|
|
344
|
+
* @param bool $indent Whether to indent the printed nodes
|
|
277
345
|
*
|
|
278
346
|
* @return string Pretty printed statements
|
|
279
347
|
*/
|
|
280
|
-
protected function pStmts(array $nodes, bool $indent = true)
|
|
348
|
+
protected function pStmts(array $nodes, bool $indent = true): string {
|
|
281
349
|
if ($indent) {
|
|
282
350
|
$this->indent();
|
|
283
351
|
}
|
|
@@ -305,84 +373,96 @@ abstract class PrettyPrinterAbstract
|
|
|
305
373
|
/**
|
|
306
374
|
* Pretty-print an infix operation while taking precedence into account.
|
|
307
375
|
*
|
|
308
|
-
* @param string $class
|
|
309
|
-
* @param Node
|
|
376
|
+
* @param string $class Node class of operator
|
|
377
|
+
* @param Node $leftNode Left-hand side node
|
|
310
378
|
* @param string $operatorString String representation of the operator
|
|
311
|
-
* @param Node
|
|
379
|
+
* @param Node $rightNode Right-hand side node
|
|
380
|
+
* @param int $precedence Precedence of parent operator
|
|
381
|
+
* @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator
|
|
312
382
|
*
|
|
313
383
|
* @return string Pretty printed infix operation
|
|
314
384
|
*/
|
|
315
|
-
protected function pInfixOp(
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
385
|
+
protected function pInfixOp(
|
|
386
|
+
string $class, Node $leftNode, string $operatorString, Node $rightNode,
|
|
387
|
+
int $precedence, int $lhsPrecedence
|
|
388
|
+
): string {
|
|
389
|
+
list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class];
|
|
390
|
+
$prefix = '';
|
|
391
|
+
$suffix = '';
|
|
392
|
+
if ($opPrecedence >= $precedence) {
|
|
393
|
+
$prefix = '(';
|
|
394
|
+
$suffix = ')';
|
|
395
|
+
$lhsPrecedence = self::MAX_PRECEDENCE;
|
|
396
|
+
}
|
|
397
|
+
return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS)
|
|
398
|
+
. $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix;
|
|
321
399
|
}
|
|
322
400
|
|
|
323
401
|
/**
|
|
324
402
|
* Pretty-print a prefix operation while taking precedence into account.
|
|
325
403
|
*
|
|
326
|
-
* @param string $class
|
|
404
|
+
* @param string $class Node class of operator
|
|
327
405
|
* @param string $operatorString String representation of the operator
|
|
328
|
-
* @param Node
|
|
406
|
+
* @param Node $node Node
|
|
407
|
+
* @param int $precedence Precedence of parent operator
|
|
408
|
+
* @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator
|
|
329
409
|
*
|
|
330
410
|
* @return string Pretty printed prefix operation
|
|
331
411
|
*/
|
|
332
|
-
protected function pPrefixOp(string $class, string $operatorString, Node $node)
|
|
333
|
-
|
|
334
|
-
|
|
412
|
+
protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string {
|
|
413
|
+
$opPrecedence = $this->precedenceMap[$class][0];
|
|
414
|
+
$prefix = '';
|
|
415
|
+
$suffix = '';
|
|
416
|
+
if ($opPrecedence >= $lhsPrecedence) {
|
|
417
|
+
$prefix = '(';
|
|
418
|
+
$suffix = ')';
|
|
419
|
+
$lhsPrecedence = self::MAX_PRECEDENCE;
|
|
420
|
+
}
|
|
421
|
+
$printedArg = $this->p($node, $opPrecedence, $lhsPrecedence);
|
|
422
|
+
if (($operatorString === '+' && $printedArg[0] === '+') ||
|
|
423
|
+
($operatorString === '-' && $printedArg[0] === '-')
|
|
424
|
+
) {
|
|
425
|
+
// Avoid printing +(+$a) as ++$a and similar.
|
|
426
|
+
$printedArg = '(' . $printedArg . ')';
|
|
427
|
+
}
|
|
428
|
+
return $prefix . $operatorString . $printedArg . $suffix;
|
|
335
429
|
}
|
|
336
430
|
|
|
337
431
|
/**
|
|
338
432
|
* Pretty-print a postfix operation while taking precedence into account.
|
|
339
433
|
*
|
|
340
|
-
* @param string $class
|
|
434
|
+
* @param string $class Node class of operator
|
|
341
435
|
* @param string $operatorString String representation of the operator
|
|
342
|
-
* @param Node
|
|
436
|
+
* @param Node $node Node
|
|
437
|
+
* @param int $precedence Precedence of parent operator
|
|
438
|
+
* @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator
|
|
343
439
|
*
|
|
344
440
|
* @return string Pretty printed postfix operation
|
|
345
441
|
*/
|
|
346
|
-
protected function pPostfixOp(string $class, Node $node, string $operatorString)
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
* @param Node $node Node to pretty print
|
|
355
|
-
* @param int $parentPrecedence Precedence of the parent operator
|
|
356
|
-
* @param int $parentAssociativity Associativity of parent operator
|
|
357
|
-
* (-1 is left, 0 is nonassoc, 1 is right)
|
|
358
|
-
* @param int $childPosition Position of the node relative to the operator
|
|
359
|
-
* (-1 is left, 1 is right)
|
|
360
|
-
*
|
|
361
|
-
* @return string The pretty printed node
|
|
362
|
-
*/
|
|
363
|
-
protected function pPrec(Node $node, int $parentPrecedence, int $parentAssociativity, int $childPosition) : string {
|
|
364
|
-
$class = \get_class($node);
|
|
365
|
-
if (isset($this->precedenceMap[$class])) {
|
|
366
|
-
$childPrecedence = $this->precedenceMap[$class][0];
|
|
367
|
-
if ($childPrecedence > $parentPrecedence
|
|
368
|
-
|| ($parentPrecedence === $childPrecedence && $parentAssociativity !== $childPosition)
|
|
369
|
-
) {
|
|
370
|
-
return '(' . $this->p($node) . ')';
|
|
371
|
-
}
|
|
442
|
+
protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string {
|
|
443
|
+
$opPrecedence = $this->precedenceMap[$class][0];
|
|
444
|
+
$prefix = '';
|
|
445
|
+
$suffix = '';
|
|
446
|
+
if ($opPrecedence >= $precedence) {
|
|
447
|
+
$prefix = '(';
|
|
448
|
+
$suffix = ')';
|
|
449
|
+
$lhsPrecedence = self::MAX_PRECEDENCE;
|
|
372
450
|
}
|
|
373
|
-
|
|
374
|
-
|
|
451
|
+
if ($opPrecedence < $lhsPrecedence) {
|
|
452
|
+
$lhsPrecedence = $opPrecedence;
|
|
453
|
+
}
|
|
454
|
+
return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix;
|
|
375
455
|
}
|
|
376
456
|
|
|
377
457
|
/**
|
|
378
458
|
* Pretty prints an array of nodes and implodes the printed values.
|
|
379
459
|
*
|
|
380
460
|
* @param Node[] $nodes Array of Nodes to be printed
|
|
381
|
-
* @param string $glue
|
|
461
|
+
* @param string $glue Character to implode with
|
|
382
462
|
*
|
|
383
|
-
* @return string Imploded pretty printed nodes
|
|
463
|
+
* @return string Imploded pretty printed nodes> $pre
|
|
384
464
|
*/
|
|
385
|
-
protected function pImplode(array $nodes, string $glue = '')
|
|
465
|
+
protected function pImplode(array $nodes, string $glue = ''): string {
|
|
386
466
|
$pNodes = [];
|
|
387
467
|
foreach ($nodes as $node) {
|
|
388
468
|
if (null === $node) {
|
|
@@ -402,7 +482,7 @@ abstract class PrettyPrinterAbstract
|
|
|
402
482
|
*
|
|
403
483
|
* @return string Comma separated pretty printed nodes
|
|
404
484
|
*/
|
|
405
|
-
protected function pCommaSeparated(array $nodes)
|
|
485
|
+
protected function pCommaSeparated(array $nodes): string {
|
|
406
486
|
return $this->pImplode($nodes, ', ');
|
|
407
487
|
}
|
|
408
488
|
|
|
@@ -411,12 +491,12 @@ abstract class PrettyPrinterAbstract
|
|
|
411
491
|
*
|
|
412
492
|
* The result includes a leading newline and one level of indentation (same as pStmts).
|
|
413
493
|
*
|
|
414
|
-
* @param Node[] $nodes
|
|
415
|
-
* @param bool
|
|
494
|
+
* @param Node[] $nodes Array of Nodes to be printed
|
|
495
|
+
* @param bool $trailingComma Whether to use a trailing comma
|
|
416
496
|
*
|
|
417
497
|
* @return string Comma separated pretty printed nodes in multiline style
|
|
418
498
|
*/
|
|
419
|
-
protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma)
|
|
499
|
+
protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string {
|
|
420
500
|
$this->indent();
|
|
421
501
|
|
|
422
502
|
$result = '';
|
|
@@ -448,7 +528,7 @@ abstract class PrettyPrinterAbstract
|
|
|
448
528
|
*
|
|
449
529
|
* @return string Reformatted text of comments
|
|
450
530
|
*/
|
|
451
|
-
protected function pComments(array $comments)
|
|
531
|
+
protected function pComments(array $comments): string {
|
|
452
532
|
$formattedComments = [];
|
|
453
533
|
|
|
454
534
|
foreach ($comments as $comment) {
|
|
@@ -469,13 +549,11 @@ abstract class PrettyPrinterAbstract
|
|
|
469
549
|
* * The CloningVisitor must be run on the AST prior to modification.
|
|
470
550
|
* * The original tokens must be provided, using the getTokens() method on the lexer.
|
|
471
551
|
*
|
|
472
|
-
* @param Node[] $stmts
|
|
473
|
-
* @param Node[] $origStmts
|
|
474
|
-
* @param
|
|
475
|
-
*
|
|
476
|
-
* @return string
|
|
552
|
+
* @param Node[] $stmts Modified AST with links to original AST
|
|
553
|
+
* @param Node[] $origStmts Original AST with token offset information
|
|
554
|
+
* @param Token[] $origTokens Tokens of the original code
|
|
477
555
|
*/
|
|
478
|
-
public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens)
|
|
556
|
+
public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string {
|
|
479
557
|
$this->initializeNodeListDiffer();
|
|
480
558
|
$this->initializeLabelCharMap();
|
|
481
559
|
$this->initializeFixupMap();
|
|
@@ -486,25 +564,25 @@ abstract class PrettyPrinterAbstract
|
|
|
486
564
|
$this->initializeModifierChangeMap();
|
|
487
565
|
|
|
488
566
|
$this->resetState();
|
|
489
|
-
$this->origTokens = new TokenStream($origTokens);
|
|
567
|
+
$this->origTokens = new TokenStream($origTokens, $this->tabWidth);
|
|
490
568
|
|
|
491
569
|
$this->preprocessNodes($stmts);
|
|
492
570
|
|
|
493
571
|
$pos = 0;
|
|
494
572
|
$result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null);
|
|
495
573
|
if (null !== $result) {
|
|
496
|
-
$result .= $this->origTokens->getTokenCode($pos, count($origTokens), 0);
|
|
574
|
+
$result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0);
|
|
497
575
|
} else {
|
|
498
576
|
// Fallback
|
|
499
577
|
// TODO Add <?php properly
|
|
500
|
-
$result = "<?php
|
|
578
|
+
$result = "<?php" . $this->newline . $this->pStmts($stmts, false);
|
|
501
579
|
}
|
|
502
580
|
|
|
503
|
-
return
|
|
581
|
+
return $this->handleMagicTokens($result);
|
|
504
582
|
}
|
|
505
583
|
|
|
506
|
-
protected function pFallback(Node $node) {
|
|
507
|
-
return $this->{'p' . $node->getType()}($node);
|
|
584
|
+
protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string {
|
|
585
|
+
return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence);
|
|
508
586
|
}
|
|
509
587
|
|
|
510
588
|
/**
|
|
@@ -513,20 +591,25 @@ abstract class PrettyPrinterAbstract
|
|
|
513
591
|
* This method also handles formatting preservation for nodes.
|
|
514
592
|
*
|
|
515
593
|
* @param Node $node Node to be pretty printed
|
|
594
|
+
* @param int $precedence Precedence of parent operator
|
|
595
|
+
* @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator
|
|
516
596
|
* @param bool $parentFormatPreserved Whether parent node has preserved formatting
|
|
517
597
|
*
|
|
518
598
|
* @return string Pretty printed node
|
|
519
599
|
*/
|
|
520
|
-
protected function p(
|
|
600
|
+
protected function p(
|
|
601
|
+
Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE,
|
|
602
|
+
bool $parentFormatPreserved = false
|
|
603
|
+
): string {
|
|
521
604
|
// No orig tokens means this is a normal pretty print without preservation of formatting
|
|
522
605
|
if (!$this->origTokens) {
|
|
523
|
-
return $this->{'p' . $node->getType()}($node);
|
|
606
|
+
return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence);
|
|
524
607
|
}
|
|
525
608
|
|
|
526
|
-
/** @var Node $origNode */
|
|
609
|
+
/** @var Node|null $origNode */
|
|
527
610
|
$origNode = $node->getAttribute('origNode');
|
|
528
611
|
if (null === $origNode) {
|
|
529
|
-
return $this->pFallback($node);
|
|
612
|
+
return $this->pFallback($node, $precedence, $lhsPrecedence);
|
|
530
613
|
}
|
|
531
614
|
|
|
532
615
|
$class = \get_class($node);
|
|
@@ -539,15 +622,17 @@ abstract class PrettyPrinterAbstract
|
|
|
539
622
|
$fallbackNode = $node;
|
|
540
623
|
if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) {
|
|
541
624
|
// Normalize node structure of anonymous classes
|
|
625
|
+
assert($origNode instanceof Expr\New_);
|
|
542
626
|
$node = PrintableNewAnonClassNode::fromNewNode($node);
|
|
543
627
|
$origNode = PrintableNewAnonClassNode::fromNewNode($origNode);
|
|
628
|
+
$class = PrintableNewAnonClassNode::class;
|
|
544
629
|
}
|
|
545
630
|
|
|
546
631
|
// InlineHTML node does not contain closing and opening PHP tags. If the parent formatting
|
|
547
632
|
// is not preserved, then we need to use the fallback code to make sure the tags are
|
|
548
633
|
// printed.
|
|
549
634
|
if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) {
|
|
550
|
-
return $this->pFallback($fallbackNode);
|
|
635
|
+
return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence);
|
|
551
636
|
}
|
|
552
637
|
|
|
553
638
|
$indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos);
|
|
@@ -572,34 +657,27 @@ abstract class PrettyPrinterAbstract
|
|
|
572
657
|
if (is_array($subNode) && is_array($origSubNode)) {
|
|
573
658
|
// Array subnode changed, we might be able to reconstruct it
|
|
574
659
|
$listResult = $this->pArray(
|
|
575
|
-
$subNode, $origSubNode, $pos, $indentAdjustment, $
|
|
660
|
+
$subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName,
|
|
576
661
|
$fixupInfo[$subNodeName] ?? null
|
|
577
662
|
);
|
|
578
663
|
if (null === $listResult) {
|
|
579
|
-
return $this->pFallback($fallbackNode);
|
|
664
|
+
return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence);
|
|
580
665
|
}
|
|
581
666
|
|
|
582
667
|
$result .= $listResult;
|
|
583
668
|
continue;
|
|
584
669
|
}
|
|
585
670
|
|
|
586
|
-
if
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
return $this->pFallback($fallbackNode);
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
$findToken = $this->modifierChangeMap[$key];
|
|
594
|
-
$result .= $this->pModifiers($subNode);
|
|
595
|
-
$pos = $this->origTokens->findRight($pos, $findToken);
|
|
596
|
-
continue;
|
|
671
|
+
// Check if this is a modifier change
|
|
672
|
+
$key = $class . '->' . $subNodeName;
|
|
673
|
+
if (!isset($this->modifierChangeMap[$key])) {
|
|
674
|
+
return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence);
|
|
597
675
|
}
|
|
598
676
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
677
|
+
[$printFn, $findToken] = $this->modifierChangeMap[$key];
|
|
678
|
+
$result .= $this->$printFn($subNode);
|
|
679
|
+
$pos = $this->origTokens->findRight($pos, $findToken);
|
|
680
|
+
continue;
|
|
603
681
|
}
|
|
604
682
|
|
|
605
683
|
$extraLeft = '';
|
|
@@ -617,7 +695,7 @@ abstract class PrettyPrinterAbstract
|
|
|
617
695
|
// A node has been inserted, check if we have insertion information for it
|
|
618
696
|
$key = $type . '->' . $subNodeName;
|
|
619
697
|
if (!isset($this->insertionMap[$key])) {
|
|
620
|
-
return $this->pFallback($fallbackNode);
|
|
698
|
+
return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence);
|
|
621
699
|
}
|
|
622
700
|
|
|
623
701
|
list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key];
|
|
@@ -639,7 +717,7 @@ abstract class PrettyPrinterAbstract
|
|
|
639
717
|
// A node has been removed, check if we have removal information for it
|
|
640
718
|
$key = $type . '->' . $subNodeName;
|
|
641
719
|
if (!isset($this->removalMap[$key])) {
|
|
642
|
-
return $this->pFallback($fallbackNode);
|
|
720
|
+
return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence);
|
|
643
721
|
}
|
|
644
722
|
|
|
645
723
|
// Adjust positions to account for additional tokens that must be skipped
|
|
@@ -658,7 +736,7 @@ abstract class PrettyPrinterAbstract
|
|
|
658
736
|
$result .= $extraLeft;
|
|
659
737
|
|
|
660
738
|
$origIndentLevel = $this->indentLevel;
|
|
661
|
-
$this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment);
|
|
739
|
+
$this->setIndentLevel(max($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment, 0));
|
|
662
740
|
|
|
663
741
|
// If it's the same node that was previously in this position, it certainly doesn't
|
|
664
742
|
// need fixup. It's important to check this here, because our fixup checks are more
|
|
@@ -669,7 +747,7 @@ abstract class PrettyPrinterAbstract
|
|
|
669
747
|
$fixup = $fixupInfo[$subNodeName];
|
|
670
748
|
$res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos);
|
|
671
749
|
} else {
|
|
672
|
-
$res = $this->p($subNode, true);
|
|
750
|
+
$res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true);
|
|
673
751
|
}
|
|
674
752
|
|
|
675
753
|
$this->safeAppend($result, $res);
|
|
@@ -688,23 +766,23 @@ abstract class PrettyPrinterAbstract
|
|
|
688
766
|
/**
|
|
689
767
|
* Perform a format-preserving pretty print of an array.
|
|
690
768
|
*
|
|
691
|
-
* @param
|
|
692
|
-
* @param
|
|
693
|
-
* @param int
|
|
694
|
-
* @param int
|
|
695
|
-
* @param string
|
|
696
|
-
* @param string
|
|
697
|
-
* @param null|int
|
|
769
|
+
* @param Node[] $nodes New nodes
|
|
770
|
+
* @param Node[] $origNodes Original nodes
|
|
771
|
+
* @param int $pos Current token position (updated by reference)
|
|
772
|
+
* @param int $indentAdjustment Adjustment for indentation
|
|
773
|
+
* @param string $parentNodeClass Class of the containing node.
|
|
774
|
+
* @param string $subNodeName Name of array subnode.
|
|
775
|
+
* @param null|int $fixup Fixup information for array item nodes
|
|
698
776
|
*
|
|
699
777
|
* @return null|string Result of pretty print or null if cannot preserve formatting
|
|
700
778
|
*/
|
|
701
779
|
protected function pArray(
|
|
702
|
-
array
|
|
703
|
-
string $
|
|
704
|
-
) {
|
|
780
|
+
array $nodes, array $origNodes, int &$pos, int $indentAdjustment,
|
|
781
|
+
string $parentNodeClass, string $subNodeName, ?int $fixup
|
|
782
|
+
): ?string {
|
|
705
783
|
$diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes);
|
|
706
784
|
|
|
707
|
-
$mapKey = $
|
|
785
|
+
$mapKey = $parentNodeClass . '->' . $subNodeName;
|
|
708
786
|
$insertStr = $this->listInsertionMap[$mapKey] ?? null;
|
|
709
787
|
$isStmtList = $subNodeName === 'stmts';
|
|
710
788
|
|
|
@@ -735,9 +813,9 @@ abstract class PrettyPrinterAbstract
|
|
|
735
813
|
$result = '';
|
|
736
814
|
foreach ($diff as $i => $diffElem) {
|
|
737
815
|
$diffType = $diffElem->type;
|
|
738
|
-
/** @var Node|null $arrItem */
|
|
816
|
+
/** @var Node|string|null $arrItem */
|
|
739
817
|
$arrItem = $diffElem->new;
|
|
740
|
-
/** @var Node|null $origArrItem */
|
|
818
|
+
/** @var Node|string|null $origArrItem */
|
|
741
819
|
$origArrItem = $diffElem->old;
|
|
742
820
|
|
|
743
821
|
if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) {
|
|
@@ -761,7 +839,7 @@ abstract class PrettyPrinterAbstract
|
|
|
761
839
|
\assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos);
|
|
762
840
|
|
|
763
841
|
$origIndentLevel = $this->indentLevel;
|
|
764
|
-
$lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment;
|
|
842
|
+
$lastElemIndentLevel = max($this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment, 0);
|
|
765
843
|
$this->setIndentLevel($lastElemIndentLevel);
|
|
766
844
|
|
|
767
845
|
$comments = $arrItem->getComments();
|
|
@@ -776,9 +854,8 @@ abstract class PrettyPrinterAbstract
|
|
|
776
854
|
}
|
|
777
855
|
|
|
778
856
|
if ($skipRemovedNode) {
|
|
779
|
-
if ($isStmtList &&
|
|
780
|
-
|
|
781
|
-
// We'd remove the brace of a code block.
|
|
857
|
+
if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) {
|
|
858
|
+
// We'd remove an opening/closing PHP tag.
|
|
782
859
|
// TODO: Preserve formatting.
|
|
783
860
|
$this->setIndentLevel($origIndentLevel);
|
|
784
861
|
return null;
|
|
@@ -798,7 +875,7 @@ abstract class PrettyPrinterAbstract
|
|
|
798
875
|
}
|
|
799
876
|
}
|
|
800
877
|
|
|
801
|
-
$this->safeAppend($result, $this->p($delayedAddNode, true));
|
|
878
|
+
$this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true));
|
|
802
879
|
|
|
803
880
|
if ($insertNewline) {
|
|
804
881
|
$result .= $insertStr . $this->nl;
|
|
@@ -827,10 +904,17 @@ abstract class PrettyPrinterAbstract
|
|
|
827
904
|
return null;
|
|
828
905
|
}
|
|
829
906
|
|
|
907
|
+
if (!$arrItem instanceof Node) {
|
|
908
|
+
// We only support list insertion of nodes.
|
|
909
|
+
return null;
|
|
910
|
+
}
|
|
911
|
+
|
|
830
912
|
// We go multiline if the original code was multiline,
|
|
831
913
|
// or if it's an array item with a comment above it.
|
|
914
|
+
// Match always uses multiline formatting.
|
|
832
915
|
if ($insertStr === ', ' &&
|
|
833
|
-
($this->isMultiline($origNodes) || $arrItem->getComments()
|
|
916
|
+
($this->isMultiline($origNodes) || $arrItem->getComments() ||
|
|
917
|
+
$parentNodeClass === Expr\Match_::class)
|
|
834
918
|
) {
|
|
835
919
|
$insertStr = ',';
|
|
836
920
|
$insertNewline = true;
|
|
@@ -880,9 +964,8 @@ abstract class PrettyPrinterAbstract
|
|
|
880
964
|
$pos, $itemStartPos, $indentAdjustment);
|
|
881
965
|
$skipRemovedNode = true;
|
|
882
966
|
} else {
|
|
883
|
-
if ($isStmtList &&
|
|
884
|
-
|
|
885
|
-
// We'd remove the brace of a code block.
|
|
967
|
+
if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) {
|
|
968
|
+
// We'd remove an opening/closing PHP tag.
|
|
886
969
|
// TODO: Preserve formatting.
|
|
887
970
|
return null;
|
|
888
971
|
}
|
|
@@ -897,7 +980,7 @@ abstract class PrettyPrinterAbstract
|
|
|
897
980
|
if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) {
|
|
898
981
|
$res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos);
|
|
899
982
|
} else {
|
|
900
|
-
$res = $this->p($arrItem, true);
|
|
983
|
+
$res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true);
|
|
901
984
|
}
|
|
902
985
|
$this->safeAppend($result, $res);
|
|
903
986
|
|
|
@@ -931,7 +1014,7 @@ abstract class PrettyPrinterAbstract
|
|
|
931
1014
|
$result .= $this->nl;
|
|
932
1015
|
}
|
|
933
1016
|
}
|
|
934
|
-
$result .= $this->p($delayedAddNode, true);
|
|
1017
|
+
$result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true);
|
|
935
1018
|
$first = false;
|
|
936
1019
|
}
|
|
937
1020
|
$result .= $extraRight === "\n" ? $this->nl : $extraRight;
|
|
@@ -947,22 +1030,33 @@ abstract class PrettyPrinterAbstract
|
|
|
947
1030
|
* are required to preserve program semantics in a certain context (e.g. to maintain precedence
|
|
948
1031
|
* or because only certain expressions are allowed in certain places).
|
|
949
1032
|
*
|
|
950
|
-
* @param int
|
|
951
|
-
* @param Node
|
|
1033
|
+
* @param int $fixup Fixup type
|
|
1034
|
+
* @param Node $subNode Subnode to print
|
|
952
1035
|
* @param string|null $parentClass Class of parent node
|
|
953
|
-
* @param int
|
|
954
|
-
* @param int
|
|
1036
|
+
* @param int $subStartPos Original start pos of subnode
|
|
1037
|
+
* @param int $subEndPos Original end pos of subnode
|
|
955
1038
|
*
|
|
956
1039
|
* @return string Result of fixed-up print of subnode
|
|
957
1040
|
*/
|
|
958
|
-
protected function pFixup(int $fixup, Node $subNode, $parentClass, int $subStartPos, int $subEndPos)
|
|
1041
|
+
protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string {
|
|
959
1042
|
switch ($fixup) {
|
|
960
1043
|
case self::FIXUP_PREC_LEFT:
|
|
1044
|
+
// We use a conservative approximation where lhsPrecedence == precedence.
|
|
1045
|
+
if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) {
|
|
1046
|
+
$precedence = $this->precedenceMap[$parentClass][1];
|
|
1047
|
+
return $this->p($subNode, $precedence, $precedence);
|
|
1048
|
+
}
|
|
1049
|
+
break;
|
|
961
1050
|
case self::FIXUP_PREC_RIGHT:
|
|
962
1051
|
if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) {
|
|
963
|
-
|
|
964
|
-
return $this->
|
|
965
|
-
|
|
1052
|
+
$precedence = $this->precedenceMap[$parentClass][2];
|
|
1053
|
+
return $this->p($subNode, $precedence, $precedence);
|
|
1054
|
+
}
|
|
1055
|
+
break;
|
|
1056
|
+
case self::FIXUP_PREC_UNARY:
|
|
1057
|
+
if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) {
|
|
1058
|
+
$precedence = $this->precedenceMap[$parentClass][0];
|
|
1059
|
+
return $this->p($subNode, $precedence, $precedence);
|
|
966
1060
|
}
|
|
967
1061
|
break;
|
|
968
1062
|
case self::FIXUP_CALL_LHS:
|
|
@@ -1002,7 +1096,7 @@ abstract class PrettyPrinterAbstract
|
|
|
1002
1096
|
}
|
|
1003
1097
|
break;
|
|
1004
1098
|
case self::FIXUP_ENCAPSED:
|
|
1005
|
-
if (!$subNode instanceof
|
|
1099
|
+
if (!$subNode instanceof Node\InterpolatedStringPart
|
|
1006
1100
|
&& !$this->origTokens->haveBraces($subStartPos, $subEndPos)
|
|
1007
1101
|
) {
|
|
1008
1102
|
return '{' . $this->p($subNode) . '}';
|
|
@@ -1021,11 +1115,8 @@ abstract class PrettyPrinterAbstract
|
|
|
1021
1115
|
*
|
|
1022
1116
|
* Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x".
|
|
1023
1117
|
* Without safeAppend the result would be "echox", which does not preserve semantics.
|
|
1024
|
-
*
|
|
1025
|
-
* @param string $str
|
|
1026
|
-
* @param string $append
|
|
1027
1118
|
*/
|
|
1028
|
-
protected function safeAppend(string &$str, string $append) {
|
|
1119
|
+
protected function safeAppend(string &$str, string $append): void {
|
|
1029
1120
|
if ($str === "") {
|
|
1030
1121
|
$str = $append;
|
|
1031
1122
|
return;
|
|
@@ -1050,7 +1141,7 @@ abstract class PrettyPrinterAbstract
|
|
|
1050
1141
|
*
|
|
1051
1142
|
* @return bool Whether parentheses are required
|
|
1052
1143
|
*/
|
|
1053
|
-
protected function callLhsRequiresParens(Node $node)
|
|
1144
|
+
protected function callLhsRequiresParens(Node $node): bool {
|
|
1054
1145
|
return !($node instanceof Node\Name
|
|
1055
1146
|
|| $node instanceof Expr\Variable
|
|
1056
1147
|
|| $node instanceof Expr\ArrayDimFetch
|
|
@@ -1068,7 +1159,7 @@ abstract class PrettyPrinterAbstract
|
|
|
1068
1159
|
*
|
|
1069
1160
|
* @return bool Whether parentheses are required
|
|
1070
1161
|
*/
|
|
1071
|
-
protected function dereferenceLhsRequiresParens(Node $node)
|
|
1162
|
+
protected function dereferenceLhsRequiresParens(Node $node): bool {
|
|
1072
1163
|
// A constant can occur on the LHS of an array/object deref, but not a static deref.
|
|
1073
1164
|
return $this->staticDereferenceLhsRequiresParens($node)
|
|
1074
1165
|
&& !$node instanceof Expr\ConstFetch;
|
|
@@ -1126,14 +1217,21 @@ abstract class PrettyPrinterAbstract
|
|
|
1126
1217
|
*
|
|
1127
1218
|
* @return string Printed modifiers
|
|
1128
1219
|
*/
|
|
1129
|
-
protected function pModifiers(int $modifiers) {
|
|
1130
|
-
return ($modifiers &
|
|
1131
|
-
. ($modifiers &
|
|
1132
|
-
. ($modifiers &
|
|
1133
|
-
. ($modifiers &
|
|
1134
|
-
. ($modifiers &
|
|
1135
|
-
. ($modifiers &
|
|
1136
|
-
. ($modifiers &
|
|
1220
|
+
protected function pModifiers(int $modifiers): string {
|
|
1221
|
+
return ($modifiers & Modifiers::FINAL ? 'final ' : '')
|
|
1222
|
+
. ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '')
|
|
1223
|
+
. ($modifiers & Modifiers::PUBLIC ? 'public ' : '')
|
|
1224
|
+
. ($modifiers & Modifiers::PROTECTED ? 'protected ' : '')
|
|
1225
|
+
. ($modifiers & Modifiers::PRIVATE ? 'private ' : '')
|
|
1226
|
+
. ($modifiers & Modifiers::PUBLIC_SET ? 'public(set) ' : '')
|
|
1227
|
+
. ($modifiers & Modifiers::PROTECTED_SET ? 'protected(set) ' : '')
|
|
1228
|
+
. ($modifiers & Modifiers::PRIVATE_SET ? 'private(set) ' : '')
|
|
1229
|
+
. ($modifiers & Modifiers::STATIC ? 'static ' : '')
|
|
1230
|
+
. ($modifiers & Modifiers::READONLY ? 'readonly ' : '');
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
protected function pStatic(bool $static): string {
|
|
1234
|
+
return $static ? 'static ' : '';
|
|
1137
1235
|
}
|
|
1138
1236
|
|
|
1139
1237
|
/**
|
|
@@ -1143,7 +1241,7 @@ abstract class PrettyPrinterAbstract
|
|
|
1143
1241
|
*
|
|
1144
1242
|
* @return bool Whether multiline formatting is used
|
|
1145
1243
|
*/
|
|
1146
|
-
protected function isMultiline(array $nodes)
|
|
1244
|
+
protected function isMultiline(array $nodes): bool {
|
|
1147
1245
|
if (\count($nodes) < 2) {
|
|
1148
1246
|
return false;
|
|
1149
1247
|
}
|
|
@@ -1175,15 +1273,19 @@ abstract class PrettyPrinterAbstract
|
|
|
1175
1273
|
*
|
|
1176
1274
|
* The label char map determines whether a certain character may occur in a label.
|
|
1177
1275
|
*/
|
|
1178
|
-
protected function initializeLabelCharMap() {
|
|
1179
|
-
if ($this->labelCharMap)
|
|
1276
|
+
protected function initializeLabelCharMap(): void {
|
|
1277
|
+
if (isset($this->labelCharMap)) {
|
|
1278
|
+
return;
|
|
1279
|
+
}
|
|
1180
1280
|
|
|
1181
1281
|
$this->labelCharMap = [];
|
|
1182
1282
|
for ($i = 0; $i < 256; $i++) {
|
|
1183
|
-
// Since PHP 7.1 The lower range is 0x80. However, we also want to support code for
|
|
1184
|
-
// older versions.
|
|
1185
1283
|
$chr = chr($i);
|
|
1186
|
-
$this->labelCharMap[$chr] = $i >=
|
|
1284
|
+
$this->labelCharMap[$chr] = $i >= 0x80 || ctype_alnum($chr);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
if ($this->phpVersion->allowsDelInIdentifiers()) {
|
|
1288
|
+
$this->labelCharMap["\x7f"] = true;
|
|
1187
1289
|
}
|
|
1188
1290
|
}
|
|
1189
1291
|
|
|
@@ -1192,8 +1294,10 @@ abstract class PrettyPrinterAbstract
|
|
|
1192
1294
|
*
|
|
1193
1295
|
* The node list differ is used to determine differences between two array subnodes.
|
|
1194
1296
|
*/
|
|
1195
|
-
protected function initializeNodeListDiffer() {
|
|
1196
|
-
if ($this->nodeListDiffer)
|
|
1297
|
+
protected function initializeNodeListDiffer(): void {
|
|
1298
|
+
if (isset($this->nodeListDiffer)) {
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1197
1301
|
|
|
1198
1302
|
$this->nodeListDiffer = new Internal\Differ(function ($a, $b) {
|
|
1199
1303
|
if ($a instanceof Node && $b instanceof Node) {
|
|
@@ -1210,22 +1314,21 @@ abstract class PrettyPrinterAbstract
|
|
|
1210
1314
|
* The fixup map is used to determine whether a certain subnode of a certain node may require
|
|
1211
1315
|
* some kind of "fixup" operation, e.g. the addition of parenthesis or braces.
|
|
1212
1316
|
*/
|
|
1213
|
-
protected function initializeFixupMap() {
|
|
1214
|
-
if ($this->fixupMap)
|
|
1317
|
+
protected function initializeFixupMap(): void {
|
|
1318
|
+
if (isset($this->fixupMap)) {
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1215
1321
|
|
|
1216
1322
|
$this->fixupMap = [
|
|
1217
|
-
Expr\PreInc::class => ['var' => self::FIXUP_PREC_RIGHT],
|
|
1218
|
-
Expr\PreDec::class => ['var' => self::FIXUP_PREC_RIGHT],
|
|
1219
|
-
Expr\PostInc::class => ['var' => self::FIXUP_PREC_LEFT],
|
|
1220
|
-
Expr\PostDec::class => ['var' => self::FIXUP_PREC_LEFT],
|
|
1221
1323
|
Expr\Instanceof_::class => [
|
|
1222
|
-
'expr' => self::
|
|
1324
|
+
'expr' => self::FIXUP_PREC_UNARY,
|
|
1223
1325
|
'class' => self::FIXUP_NEW,
|
|
1224
1326
|
],
|
|
1225
1327
|
Expr\Ternary::class => [
|
|
1226
1328
|
'cond' => self::FIXUP_PREC_LEFT,
|
|
1227
1329
|
'else' => self::FIXUP_PREC_RIGHT,
|
|
1228
1330
|
],
|
|
1331
|
+
Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY],
|
|
1229
1332
|
|
|
1230
1333
|
Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS],
|
|
1231
1334
|
Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS],
|
|
@@ -1255,7 +1358,7 @@ abstract class PrettyPrinterAbstract
|
|
|
1255
1358
|
'var' => self::FIXUP_DEREF_LHS,
|
|
1256
1359
|
'name' => self::FIXUP_BRACED_NAME,
|
|
1257
1360
|
],
|
|
1258
|
-
Scalar\
|
|
1361
|
+
Scalar\InterpolatedString::class => [
|
|
1259
1362
|
'parts' => self::FIXUP_ENCAPSED,
|
|
1260
1363
|
],
|
|
1261
1364
|
];
|
|
@@ -1278,27 +1381,19 @@ abstract class PrettyPrinterAbstract
|
|
|
1278
1381
|
];
|
|
1279
1382
|
}
|
|
1280
1383
|
|
|
1281
|
-
$assignOps = [
|
|
1282
|
-
Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class,
|
|
1283
|
-
AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class,
|
|
1284
|
-
AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class,
|
|
1285
|
-
AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class
|
|
1286
|
-
];
|
|
1287
|
-
foreach ($assignOps as $assignOp) {
|
|
1288
|
-
$this->fixupMap[$assignOp] = [
|
|
1289
|
-
'var' => self::FIXUP_PREC_LEFT,
|
|
1290
|
-
'expr' => self::FIXUP_PREC_RIGHT,
|
|
1291
|
-
];
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
1384
|
$prefixOps = [
|
|
1295
|
-
Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class,
|
|
1385
|
+
Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class,
|
|
1296
1386
|
Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class,
|
|
1297
1387
|
Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class,
|
|
1298
1388
|
Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class,
|
|
1389
|
+
Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class,
|
|
1390
|
+
AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class,
|
|
1391
|
+
AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class,
|
|
1392
|
+
AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class,
|
|
1393
|
+
Expr\ArrowFunction::class, Expr\Throw_::class,
|
|
1299
1394
|
];
|
|
1300
1395
|
foreach ($prefixOps as $prefixOp) {
|
|
1301
|
-
$this->fixupMap[$prefixOp] = ['expr' => self::
|
|
1396
|
+
$this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY];
|
|
1302
1397
|
}
|
|
1303
1398
|
}
|
|
1304
1399
|
|
|
@@ -1308,8 +1403,10 @@ abstract class PrettyPrinterAbstract
|
|
|
1308
1403
|
* The removal map is used to determine which additional tokens should be removed when a
|
|
1309
1404
|
* certain node is replaced by null.
|
|
1310
1405
|
*/
|
|
1311
|
-
protected function initializeRemovalMap() {
|
|
1312
|
-
if ($this->removalMap)
|
|
1406
|
+
protected function initializeRemovalMap(): void {
|
|
1407
|
+
if (isset($this->removalMap)) {
|
|
1408
|
+
return;
|
|
1409
|
+
}
|
|
1313
1410
|
|
|
1314
1411
|
$stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE];
|
|
1315
1412
|
$stripLeft = ['left' => \T_WHITESPACE];
|
|
@@ -1319,7 +1416,7 @@ abstract class PrettyPrinterAbstract
|
|
|
1319
1416
|
$stripEquals = ['left' => '='];
|
|
1320
1417
|
$this->removalMap = [
|
|
1321
1418
|
'Expr_ArrayDimFetch->dim' => $stripBoth,
|
|
1322
|
-
'
|
|
1419
|
+
'ArrayItem->key' => $stripDoubleArrow,
|
|
1323
1420
|
'Expr_ArrowFunction->returnType' => $stripColon,
|
|
1324
1421
|
'Expr_Closure->returnType' => $stripColon,
|
|
1325
1422
|
'Expr_Exit->expr' => $stripBoth,
|
|
@@ -1342,7 +1439,7 @@ abstract class PrettyPrinterAbstract
|
|
|
1342
1439
|
'Stmt_If->else' => $stripLeft,
|
|
1343
1440
|
'Stmt_Namespace->name' => $stripLeft,
|
|
1344
1441
|
'Stmt_Property->type' => $stripRight,
|
|
1345
|
-
'
|
|
1442
|
+
'PropertyItem->default' => $stripEquals,
|
|
1346
1443
|
'Stmt_Return->expr' => $stripBoth,
|
|
1347
1444
|
'Stmt_StaticVar->default' => $stripEquals,
|
|
1348
1445
|
'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft,
|
|
@@ -1354,16 +1451,18 @@ abstract class PrettyPrinterAbstract
|
|
|
1354
1451
|
];
|
|
1355
1452
|
}
|
|
1356
1453
|
|
|
1357
|
-
protected function initializeInsertionMap() {
|
|
1358
|
-
if ($this->insertionMap)
|
|
1454
|
+
protected function initializeInsertionMap(): void {
|
|
1455
|
+
if (isset($this->insertionMap)) {
|
|
1456
|
+
return;
|
|
1457
|
+
}
|
|
1359
1458
|
|
|
1360
1459
|
// TODO: "yield" where both key and value are inserted doesn't work
|
|
1361
1460
|
// [$find, $beforeToken, $extraLeft, $extraRight]
|
|
1362
1461
|
$this->insertionMap = [
|
|
1363
1462
|
'Expr_ArrayDimFetch->dim' => ['[', false, null, null],
|
|
1364
|
-
'
|
|
1365
|
-
'Expr_ArrowFunction->returnType' => [')', false, '
|
|
1366
|
-
'Expr_Closure->returnType' => [')', false, '
|
|
1463
|
+
'ArrayItem->key' => [null, false, null, ' => '],
|
|
1464
|
+
'Expr_ArrowFunction->returnType' => [')', false, ': ', null],
|
|
1465
|
+
'Expr_Closure->returnType' => [')', false, ': ', null],
|
|
1367
1466
|
'Expr_Ternary->if' => ['?', false, ' ', ' '],
|
|
1368
1467
|
'Expr_Yield->key' => [\T_YIELD, false, null, ' => '],
|
|
1369
1468
|
'Expr_Yield->value' => [\T_YIELD, false, ' ', null],
|
|
@@ -1371,19 +1470,19 @@ abstract class PrettyPrinterAbstract
|
|
|
1371
1470
|
'Param->default' => [null, false, ' = ', null],
|
|
1372
1471
|
'Stmt_Break->num' => [\T_BREAK, false, ' ', null],
|
|
1373
1472
|
'Stmt_Catch->var' => [null, false, ' ', null],
|
|
1374
|
-
'Stmt_ClassMethod->returnType' => [')', false, '
|
|
1473
|
+
'Stmt_ClassMethod->returnType' => [')', false, ': ', null],
|
|
1375
1474
|
'Stmt_ClassConst->type' => [\T_CONST, false, ' ', null],
|
|
1376
1475
|
'Stmt_Class->extends' => [null, false, ' extends ', null],
|
|
1377
1476
|
'Stmt_Enum->scalarType' => [null, false, ' : ', null],
|
|
1378
1477
|
'Stmt_EnumCase->expr' => [null, false, ' = ', null],
|
|
1379
|
-
'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null],
|
|
1478
|
+
'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null],
|
|
1380
1479
|
'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null],
|
|
1381
1480
|
'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '],
|
|
1382
|
-
'Stmt_Function->returnType' => [')', false, '
|
|
1481
|
+
'Stmt_Function->returnType' => [')', false, ': ', null],
|
|
1383
1482
|
'Stmt_If->else' => [null, false, ' ', null],
|
|
1384
1483
|
'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null],
|
|
1385
1484
|
'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '],
|
|
1386
|
-
'
|
|
1485
|
+
'PropertyItem->default' => [null, false, ' = ', null],
|
|
1387
1486
|
'Stmt_Return->expr' => [\T_RETURN, false, ' ', null],
|
|
1388
1487
|
'Stmt_StaticVar->default' => [null, false, ' = ', null],
|
|
1389
1488
|
//'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO
|
|
@@ -1397,132 +1496,146 @@ abstract class PrettyPrinterAbstract
|
|
|
1397
1496
|
];
|
|
1398
1497
|
}
|
|
1399
1498
|
|
|
1400
|
-
protected function initializeListInsertionMap() {
|
|
1401
|
-
if ($this->listInsertionMap)
|
|
1499
|
+
protected function initializeListInsertionMap(): void {
|
|
1500
|
+
if (isset($this->listInsertionMap)) {
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1402
1503
|
|
|
1403
1504
|
$this->listInsertionMap = [
|
|
1404
1505
|
// special
|
|
1405
1506
|
//'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully
|
|
1406
|
-
//'
|
|
1407
|
-
'
|
|
1408
|
-
'
|
|
1409
|
-
'
|
|
1410
|
-
'
|
|
1411
|
-
'
|
|
1507
|
+
//'Scalar_InterpolatedString->parts' => '',
|
|
1508
|
+
Stmt\Catch_::class . '->types' => '|',
|
|
1509
|
+
UnionType::class . '->types' => '|',
|
|
1510
|
+
IntersectionType::class . '->types' => '&',
|
|
1511
|
+
Stmt\If_::class . '->elseifs' => ' ',
|
|
1512
|
+
Stmt\TryCatch::class . '->catches' => ' ',
|
|
1412
1513
|
|
|
1413
1514
|
// comma-separated lists
|
|
1414
|
-
'
|
|
1415
|
-
'
|
|
1416
|
-
'
|
|
1417
|
-
'
|
|
1418
|
-
'
|
|
1419
|
-
'
|
|
1420
|
-
'
|
|
1421
|
-
'
|
|
1422
|
-
'
|
|
1423
|
-
'
|
|
1424
|
-
'
|
|
1425
|
-
'
|
|
1426
|
-
'
|
|
1427
|
-
'
|
|
1428
|
-
'
|
|
1429
|
-
'
|
|
1430
|
-
'
|
|
1431
|
-
'
|
|
1432
|
-
'
|
|
1433
|
-
'
|
|
1434
|
-
'
|
|
1435
|
-
'
|
|
1436
|
-
'
|
|
1437
|
-
'
|
|
1438
|
-
'
|
|
1439
|
-
'
|
|
1440
|
-
'
|
|
1441
|
-
'
|
|
1442
|
-
'
|
|
1443
|
-
'
|
|
1444
|
-
'
|
|
1445
|
-
'
|
|
1446
|
-
'
|
|
1447
|
-
'
|
|
1448
|
-
'
|
|
1449
|
-
'
|
|
1515
|
+
Expr\Array_::class . '->items' => ', ',
|
|
1516
|
+
Expr\ArrowFunction::class . '->params' => ', ',
|
|
1517
|
+
Expr\Closure::class . '->params' => ', ',
|
|
1518
|
+
Expr\Closure::class . '->uses' => ', ',
|
|
1519
|
+
Expr\FuncCall::class . '->args' => ', ',
|
|
1520
|
+
Expr\Isset_::class . '->vars' => ', ',
|
|
1521
|
+
Expr\List_::class . '->items' => ', ',
|
|
1522
|
+
Expr\MethodCall::class . '->args' => ', ',
|
|
1523
|
+
Expr\NullsafeMethodCall::class . '->args' => ', ',
|
|
1524
|
+
Expr\New_::class . '->args' => ', ',
|
|
1525
|
+
PrintableNewAnonClassNode::class . '->args' => ', ',
|
|
1526
|
+
Expr\StaticCall::class . '->args' => ', ',
|
|
1527
|
+
Stmt\ClassConst::class . '->consts' => ', ',
|
|
1528
|
+
Stmt\ClassMethod::class . '->params' => ', ',
|
|
1529
|
+
Stmt\Class_::class . '->implements' => ', ',
|
|
1530
|
+
Stmt\Enum_::class . '->implements' => ', ',
|
|
1531
|
+
PrintableNewAnonClassNode::class . '->implements' => ', ',
|
|
1532
|
+
Stmt\Const_::class . '->consts' => ', ',
|
|
1533
|
+
Stmt\Declare_::class . '->declares' => ', ',
|
|
1534
|
+
Stmt\Echo_::class . '->exprs' => ', ',
|
|
1535
|
+
Stmt\For_::class . '->init' => ', ',
|
|
1536
|
+
Stmt\For_::class . '->cond' => ', ',
|
|
1537
|
+
Stmt\For_::class . '->loop' => ', ',
|
|
1538
|
+
Stmt\Function_::class . '->params' => ', ',
|
|
1539
|
+
Stmt\Global_::class . '->vars' => ', ',
|
|
1540
|
+
Stmt\GroupUse::class . '->uses' => ', ',
|
|
1541
|
+
Stmt\Interface_::class . '->extends' => ', ',
|
|
1542
|
+
Expr\Match_::class . '->arms' => ', ',
|
|
1543
|
+
Stmt\Property::class . '->props' => ', ',
|
|
1544
|
+
Stmt\StaticVar::class . '->vars' => ', ',
|
|
1545
|
+
Stmt\TraitUse::class . '->traits' => ', ',
|
|
1546
|
+
Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ',
|
|
1547
|
+
Stmt\Unset_::class . '->vars' => ', ',
|
|
1548
|
+
Stmt\UseUse::class . '->uses' => ', ',
|
|
1549
|
+
MatchArm::class . '->conds' => ', ',
|
|
1550
|
+
AttributeGroup::class . '->attrs' => ', ',
|
|
1551
|
+
PropertyHook::class . '->params' => ', ',
|
|
1450
1552
|
|
|
1451
1553
|
// statement lists
|
|
1452
|
-
'
|
|
1453
|
-
'
|
|
1454
|
-
'
|
|
1455
|
-
'
|
|
1456
|
-
'
|
|
1457
|
-
'
|
|
1458
|
-
'
|
|
1459
|
-
'
|
|
1460
|
-
'
|
|
1461
|
-
'
|
|
1462
|
-
'
|
|
1463
|
-
'
|
|
1464
|
-
'
|
|
1465
|
-
'
|
|
1466
|
-
'
|
|
1467
|
-
'
|
|
1468
|
-
'
|
|
1469
|
-
'
|
|
1470
|
-
'
|
|
1471
|
-
'
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
'
|
|
1475
|
-
'
|
|
1476
|
-
'
|
|
1477
|
-
'
|
|
1478
|
-
'
|
|
1479
|
-
'
|
|
1480
|
-
'
|
|
1481
|
-
'
|
|
1482
|
-
'
|
|
1483
|
-
'
|
|
1484
|
-
'
|
|
1485
|
-
'
|
|
1486
|
-
'
|
|
1487
|
-
'
|
|
1554
|
+
Expr\Closure::class . '->stmts' => "\n",
|
|
1555
|
+
Stmt\Case_::class . '->stmts' => "\n",
|
|
1556
|
+
Stmt\Catch_::class . '->stmts' => "\n",
|
|
1557
|
+
Stmt\Class_::class . '->stmts' => "\n",
|
|
1558
|
+
Stmt\Enum_::class . '->stmts' => "\n",
|
|
1559
|
+
PrintableNewAnonClassNode::class . '->stmts' => "\n",
|
|
1560
|
+
Stmt\Interface_::class . '->stmts' => "\n",
|
|
1561
|
+
Stmt\Trait_::class . '->stmts' => "\n",
|
|
1562
|
+
Stmt\ClassMethod::class . '->stmts' => "\n",
|
|
1563
|
+
Stmt\Declare_::class . '->stmts' => "\n",
|
|
1564
|
+
Stmt\Do_::class . '->stmts' => "\n",
|
|
1565
|
+
Stmt\ElseIf_::class . '->stmts' => "\n",
|
|
1566
|
+
Stmt\Else_::class . '->stmts' => "\n",
|
|
1567
|
+
Stmt\Finally_::class . '->stmts' => "\n",
|
|
1568
|
+
Stmt\Foreach_::class . '->stmts' => "\n",
|
|
1569
|
+
Stmt\For_::class . '->stmts' => "\n",
|
|
1570
|
+
Stmt\Function_::class . '->stmts' => "\n",
|
|
1571
|
+
Stmt\If_::class . '->stmts' => "\n",
|
|
1572
|
+
Stmt\Namespace_::class . '->stmts' => "\n",
|
|
1573
|
+
Stmt\Block::class . '->stmts' => "\n",
|
|
1574
|
+
|
|
1575
|
+
// Attribute groups
|
|
1576
|
+
Stmt\Class_::class . '->attrGroups' => "\n",
|
|
1577
|
+
Stmt\Enum_::class . '->attrGroups' => "\n",
|
|
1578
|
+
Stmt\EnumCase::class . '->attrGroups' => "\n",
|
|
1579
|
+
Stmt\Interface_::class . '->attrGroups' => "\n",
|
|
1580
|
+
Stmt\Trait_::class . '->attrGroups' => "\n",
|
|
1581
|
+
Stmt\Function_::class . '->attrGroups' => "\n",
|
|
1582
|
+
Stmt\ClassMethod::class . '->attrGroups' => "\n",
|
|
1583
|
+
Stmt\ClassConst::class . '->attrGroups' => "\n",
|
|
1584
|
+
Stmt\Property::class . '->attrGroups' => "\n",
|
|
1585
|
+
PrintableNewAnonClassNode::class . '->attrGroups' => ' ',
|
|
1586
|
+
Expr\Closure::class . '->attrGroups' => ' ',
|
|
1587
|
+
Expr\ArrowFunction::class . '->attrGroups' => ' ',
|
|
1588
|
+
Param::class . '->attrGroups' => ' ',
|
|
1589
|
+
PropertyHook::class . '->attrGroups' => ' ',
|
|
1590
|
+
|
|
1591
|
+
Stmt\Switch_::class . '->cases' => "\n",
|
|
1592
|
+
Stmt\TraitUse::class . '->adaptations' => "\n",
|
|
1593
|
+
Stmt\TryCatch::class . '->stmts' => "\n",
|
|
1594
|
+
Stmt\While_::class . '->stmts' => "\n",
|
|
1595
|
+
PropertyHook::class . '->body' => "\n",
|
|
1596
|
+
Stmt\Property::class . '->hooks' => "\n",
|
|
1597
|
+
Param::class . '->hooks' => "\n",
|
|
1488
1598
|
|
|
1489
1599
|
// dummy for top-level context
|
|
1490
1600
|
'File->stmts' => "\n",
|
|
1491
1601
|
];
|
|
1492
1602
|
}
|
|
1493
1603
|
|
|
1494
|
-
protected function initializeEmptyListInsertionMap() {
|
|
1495
|
-
if ($this->emptyListInsertionMap)
|
|
1604
|
+
protected function initializeEmptyListInsertionMap(): void {
|
|
1605
|
+
if (isset($this->emptyListInsertionMap)) {
|
|
1606
|
+
return;
|
|
1607
|
+
}
|
|
1496
1608
|
|
|
1497
1609
|
// TODO Insertion into empty statement lists.
|
|
1498
1610
|
|
|
1499
1611
|
// [$find, $extraLeft, $extraRight]
|
|
1500
1612
|
$this->emptyListInsertionMap = [
|
|
1501
|
-
'
|
|
1502
|
-
'
|
|
1503
|
-
'
|
|
1504
|
-
'
|
|
1505
|
-
'
|
|
1506
|
-
'
|
|
1507
|
-
'
|
|
1508
|
-
'
|
|
1509
|
-
'
|
|
1510
|
-
'
|
|
1511
|
-
'
|
|
1512
|
-
'
|
|
1513
|
-
'
|
|
1514
|
-
'
|
|
1515
|
-
'
|
|
1516
|
-
'
|
|
1517
|
-
'
|
|
1518
|
-
'
|
|
1519
|
-
'
|
|
1520
|
-
'
|
|
1521
|
-
'
|
|
1522
|
-
'
|
|
1523
|
-
'
|
|
1524
|
-
'
|
|
1525
|
-
'
|
|
1613
|
+
Expr\ArrowFunction::class . '->params' => ['(', '', ''],
|
|
1614
|
+
Expr\Closure::class . '->uses' => [')', ' use (', ')'],
|
|
1615
|
+
Expr\Closure::class . '->params' => ['(', '', ''],
|
|
1616
|
+
Expr\FuncCall::class . '->args' => ['(', '', ''],
|
|
1617
|
+
Expr\MethodCall::class . '->args' => ['(', '', ''],
|
|
1618
|
+
Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''],
|
|
1619
|
+
Expr\New_::class . '->args' => ['(', '', ''],
|
|
1620
|
+
PrintableNewAnonClassNode::class . '->args' => ['(', '', ''],
|
|
1621
|
+
PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''],
|
|
1622
|
+
Expr\StaticCall::class . '->args' => ['(', '', ''],
|
|
1623
|
+
Stmt\Class_::class . '->implements' => [null, ' implements ', ''],
|
|
1624
|
+
Stmt\Enum_::class . '->implements' => [null, ' implements ', ''],
|
|
1625
|
+
Stmt\ClassMethod::class . '->params' => ['(', '', ''],
|
|
1626
|
+
Stmt\Interface_::class . '->extends' => [null, ' extends ', ''],
|
|
1627
|
+
Stmt\Function_::class . '->params' => ['(', '', ''],
|
|
1628
|
+
Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"],
|
|
1629
|
+
Stmt\Class_::class . '->attrGroups' => [null, '', "\n"],
|
|
1630
|
+
Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"],
|
|
1631
|
+
Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"],
|
|
1632
|
+
Stmt\Function_::class . '->attrGroups' => [null, '', "\n"],
|
|
1633
|
+
Stmt\Property::class . '->attrGroups' => [null, '', "\n"],
|
|
1634
|
+
Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"],
|
|
1635
|
+
Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '],
|
|
1636
|
+
Expr\Closure::class . '->attrGroups' => [null, '', ' '],
|
|
1637
|
+
Stmt\Const_::class . '->attrGroups' => [null, '', "\n"],
|
|
1638
|
+
PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''],
|
|
1526
1639
|
|
|
1527
1640
|
/* These cannot be empty to start with:
|
|
1528
1641
|
* Expr_Isset->vars
|
|
@@ -1554,23 +1667,28 @@ abstract class PrettyPrinterAbstract
|
|
|
1554
1667
|
];
|
|
1555
1668
|
}
|
|
1556
1669
|
|
|
1557
|
-
protected function initializeModifierChangeMap() {
|
|
1558
|
-
if ($this->modifierChangeMap)
|
|
1670
|
+
protected function initializeModifierChangeMap(): void {
|
|
1671
|
+
if (isset($this->modifierChangeMap)) {
|
|
1672
|
+
return;
|
|
1673
|
+
}
|
|
1559
1674
|
|
|
1560
1675
|
$this->modifierChangeMap = [
|
|
1561
|
-
'
|
|
1562
|
-
'
|
|
1563
|
-
'
|
|
1564
|
-
'
|
|
1565
|
-
'
|
|
1566
|
-
'
|
|
1567
|
-
|
|
1676
|
+
Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST],
|
|
1677
|
+
Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION],
|
|
1678
|
+
Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS],
|
|
1679
|
+
Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE],
|
|
1680
|
+
PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_CLASS],
|
|
1681
|
+
Param::class . '->flags' => ['pModifiers', \T_VARIABLE],
|
|
1682
|
+
PropertyHook::class . '->flags' => ['pModifiers', \T_STRING],
|
|
1683
|
+
Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION],
|
|
1684
|
+
Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN],
|
|
1685
|
+
//Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO
|
|
1568
1686
|
];
|
|
1569
1687
|
|
|
1570
1688
|
// List of integer subnodes that are not modifiers:
|
|
1571
1689
|
// Expr_Include->type
|
|
1572
1690
|
// Stmt_GroupUse->type
|
|
1573
1691
|
// Stmt_Use->type
|
|
1574
|
-
//
|
|
1692
|
+
// UseItem->type
|
|
1575
1693
|
}
|
|
1576
1694
|
}
|