@appthreat/atom-parsetools 1.0.4 → 1.0.6

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.
Files changed (838) hide show
  1. package/package.json +3 -3
  2. package/plugins/autoload.php +1 -1
  3. package/plugins/bin/bundler +1 -1
  4. package/plugins/bin/ruby_ast_gen +1 -1
  5. package/plugins/composer/autoload_classmap.php +22 -8
  6. package/plugins/composer/autoload_real.php +4 -4
  7. package/plugins/composer/autoload_static.php +26 -12
  8. package/plugins/composer/installed.json +12 -10
  9. package/plugins/composer/installed.php +9 -9
  10. package/plugins/nikic/php-parser/README.md +20 -12
  11. package/plugins/nikic/php-parser/bin/php-parse +11 -10
  12. package/plugins/nikic/php-parser/composer.json +6 -4
  13. package/plugins/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php +19 -17
  14. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Class_.php +35 -30
  15. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +11 -4
  16. package/plugins/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +8 -7
  17. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +26 -27
  18. package/plugins/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +7 -7
  19. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Function_.php +7 -7
  20. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +11 -10
  21. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Method.php +16 -15
  22. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +5 -5
  23. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Param.php +38 -35
  24. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Property.php +82 -20
  25. package/plugins/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +6 -5
  26. package/plugins/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +25 -28
  27. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +16 -11
  28. package/plugins/nikic/php-parser/lib/PhpParser/Builder/Use_.php +8 -8
  29. package/plugins/nikic/php-parser/lib/PhpParser/Builder.php +2 -3
  30. package/plugins/nikic/php-parser/lib/PhpParser/BuilderFactory.php +46 -70
  31. package/plugins/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +23 -20
  32. package/plugins/nikic/php-parser/lib/PhpParser/Comment/Doc.php +1 -2
  33. package/plugins/nikic/php-parser/lib/PhpParser/Comment.php +37 -67
  34. package/plugins/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php +3 -3
  35. package/plugins/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php +15 -10
  36. package/plugins/nikic/php-parser/lib/PhpParser/Error.php +26 -33
  37. package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php +6 -9
  38. package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +2 -3
  39. package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler.php +2 -3
  40. package/plugins/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php +11 -7
  41. package/plugins/nikic/php-parser/lib/PhpParser/Internal/Differ.php +36 -22
  42. package/plugins/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +20 -13
  43. package/plugins/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php +237 -0
  44. package/plugins/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +70 -74
  45. package/plugins/nikic/php-parser/lib/PhpParser/JsonDecoder.php +15 -10
  46. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +72 -97
  47. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php +93 -0
  48. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +11 -18
  49. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +10 -15
  50. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +12 -11
  51. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +24 -26
  52. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +6 -10
  53. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +22 -29
  54. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php +19 -0
  55. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php +3 -3
  56. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +10 -15
  57. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +6 -5
  58. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +10 -5
  59. package/plugins/nikic/php-parser/lib/PhpParser/Lexer.php +69 -513
  60. package/plugins/nikic/php-parser/lib/PhpParser/Modifiers.php +85 -0
  61. package/plugins/nikic/php-parser/lib/PhpParser/NameContext.php +24 -25
  62. package/plugins/nikic/php-parser/lib/PhpParser/Node/Arg.php +13 -15
  63. package/plugins/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php +43 -0
  64. package/plugins/nikic/php-parser/lib/PhpParser/Node/Attribute.php +9 -10
  65. package/plugins/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +5 -7
  66. package/plugins/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php +36 -0
  67. package/plugins/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +1 -2
  68. package/plugins/nikic/php-parser/lib/PhpParser/Node/Const_.php +9 -10
  69. package/plugins/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php +37 -0
  70. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +10 -11
  71. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +4 -34
  72. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +11 -11
  73. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +33 -28
  74. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +9 -10
  75. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +2 -3
  76. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +2 -3
  77. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +2 -3
  78. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +2 -3
  79. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php +2 -3
  80. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php +2 -3
  81. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php +2 -3
  82. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php +2 -3
  83. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php +2 -3
  84. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php +2 -3
  85. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php +2 -3
  86. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +2 -3
  87. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +2 -3
  88. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +7 -8
  89. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php +9 -10
  90. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +4 -5
  91. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +4 -5
  92. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +4 -5
  93. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +4 -5
  94. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +4 -5
  95. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +4 -5
  96. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +4 -5
  97. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php +4 -5
  98. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +4 -5
  99. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +4 -5
  100. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +4 -5
  101. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +4 -5
  102. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +4 -5
  103. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +4 -5
  104. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +4 -5
  105. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +4 -5
  106. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +4 -5
  107. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +4 -5
  108. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +4 -5
  109. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +4 -5
  110. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +4 -5
  111. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +4 -5
  112. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +4 -5
  113. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +4 -5
  114. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +4 -5
  115. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +4 -5
  116. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +4 -5
  117. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +8 -11
  118. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +7 -8
  119. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +7 -8
  120. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +3 -7
  121. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +2 -3
  122. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php +2 -3
  123. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +5 -6
  124. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php +2 -3
  125. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php +2 -3
  126. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php +2 -3
  127. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php +2 -3
  128. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +5 -6
  129. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +10 -10
  130. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +7 -8
  131. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +33 -26
  132. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +4 -27
  133. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +7 -8
  134. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +7 -8
  135. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +5 -6
  136. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +7 -8
  137. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +7 -8
  138. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +10 -11
  139. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +10 -11
  140. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +13 -14
  141. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +11 -11
  142. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +7 -8
  143. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +12 -8
  144. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +8 -7
  145. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +12 -12
  146. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +10 -11
  147. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +12 -12
  148. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +10 -10
  149. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +7 -8
  150. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +7 -8
  151. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +6 -7
  152. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +7 -8
  153. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +7 -8
  154. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +10 -10
  155. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +9 -9
  156. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +12 -13
  157. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +11 -11
  158. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +12 -13
  159. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +6 -7
  160. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +7 -8
  161. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +7 -8
  162. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +6 -7
  163. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +7 -8
  164. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +10 -11
  165. package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr.php +1 -2
  166. package/plugins/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +5 -8
  167. package/plugins/nikic/php-parser/lib/PhpParser/Node/Identifier.php +24 -14
  168. package/plugins/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php +32 -0
  169. package/plugins/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +6 -9
  170. package/plugins/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +8 -10
  171. package/plugins/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +8 -9
  172. package/plugins/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +8 -9
  173. package/plugins/nikic/php-parser/lib/PhpParser/Node/Name.php +78 -54
  174. package/plugins/nikic/php-parser/lib/PhpParser/Node/NullableType.php +11 -10
  175. package/plugins/nikic/php-parser/lib/PhpParser/Node/Param.php +83 -24
  176. package/plugins/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php +105 -0
  177. package/plugins/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php +37 -0
  178. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +4 -70
  179. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +4 -24
  180. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +5 -22
  181. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php +78 -0
  182. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php +82 -0
  183. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php +34 -0
  184. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +4 -73
  185. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +4 -5
  186. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +4 -5
  187. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php +4 -5
  188. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +4 -5
  189. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php +4 -5
  190. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php +4 -5
  191. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +4 -5
  192. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php +15 -0
  193. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +4 -5
  194. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +4 -5
  195. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +30 -26
  196. package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar.php +1 -2
  197. package/plugins/nikic/php-parser/lib/PhpParser/Node/StaticVar.php +39 -0
  198. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php +29 -0
  199. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +8 -9
  200. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +10 -11
  201. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +11 -12
  202. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +24 -32
  203. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +17 -17
  204. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +47 -54
  205. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +46 -89
  206. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +17 -10
  207. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +8 -9
  208. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +5 -26
  209. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +12 -12
  210. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +9 -10
  211. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +7 -8
  212. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +9 -10
  213. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +7 -8
  214. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +11 -12
  215. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +17 -13
  216. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +7 -8
  217. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +7 -8
  218. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +19 -15
  219. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +20 -17
  220. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +28 -24
  221. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +7 -8
  222. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +7 -8
  223. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +16 -14
  224. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +7 -8
  225. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +18 -15
  226. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +7 -8
  227. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +13 -10
  228. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +7 -8
  229. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +11 -12
  230. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +4 -5
  231. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +68 -38
  232. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +5 -26
  233. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +8 -9
  234. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +4 -30
  235. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +8 -8
  236. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +9 -10
  237. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +8 -9
  238. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +12 -13
  239. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +9 -10
  240. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +3 -4
  241. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +10 -8
  242. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +11 -12
  243. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +7 -8
  244. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +5 -44
  245. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +16 -16
  246. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +9 -10
  247. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt.php +1 -2
  248. package/plugins/nikic/php-parser/lib/PhpParser/Node/UnionType.php +7 -8
  249. package/plugins/nikic/php-parser/lib/PhpParser/Node/UseItem.php +55 -0
  250. package/plugins/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +2 -3
  251. package/plugins/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php +2 -2
  252. package/plugins/nikic/php-parser/lib/PhpParser/Node.php +28 -29
  253. package/plugins/nikic/php-parser/lib/PhpParser/NodeAbstract.php +23 -20
  254. package/plugins/nikic/php-parser/lib/PhpParser/NodeDumper.php +177 -84
  255. package/plugins/nikic/php-parser/lib/PhpParser/NodeFinder.php +28 -19
  256. package/plugins/nikic/php-parser/lib/PhpParser/NodeTraverser.php +156 -160
  257. package/plugins/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +4 -7
  258. package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +1 -2
  259. package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php +82 -0
  260. package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +6 -7
  261. package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +6 -7
  262. package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +37 -28
  263. package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +29 -8
  264. package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +23 -13
  265. package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor.php +59 -7
  266. package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +1 -2
  267. package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php7.php +2034 -2141
  268. package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php8.php +2814 -0
  269. package/plugins/nikic/php-parser/lib/PhpParser/Parser.php +9 -3
  270. package/plugins/nikic/php-parser/lib/PhpParser/ParserAbstract.php +503 -269
  271. package/plugins/nikic/php-parser/lib/PhpParser/ParserFactory.php +15 -49
  272. package/plugins/nikic/php-parser/lib/PhpParser/PhpVersion.php +171 -0
  273. package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +428 -339
  274. package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinter.php +51 -0
  275. package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +563 -445
  276. package/plugins/nikic/php-parser/lib/PhpParser/Token.php +18 -0
  277. package/plugins/nikic/php-parser/lib/PhpParser/compatibility_tokens.php +68 -0
  278. package/plugins/rubyastgen/Gemfile +3 -2
  279. package/plugins/rubyastgen/Gemfile.lock +10 -5
  280. package/plugins/rubyastgen/bundle/bundler/setup.rb +4 -2
  281. package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/bundle +29 -0
  282. package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/bundler +29 -0
  283. package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/Gemfile +2 -1
  284. package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/README.md +7 -4
  285. package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-8738b155eb4f/bin/console +11 -0
  286. package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-8738b155eb4f/exe/ruby_ast_gen +60 -0
  287. 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
  288. 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
  289. 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
  290. package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/ruby_ast_gen.gemspec +4 -4
  291. package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-8738b155eb4f/spec/ruby_ast_gen_spec.rb +299 -0
  292. package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/update_version.rb +6 -5
  293. package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.4.0/gem.build_complete +0 -0
  294. package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.4.0/gem_make.out +44 -0
  295. package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.4.0/mkmf.log +74 -0
  296. package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/prism-1.4.0/prism/prism.so +0 -0
  297. package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/gem_make.out +6 -6
  298. package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/racc/cparse.so +0 -0
  299. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/CHANGELOG.md +5239 -0
  300. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/LICENSE.md +22 -0
  301. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/README.md +58 -0
  302. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/bundler.gemspec +46 -0
  303. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/exe/bundle +29 -0
  304. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/exe/bundler +4 -0
  305. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/.document +1 -0
  306. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/build_metadata.rb +45 -0
  307. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/capistrano.rb +22 -0
  308. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/checksum.rb +264 -0
  309. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ci_detector.rb +75 -0
  310. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/add.rb +49 -0
  311. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/binstubs.rb +57 -0
  312. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/cache.rb +43 -0
  313. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/check.rb +40 -0
  314. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/clean.rb +25 -0
  315. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/common.rb +138 -0
  316. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/config.rb +204 -0
  317. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/console.rb +42 -0
  318. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/doctor.rb +161 -0
  319. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/exec.rb +89 -0
  320. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/fund.rb +36 -0
  321. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/gem.rb +467 -0
  322. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/info.rb +83 -0
  323. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/init.rb +51 -0
  324. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/inject.rb +60 -0
  325. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/install.rb +199 -0
  326. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/issue.rb +41 -0
  327. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/list.rb +66 -0
  328. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/lock.rb +94 -0
  329. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/open.rb +29 -0
  330. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/outdated.rb +297 -0
  331. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/platform.rb +48 -0
  332. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/plugin.rb +35 -0
  333. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/pristine.rb +60 -0
  334. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/remove.rb +17 -0
  335. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/show.rb +75 -0
  336. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/update.rb +123 -0
  337. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli/viz.rb +31 -0
  338. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/cli.rb +799 -0
  339. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client/cache.rb +96 -0
  340. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client/cache_file.rb +148 -0
  341. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client/parser.rb +84 -0
  342. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client/updater.rb +105 -0
  343. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/compact_index_client.rb +97 -0
  344. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/constants.rb +14 -0
  345. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/current_ruby.rb +82 -0
  346. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/definition.rb +1170 -0
  347. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/dependency.rb +151 -0
  348. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/deployment.rb +69 -0
  349. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/deprecate.rb +44 -0
  350. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/digest.rb +71 -0
  351. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/dsl.rb +638 -0
  352. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/endpoint_specification.rb +174 -0
  353. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/env.rb +148 -0
  354. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/environment_preserver.rb +68 -0
  355. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/errors.rb +281 -0
  356. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/feature_flag.rb +50 -0
  357. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/base.rb +52 -0
  358. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/compact_index.rb +120 -0
  359. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/dependency.rb +78 -0
  360. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/downloader.rb +91 -0
  361. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/gem_remote_fetcher.rb +16 -0
  362. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher/index.rb +25 -0
  363. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/fetcher.rb +331 -0
  364. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/force_platform.rb +16 -0
  365. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/friendly_errors.rb +126 -0
  366. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/gem_helper.rb +237 -0
  367. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/gem_helpers.rb +144 -0
  368. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/gem_tasks.rb +7 -0
  369. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/gem_version_promoter.rb +147 -0
  370. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/graph.rb +152 -0
  371. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/index.rb +205 -0
  372. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/injector.rb +285 -0
  373. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/inline.rb +98 -0
  374. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/installer/gem_installer.rb +85 -0
  375. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/installer/parallel_installer.rb +203 -0
  376. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/installer/standalone.rb +113 -0
  377. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/installer.rb +243 -0
  378. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/lazy_specification.rb +234 -0
  379. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/lockfile_generator.rb +104 -0
  380. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/lockfile_parser.rb +300 -0
  381. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/.document +1 -0
  382. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-add.1 +76 -0
  383. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-add.1.ronn +87 -0
  384. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-binstubs.1 +33 -0
  385. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-binstubs.1.ronn +44 -0
  386. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-cache.1 +68 -0
  387. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-cache.1.ronn +108 -0
  388. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-check.1 +24 -0
  389. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-check.1.ronn +31 -0
  390. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-clean.1 +17 -0
  391. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-clean.1.ronn +18 -0
  392. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-config.1 +317 -0
  393. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-config.1.ronn +408 -0
  394. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-console.1 +33 -0
  395. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-console.1.ronn +39 -0
  396. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-doctor.1 +30 -0
  397. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-doctor.1.ronn +33 -0
  398. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-env.1 +9 -0
  399. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-env.1.ronn +10 -0
  400. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-exec.1 +107 -0
  401. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-exec.1.ronn +154 -0
  402. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-fund.1 +22 -0
  403. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-fund.1.ronn +25 -0
  404. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-gem.1 +87 -0
  405. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-gem.1.ronn +149 -0
  406. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-help.1 +9 -0
  407. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-help.1.ronn +12 -0
  408. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-info.1 +17 -0
  409. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-info.1.ronn +21 -0
  410. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-init.1 +20 -0
  411. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-init.1.ronn +32 -0
  412. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-inject.1 +31 -0
  413. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-inject.1.ronn +32 -0
  414. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-install.1 +218 -0
  415. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-install.1.ronn +387 -0
  416. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-issue.1 +45 -0
  417. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-issue.1.ronn +37 -0
  418. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-licenses.1 +9 -0
  419. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-licenses.1.ronn +10 -0
  420. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-list.1 +35 -0
  421. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-list.1.ronn +36 -0
  422. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-lock.1 +75 -0
  423. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-lock.1.ronn +115 -0
  424. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-open.1 +32 -0
  425. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-open.1.ronn +28 -0
  426. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-outdated.1 +103 -0
  427. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-outdated.1.ronn +110 -0
  428. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-platform.1 +49 -0
  429. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-platform.1.ronn +49 -0
  430. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-plugin.1 +58 -0
  431. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-plugin.1.ronn +63 -0
  432. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-pristine.1 +23 -0
  433. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-pristine.1.ronn +34 -0
  434. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-remove.1 +21 -0
  435. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-remove.1.ronn +23 -0
  436. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-show.1 +19 -0
  437. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-show.1.ronn +25 -0
  438. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-update.1 +281 -0
  439. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-update.1.ronn +359 -0
  440. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-version.1 +22 -0
  441. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-version.1.ronn +24 -0
  442. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-viz.1 +30 -0
  443. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle-viz.1.ronn +36 -0
  444. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle.1 +102 -0
  445. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/bundle.1.ronn +116 -0
  446. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/gemfile.5 +472 -0
  447. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/gemfile.5.ronn +558 -0
  448. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/man/index.txt +33 -0
  449. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/match_metadata.rb +30 -0
  450. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/match_platform.rb +23 -0
  451. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/match_remote_metadata.rb +29 -0
  452. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/materialization.rb +59 -0
  453. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/mirror.rb +221 -0
  454. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/api/source.rb +322 -0
  455. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/api.rb +81 -0
  456. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/dsl.rb +53 -0
  457. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/events.rb +85 -0
  458. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/index.rb +197 -0
  459. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/installer/git.rb +34 -0
  460. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/installer/path.rb +26 -0
  461. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/installer/rubygems.rb +19 -0
  462. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/installer.rb +132 -0
  463. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin/source_list.rb +31 -0
  464. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/plugin.rb +378 -0
  465. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/process_lock.rb +20 -0
  466. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/remote_specification.rb +126 -0
  467. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/base.rb +118 -0
  468. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/candidate.rb +85 -0
  469. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/incompatibility.rb +15 -0
  470. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/package.rb +94 -0
  471. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/root.rb +25 -0
  472. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/spec_group.rb +74 -0
  473. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver/strategy.rb +40 -0
  474. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/resolver.rb +522 -0
  475. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/retry.rb +66 -0
  476. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ruby_dsl.rb +62 -0
  477. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ruby_version.rb +137 -0
  478. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/rubygems_ext.rb +485 -0
  479. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/rubygems_gem_installer.rb +172 -0
  480. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/rubygems_integration.rb +455 -0
  481. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/runtime.rb +320 -0
  482. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/safe_marshal.rb +31 -0
  483. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/self_manager.rb +206 -0
  484. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/settings/validator.rb +102 -0
  485. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/settings.rb +599 -0
  486. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/setup.rb +39 -0
  487. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/shared_helpers.rb +398 -0
  488. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/similarity_detector.rb +63 -0
  489. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/gemspec.rb +15 -0
  490. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/git/git_proxy.rb +472 -0
  491. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/git.rb +452 -0
  492. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/metadata.rb +63 -0
  493. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/path/installer.rb +53 -0
  494. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/path.rb +250 -0
  495. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/rubygems/remote.rb +76 -0
  496. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/rubygems.rb +522 -0
  497. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source/rubygems_aggregate.rb +68 -0
  498. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source.rb +118 -0
  499. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source_list.rb +273 -0
  500. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/source_map.rb +71 -0
  501. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/spec_set.rb +367 -0
  502. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/stub_specification.rb +146 -0
  503. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/.document +1 -0
  504. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/Executable +27 -0
  505. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/Executable.bundler +109 -0
  506. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/Executable.standalone +14 -0
  507. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/Gemfile +5 -0
  508. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/CHANGELOG.md.tt +5 -0
  509. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +132 -0
  510. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/Cargo.toml.tt +7 -0
  511. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/Gemfile.tt +24 -0
  512. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/LICENSE.txt.tt +21 -0
  513. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/README.md.tt +49 -0
  514. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/Rakefile.tt +67 -0
  515. 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
  516. 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
  517. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/circleci/config.yml.tt +25 -0
  518. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/exe/newgem.tt +3 -0
  519. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +15 -0
  520. 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
  521. 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
  522. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/ext/newgem/newgem.c.tt +9 -0
  523. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/ext/newgem/newgem.h.tt +6 -0
  524. 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
  525. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/github/workflows/main.yml.tt +37 -0
  526. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/gitignore.tt +23 -0
  527. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/gitlab-ci.yml.tt +18 -0
  528. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +9 -0
  529. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/lib/newgem.rb.tt +15 -0
  530. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/newgem.gemspec.tt +52 -0
  531. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/rspec.tt +3 -0
  532. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/rubocop.yml.tt +8 -0
  533. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/sig/newgem.rbs.tt +8 -0
  534. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +11 -0
  535. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +15 -0
  536. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/templates/newgem/standard.yml.tt +3 -0
  537. 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
  538. 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
  539. 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
  540. 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
  541. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ui/rg_proxy.rb +19 -0
  542. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ui/shell.rb +187 -0
  543. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ui/silent.rb +96 -0
  544. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/ui.rb +9 -0
  545. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/uri_credentials_filter.rb +43 -0
  546. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/uri_normalizer.rb +23 -0
  547. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/.document +1 -0
  548. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/connection_pool/.document +1 -0
  549. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/connection_pool/LICENSE +20 -0
  550. 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
  551. 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
  552. 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
  553. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/connection_pool/lib/connection_pool.rb +186 -0
  554. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/fileutils/.document +1 -0
  555. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/fileutils/lib/fileutils.rb +2696 -0
  556. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/net-http-persistent/.document +1 -0
  557. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/net-http-persistent/README.rdoc +82 -0
  558. 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
  559. 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
  560. 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
  561. 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
  562. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/.document +1 -0
  563. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/LICENSE.txt +21 -0
  564. 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
  565. 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
  566. 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
  567. 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
  568. 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
  569. 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
  570. 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
  571. 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
  572. 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
  573. 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
  574. 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
  575. 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
  576. 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
  577. 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
  578. 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
  579. 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
  580. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/pub_grub/lib/pub_grub.rb +31 -0
  581. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/securerandom/.document +1 -0
  582. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/securerandom/COPYING +56 -0
  583. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/securerandom/lib/securerandom.rb +102 -0
  584. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/.document +1 -0
  585. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/LICENSE.md +20 -0
  586. 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
  587. 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
  588. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/actions/directory.rb +108 -0
  589. 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
  590. 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
  591. 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
  592. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/actions.rb +340 -0
  593. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/base.rb +825 -0
  594. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/command.rb +151 -0
  595. 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
  596. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/error.rb +106 -0
  597. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/group.rb +292 -0
  598. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/invocation.rb +178 -0
  599. 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
  600. 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
  601. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/line_editor.rb +17 -0
  602. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/nested_context.rb +29 -0
  603. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser/argument.rb +86 -0
  604. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser/arguments.rb +195 -0
  605. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser/option.rb +178 -0
  606. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser/options.rb +294 -0
  607. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/parser.rb +4 -0
  608. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/rake_compat.rb +72 -0
  609. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/runner.rb +335 -0
  610. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/basic.rb +388 -0
  611. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/color.rb +112 -0
  612. 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
  613. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/html.rb +81 -0
  614. 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
  615. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell/terminal.rb +42 -0
  616. 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
  617. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/shell.rb +81 -0
  618. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/util.rb +285 -0
  619. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor/version.rb +3 -0
  620. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/thor/lib/thor.rb +674 -0
  621. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/tsort/.document +1 -0
  622. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/tsort/LICENSE.txt +22 -0
  623. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/tsort/lib/tsort.rb +455 -0
  624. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/.document +1 -0
  625. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/COPYING +56 -0
  626. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/common.rb +880 -0
  627. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/file.rb +100 -0
  628. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/ftp.rb +267 -0
  629. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/generic.rb +1579 -0
  630. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/http.rb +125 -0
  631. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/https.rb +23 -0
  632. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/ldap.rb +261 -0
  633. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/ldaps.rb +22 -0
  634. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/mailto.rb +293 -0
  635. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +546 -0
  636. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +206 -0
  637. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/version.rb +6 -0
  638. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/ws.rb +83 -0
  639. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri/wss.rb +23 -0
  640. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendor/uri/lib/uri.rb +104 -0
  641. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_fileutils.rb +4 -0
  642. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_net_http.rb +23 -0
  643. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_persistent.rb +11 -0
  644. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_pub_grub.rb +4 -0
  645. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_securerandom.rb +12 -0
  646. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_thor.rb +8 -0
  647. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_timeout.rb +12 -0
  648. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_tsort.rb +4 -0
  649. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vendored_uri.rb +21 -0
  650. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/version.rb +13 -0
  651. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/vlad.rb +17 -0
  652. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/worker.rb +117 -0
  653. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler/yaml_serializer.rb +98 -0
  654. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/bundler-2.6.7/lib/bundler.rb +701 -0
  655. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.3/COPYING +56 -0
  656. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.3/bin/setup +8 -0
  657. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/lib/ostruct.rb +5 -2
  658. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/ostruct.gemspec +2 -0
  659. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/BSDmakefile +58 -0
  660. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/CHANGELOG.md +684 -0
  661. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/CODE_OF_CONDUCT.md +76 -0
  662. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/CONTRIBUTING.md +58 -0
  663. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/LICENSE.md +7 -0
  664. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/Makefile +108 -0
  665. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/README.md +141 -0
  666. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/config.yml +4486 -0
  667. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/build_system.md +119 -0
  668. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/configuration.md +68 -0
  669. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/cruby_compilation.md +27 -0
  670. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/design.md +53 -0
  671. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/encoding.md +121 -0
  672. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/fuzzing.md +88 -0
  673. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/heredocs.md +36 -0
  674. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/javascript.md +118 -0
  675. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/local_variable_depth.md +229 -0
  676. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/mapping.md +117 -0
  677. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/parser_translation.md +39 -0
  678. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/parsing_rules.md +22 -0
  679. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/releasing.md +96 -0
  680. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/relocation.md +34 -0
  681. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/ripper_translation.md +72 -0
  682. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/ruby_api.md +44 -0
  683. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/ruby_parser_translation.md +19 -0
  684. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/serialization.md +233 -0
  685. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/docs/testing.md +55 -0
  686. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/Makefile +273 -0
  687. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/api_node.c +6939 -0
  688. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/api_pack.c +276 -0
  689. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/extconf.rb +127 -0
  690. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/extension.c +1406 -0
  691. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/ext/prism/extension.h +19 -0
  692. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/ast.h +7964 -0
  693. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/defines.h +260 -0
  694. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/diagnostic.h +451 -0
  695. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/encoding.h +283 -0
  696. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/node.h +129 -0
  697. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/options.h +442 -0
  698. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/pack.h +163 -0
  699. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/parser.h +933 -0
  700. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/prettyprint.h +34 -0
  701. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/regexp.h +43 -0
  702. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/static_literals.h +121 -0
  703. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_buffer.h +228 -0
  704. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_char.h +204 -0
  705. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_constant_pool.h +218 -0
  706. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_integer.h +126 -0
  707. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_list.h +97 -0
  708. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_memchr.h +29 -0
  709. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_newline_list.h +113 -0
  710. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_string.h +190 -0
  711. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_strncasecmp.h +32 -0
  712. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/util/pm_strpbrk.h +46 -0
  713. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism/version.h +29 -0
  714. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/include/prism.h +383 -0
  715. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/compiler.rb +496 -0
  716. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/desugar_compiler.rb +391 -0
  717. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/dispatcher.rb +2194 -0
  718. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/dot_visitor.rb +4758 -0
  719. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/dsl.rb +1000 -0
  720. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/ffi.rb +560 -0
  721. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/inspect_visitor.rb +2389 -0
  722. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/lex_compat.rb +927 -0
  723. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/mutation_compiler.rb +769 -0
  724. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/node.rb +18645 -0
  725. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/node_ext.rb +508 -0
  726. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/pack.rb +228 -0
  727. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/parse_result/comments.rb +187 -0
  728. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/parse_result/errors.rb +65 -0
  729. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/parse_result/newlines.rb +154 -0
  730. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/parse_result.rb +910 -0
  731. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/pattern.rb +268 -0
  732. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/polyfill/append_as_bytes.rb +15 -0
  733. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/polyfill/byteindex.rb +13 -0
  734. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/polyfill/unpack1.rb +14 -0
  735. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/prism.so +0 -0
  736. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/reflection.rb +413 -0
  737. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/relocation.rb +504 -0
  738. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/serialize.rb +2392 -0
  739. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/string_query.rb +30 -0
  740. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser/builder.rb +61 -0
  741. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser/compiler.rb +2212 -0
  742. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser/lexer.rb +812 -0
  743. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser.rb +355 -0
  744. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser33.rb +12 -0
  745. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser34.rb +12 -0
  746. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/parser35.rb +12 -0
  747. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/ripper/sexp.rb +125 -0
  748. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/ripper/shim.rb +5 -0
  749. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/ripper.rb +3458 -0
  750. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation/ruby_parser.rb +1646 -0
  751. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/translation.rb +14 -0
  752. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism/visitor.rb +508 -0
  753. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/lib/prism.rb +89 -0
  754. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/prism.gemspec +170 -0
  755. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/compiler.rbi +12 -0
  756. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/dsl.rbi +524 -0
  757. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/inspect_visitor.rbi +12 -0
  758. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/node.rbi +8722 -0
  759. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/node_ext.rbi +107 -0
  760. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/parse_result.rbi +404 -0
  761. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/reflection.rbi +58 -0
  762. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/string_query.rbi +12 -0
  763. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/parser.rbi +11 -0
  764. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/parser33.rbi +6 -0
  765. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/parser34.rbi +6 -0
  766. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/parser35.rbi +6 -0
  767. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/translation/ripper.rbi +15 -0
  768. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism/visitor.rbi +473 -0
  769. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/rbi/prism.rbi +66 -0
  770. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/compiler.rbs +9 -0
  771. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/dispatcher.rbs +16 -0
  772. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/dot_visitor.rbs +6 -0
  773. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/dsl.rbs +351 -0
  774. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/inspect_visitor.rbs +22 -0
  775. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/lex_compat.rbs +10 -0
  776. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/mutation_compiler.rbs +159 -0
  777. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/node.rbs +3614 -0
  778. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/node_ext.rbs +82 -0
  779. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/pack.rbs +43 -0
  780. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/parse_result.rbs +192 -0
  781. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/pattern.rbs +13 -0
  782. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/reflection.rbs +50 -0
  783. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/relocation.rbs +185 -0
  784. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/serialize.rbs +8 -0
  785. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/string_query.rbs +11 -0
  786. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism/visitor.rbs +169 -0
  787. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/sig/prism.rbs +254 -0
  788. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/diagnostic.c +842 -0
  789. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/encoding.c +5235 -0
  790. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/node.c +8674 -0
  791. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/options.c +328 -0
  792. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/pack.c +509 -0
  793. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/prettyprint.c +8939 -0
  794. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/prism.c +23184 -0
  795. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/regexp.c +790 -0
  796. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/serialize.c +2266 -0
  797. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/static_literals.c +617 -0
  798. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/token_type.c +701 -0
  799. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_buffer.c +357 -0
  800. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_char.c +318 -0
  801. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_constant_pool.c +342 -0
  802. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_integer.c +670 -0
  803. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_list.c +49 -0
  804. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_memchr.c +35 -0
  805. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_newline_list.c +125 -0
  806. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_string.c +383 -0
  807. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_strncasecmp.c +36 -0
  808. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/prism-1.4.0/src/util/pm_strpbrk.c +206 -0
  809. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +3 -3
  810. package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
  811. package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/ast-2.4.3.gemspec +1 -1
  812. package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/bundler-2.6.7.gemspec +25 -0
  813. package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/{ostruct-0.6.1.gemspec → ostruct-0.6.3.gemspec} +5 -4
  814. package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/parser-3.3.8.0.gemspec +1 -1
  815. package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/prism-1.4.0.gemspec +24 -0
  816. package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/racc-1.8.1.gemspec +1 -1
  817. package/rbastgen.js +1 -1
  818. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +0 -47
  819. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +0 -76
  820. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +0 -23
  821. package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +0 -105
  822. package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +0 -30
  823. package/plugins/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +0 -55
  824. package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php5.php +0 -2682
  825. package/plugins/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +0 -148
  826. package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-2a9186207494/exe/ruby_ast_gen +0 -59
  827. package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-2a9186207494/spec/ruby_ast_gen_spec.rb +0 -175
  828. /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/.rspec +0 -0
  829. /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/LICENSE.txt +0 -0
  830. /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/Rakefile +0 -0
  831. /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/bin/setup +0 -0
  832. /package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/{ruby_ast_gen-2a9186207494 → ruby_ast_gen-8738b155eb4f}/spec/spec_helper.rb +0 -0
  833. /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → bundler-2.6.7/lib/bundler/vendor/fileutils}/COPYING +0 -0
  834. /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/BSDL +0 -0
  835. /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/Gemfile +0 -0
  836. /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/README.md +0 -0
  837. /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/Rakefile +0 -0
  838. /package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/{ostruct-0.6.1 → ostruct-0.6.3}/bin/console +0 -0
@@ -13,39 +13,39 @@ use PhpParser\Node\Scalar\MagicConst;
13
13
  use PhpParser\Node\Stmt;
14
14
  use PhpParser\PrettyPrinterAbstract;
15
15
 
16
- class Standard extends PrettyPrinterAbstract
17
- {
16
+ class Standard extends PrettyPrinterAbstract {
18
17
  // Special nodes
19
18
 
20
- protected function pParam(Node\Param $node) {
21
- return $this->pAttrGroups($node->attrGroups, true)
19
+ protected function pParam(Node\Param $node): string {
20
+ return $this->pAttrGroups($node->attrGroups, $this->phpVersion->supportsAttributes())
22
21
  . $this->pModifiers($node->flags)
23
22
  . ($node->type ? $this->p($node->type) . ' ' : '')
24
23
  . ($node->byRef ? '&' : '')
25
24
  . ($node->variadic ? '...' : '')
26
25
  . $this->p($node->var)
27
- . ($node->default ? ' = ' . $this->p($node->default) : '');
26
+ . ($node->default ? ' = ' . $this->p($node->default) : '')
27
+ . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : '');
28
28
  }
29
29
 
30
- protected function pArg(Node\Arg $node) {
30
+ protected function pArg(Node\Arg $node): string {
31
31
  return ($node->name ? $node->name->toString() . ': ' : '')
32
32
  . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '')
33
33
  . $this->p($node->value);
34
34
  }
35
35
 
36
- protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node) {
36
+ protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node): string {
37
37
  return '...';
38
38
  }
39
39
 
40
- protected function pConst(Node\Const_ $node) {
40
+ protected function pConst(Node\Const_ $node): string {
41
41
  return $node->name . ' = ' . $this->p($node->value);
42
42
  }
43
43
 
44
- protected function pNullableType(Node\NullableType $node) {
44
+ protected function pNullableType(Node\NullableType $node): string {
45
45
  return '?' . $this->p($node->type);
46
46
  }
47
47
 
48
- protected function pUnionType(Node\UnionType $node) {
48
+ protected function pUnionType(Node\UnionType $node): string {
49
49
  $types = [];
50
50
  foreach ($node->types as $typeNode) {
51
51
  if ($typeNode instanceof Node\IntersectionType) {
@@ -57,138 +57,154 @@ class Standard extends PrettyPrinterAbstract
57
57
  return implode('|', $types);
58
58
  }
59
59
 
60
- protected function pIntersectionType(Node\IntersectionType $node) {
60
+ protected function pIntersectionType(Node\IntersectionType $node): string {
61
61
  return $this->pImplode($node->types, '&');
62
62
  }
63
63
 
64
- protected function pIdentifier(Node\Identifier $node) {
64
+ protected function pIdentifier(Node\Identifier $node): string {
65
65
  return $node->name;
66
66
  }
67
67
 
68
- protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node) {
68
+ protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node): string {
69
69
  return '$' . $node->name;
70
70
  }
71
71
 
72
- protected function pAttribute(Node\Attribute $node) {
72
+ protected function pAttribute(Node\Attribute $node): string {
73
73
  return $this->p($node->name)
74
74
  . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : '');
75
75
  }
76
76
 
77
- protected function pAttributeGroup(Node\AttributeGroup $node) {
77
+ protected function pAttributeGroup(Node\AttributeGroup $node): string {
78
78
  return '#[' . $this->pCommaSeparated($node->attrs) . ']';
79
79
  }
80
80
 
81
81
  // Names
82
82
 
83
- protected function pName(Name $node) {
84
- return implode('\\', $node->parts);
83
+ protected function pName(Name $node): string {
84
+ return $node->name;
85
85
  }
86
86
 
87
- protected function pName_FullyQualified(Name\FullyQualified $node) {
88
- return '\\' . implode('\\', $node->parts);
87
+ protected function pName_FullyQualified(Name\FullyQualified $node): string {
88
+ return '\\' . $node->name;
89
89
  }
90
90
 
91
- protected function pName_Relative(Name\Relative $node) {
92
- return 'namespace\\' . implode('\\', $node->parts);
91
+ protected function pName_Relative(Name\Relative $node): string {
92
+ return 'namespace\\' . $node->name;
93
93
  }
94
94
 
95
95
  // Magic Constants
96
96
 
97
- protected function pScalar_MagicConst_Class(MagicConst\Class_ $node) {
97
+ protected function pScalar_MagicConst_Class(MagicConst\Class_ $node): string {
98
98
  return '__CLASS__';
99
99
  }
100
100
 
101
- protected function pScalar_MagicConst_Dir(MagicConst\Dir $node) {
101
+ protected function pScalar_MagicConst_Dir(MagicConst\Dir $node): string {
102
102
  return '__DIR__';
103
103
  }
104
104
 
105
- protected function pScalar_MagicConst_File(MagicConst\File $node) {
105
+ protected function pScalar_MagicConst_File(MagicConst\File $node): string {
106
106
  return '__FILE__';
107
107
  }
108
108
 
109
- protected function pScalar_MagicConst_Function(MagicConst\Function_ $node) {
109
+ protected function pScalar_MagicConst_Function(MagicConst\Function_ $node): string {
110
110
  return '__FUNCTION__';
111
111
  }
112
112
 
113
- protected function pScalar_MagicConst_Line(MagicConst\Line $node) {
113
+ protected function pScalar_MagicConst_Line(MagicConst\Line $node): string {
114
114
  return '__LINE__';
115
115
  }
116
116
 
117
- protected function pScalar_MagicConst_Method(MagicConst\Method $node) {
117
+ protected function pScalar_MagicConst_Method(MagicConst\Method $node): string {
118
118
  return '__METHOD__';
119
119
  }
120
120
 
121
- protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node) {
121
+ protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node): string {
122
122
  return '__NAMESPACE__';
123
123
  }
124
124
 
125
- protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node) {
125
+ protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string {
126
126
  return '__TRAIT__';
127
127
  }
128
128
 
129
+ protected function pScalar_MagicConst_Property(MagicConst\Property $node): string {
130
+ return '__PROPERTY__';
131
+ }
132
+
129
133
  // Scalars
130
134
 
131
- protected function pScalar_String(Scalar\String_ $node) {
135
+ private function indentString(string $str): string {
136
+ return str_replace("\n", $this->nl, $str);
137
+ }
138
+
139
+ protected function pScalar_String(Scalar\String_ $node): string {
132
140
  $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED);
133
141
  switch ($kind) {
134
142
  case Scalar\String_::KIND_NOWDOC:
135
143
  $label = $node->getAttribute('docLabel');
136
144
  if ($label && !$this->containsEndLabel($node->value, $label)) {
145
+ $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc();
146
+ $nl = $shouldIdent ? $this->nl : $this->newline;
137
147
  if ($node->value === '') {
138
- return "<<<'$label'\n$label" . $this->docStringEndToken;
148
+ return "<<<'$label'$nl$label{$this->docStringEndToken}";
139
149
  }
140
150
 
141
- return "<<<'$label'\n$node->value\n$label"
142
- . $this->docStringEndToken;
151
+ // Make sure trailing \r is not combined with following \n into CRLF.
152
+ if ($node->value[strlen($node->value) - 1] !== "\r") {
153
+ $value = $shouldIdent ? $this->indentString($node->value) : $node->value;
154
+ return "<<<'$label'$nl$value$nl$label{$this->docStringEndToken}";
155
+ }
143
156
  }
144
157
  /* break missing intentionally */
158
+ // no break
145
159
  case Scalar\String_::KIND_SINGLE_QUOTED:
146
160
  return $this->pSingleQuotedString($node->value);
147
161
  case Scalar\String_::KIND_HEREDOC:
148
162
  $label = $node->getAttribute('docLabel');
149
- if ($label && !$this->containsEndLabel($node->value, $label)) {
150
- if ($node->value === '') {
151
- return "<<<$label\n$label" . $this->docStringEndToken;
163
+ $escaped = $this->escapeString($node->value, null);
164
+ if ($label && !$this->containsEndLabel($escaped, $label)) {
165
+ $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline;
166
+ if ($escaped === '') {
167
+ return "<<<$label$nl$label{$this->docStringEndToken}";
152
168
  }
153
169
 
154
- $escaped = $this->escapeString($node->value, null);
155
- return "<<<$label\n" . $escaped . "\n$label"
156
- . $this->docStringEndToken;
170
+ return "<<<$label$nl$escaped$nl$label{$this->docStringEndToken}";
157
171
  }
158
- /* break missing intentionally */
172
+ /* break missing intentionally */
173
+ // no break
159
174
  case Scalar\String_::KIND_DOUBLE_QUOTED:
160
175
  return '"' . $this->escapeString($node->value, '"') . '"';
161
176
  }
162
177
  throw new \Exception('Invalid string kind');
163
178
  }
164
179
 
165
- protected function pScalar_Encapsed(Scalar\Encapsed $node) {
180
+ protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): string {
166
181
  if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) {
167
182
  $label = $node->getAttribute('docLabel');
168
183
  if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) {
184
+ $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline;
169
185
  if (count($node->parts) === 1
170
- && $node->parts[0] instanceof Scalar\EncapsedStringPart
186
+ && $node->parts[0] instanceof Node\InterpolatedStringPart
171
187
  && $node->parts[0]->value === ''
172
188
  ) {
173
- return "<<<$label\n$label" . $this->docStringEndToken;
189
+ return "<<<$label$nl$label{$this->docStringEndToken}";
174
190
  }
175
191
 
176
- return "<<<$label\n" . $this->pEncapsList($node->parts, null) . "\n$label"
177
- . $this->docStringEndToken;
192
+ return "<<<$label$nl" . $this->pEncapsList($node->parts, null)
193
+ . "$nl$label{$this->docStringEndToken}";
178
194
  }
179
195
  }
180
196
  return '"' . $this->pEncapsList($node->parts, '"') . '"';
181
197
  }
182
198
 
183
- protected function pScalar_LNumber(Scalar\LNumber $node) {
184
- if ($node->value === -\PHP_INT_MAX-1) {
199
+ protected function pScalar_Int(Scalar\Int_ $node): string {
200
+ if ($node->value === -\PHP_INT_MAX - 1) {
185
201
  // PHP_INT_MIN cannot be represented as a literal,
186
202
  // because the sign is not part of the literal
187
203
  return '(-' . \PHP_INT_MAX . '-1)';
188
204
  }
189
205
 
190
- $kind = $node->getAttribute('kind', Scalar\LNumber::KIND_DEC);
191
- if (Scalar\LNumber::KIND_DEC === $kind) {
206
+ $kind = $node->getAttribute('kind', Scalar\Int_::KIND_DEC);
207
+ if (Scalar\Int_::KIND_DEC === $kind) {
192
208
  return (string) $node->value;
193
209
  }
194
210
 
@@ -200,22 +216,23 @@ class Standard extends PrettyPrinterAbstract
200
216
  $str = (string) $node->value;
201
217
  }
202
218
  switch ($kind) {
203
- case Scalar\LNumber::KIND_BIN:
219
+ case Scalar\Int_::KIND_BIN:
204
220
  return $sign . '0b' . base_convert($str, 10, 2);
205
- case Scalar\LNumber::KIND_OCT:
221
+ case Scalar\Int_::KIND_OCT:
206
222
  return $sign . '0' . base_convert($str, 10, 8);
207
- case Scalar\LNumber::KIND_HEX:
223
+ case Scalar\Int_::KIND_HEX:
208
224
  return $sign . '0x' . base_convert($str, 10, 16);
209
225
  }
210
226
  throw new \Exception('Invalid number kind');
211
227
  }
212
228
 
213
- protected function pScalar_DNumber(Scalar\DNumber $node) {
229
+ protected function pScalar_Float(Scalar\Float_ $node): string {
214
230
  if (!is_finite($node->value)) {
215
231
  if ($node->value === \INF) {
216
- return '\INF';
217
- } elseif ($node->value === -\INF) {
218
- return '-\INF';
232
+ return '1.0E+1000';
233
+ }
234
+ if ($node->value === -\INF) {
235
+ return '-1.0E+1000';
219
236
  } else {
220
237
  return '\NAN';
221
238
  }
@@ -223,7 +240,7 @@ class Standard extends PrettyPrinterAbstract
223
240
 
224
241
  // Try to find a short full-precision representation
225
242
  $stringValue = sprintf('%.16G', $node->value);
226
- if ($node->value !== (double) $stringValue) {
243
+ if ($node->value !== (float) $stringValue) {
227
244
  $stringValue = sprintf('%.17G', $node->value);
228
245
  }
229
246
 
@@ -236,299 +253,288 @@ class Standard extends PrettyPrinterAbstract
236
253
  return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue;
237
254
  }
238
255
 
239
- protected function pScalar_EncapsedStringPart(Scalar\EncapsedStringPart $node) {
240
- throw new \LogicException('Cannot directly print EncapsedStringPart');
241
- }
242
-
243
256
  // Assignments
244
257
 
245
- protected function pExpr_Assign(Expr\Assign $node) {
246
- return $this->pInfixOp(Expr\Assign::class, $node->var, ' = ', $node->expr);
258
+ protected function pExpr_Assign(Expr\Assign $node, int $precedence, int $lhsPrecedence): string {
259
+ return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr, $precedence, $lhsPrecedence);
247
260
  }
248
261
 
249
- protected function pExpr_AssignRef(Expr\AssignRef $node) {
250
- return $this->pInfixOp(Expr\AssignRef::class, $node->var, ' =& ', $node->expr);
262
+ protected function pExpr_AssignRef(Expr\AssignRef $node, int $precedence, int $lhsPrecedence): string {
263
+ return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr, $precedence, $lhsPrecedence);
251
264
  }
252
265
 
253
- protected function pExpr_AssignOp_Plus(AssignOp\Plus $node) {
254
- return $this->pInfixOp(AssignOp\Plus::class, $node->var, ' += ', $node->expr);
266
+ protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $precedence, int $lhsPrecedence): string {
267
+ return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr, $precedence, $lhsPrecedence);
255
268
  }
256
269
 
257
- protected function pExpr_AssignOp_Minus(AssignOp\Minus $node) {
258
- return $this->pInfixOp(AssignOp\Minus::class, $node->var, ' -= ', $node->expr);
270
+ protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $precedence, int $lhsPrecedence): string {
271
+ return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr, $precedence, $lhsPrecedence);
259
272
  }
260
273
 
261
- protected function pExpr_AssignOp_Mul(AssignOp\Mul $node) {
262
- return $this->pInfixOp(AssignOp\Mul::class, $node->var, ' *= ', $node->expr);
274
+ protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precedence, int $lhsPrecedence): string {
275
+ return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr, $precedence, $lhsPrecedence);
263
276
  }
264
277
 
265
- protected function pExpr_AssignOp_Div(AssignOp\Div $node) {
266
- return $this->pInfixOp(AssignOp\Div::class, $node->var, ' /= ', $node->expr);
278
+ protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precedence, int $lhsPrecedence): string {
279
+ return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr, $precedence, $lhsPrecedence);
267
280
  }
268
281
 
269
- protected function pExpr_AssignOp_Concat(AssignOp\Concat $node) {
270
- return $this->pInfixOp(AssignOp\Concat::class, $node->var, ' .= ', $node->expr);
282
+ protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $precedence, int $lhsPrecedence): string {
283
+ return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr, $precedence, $lhsPrecedence);
271
284
  }
272
285
 
273
- protected function pExpr_AssignOp_Mod(AssignOp\Mod $node) {
274
- return $this->pInfixOp(AssignOp\Mod::class, $node->var, ' %= ', $node->expr);
286
+ protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precedence, int $lhsPrecedence): string {
287
+ return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr, $precedence, $lhsPrecedence);
275
288
  }
276
289
 
277
- protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node) {
278
- return $this->pInfixOp(AssignOp\BitwiseAnd::class, $node->var, ' &= ', $node->expr);
290
+ protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string {
291
+ return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr, $precedence, $lhsPrecedence);
279
292
  }
280
293
 
281
- protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node) {
282
- return $this->pInfixOp(AssignOp\BitwiseOr::class, $node->var, ' |= ', $node->expr);
294
+ protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string {
295
+ return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr, $precedence, $lhsPrecedence);
283
296
  }
284
297
 
285
- protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node) {
286
- return $this->pInfixOp(AssignOp\BitwiseXor::class, $node->var, ' ^= ', $node->expr);
298
+ protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string {
299
+ return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr, $precedence, $lhsPrecedence);
287
300
  }
288
301
 
289
- protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node) {
290
- return $this->pInfixOp(AssignOp\ShiftLeft::class, $node->var, ' <<= ', $node->expr);
302
+ protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string {
303
+ return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr, $precedence, $lhsPrecedence);
291
304
  }
292
305
 
293
- protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node) {
294
- return $this->pInfixOp(AssignOp\ShiftRight::class, $node->var, ' >>= ', $node->expr);
306
+ protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string {
307
+ return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr, $precedence, $lhsPrecedence);
295
308
  }
296
309
 
297
- protected function pExpr_AssignOp_Pow(AssignOp\Pow $node) {
298
- return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr);
310
+ protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precedence, int $lhsPrecedence): string {
311
+ return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr, $precedence, $lhsPrecedence);
299
312
  }
300
313
 
301
- protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) {
302
- return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr);
314
+ protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, int $precedence, int $lhsPrecedence): string {
315
+ return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr, $precedence, $lhsPrecedence);
303
316
  }
304
317
 
305
318
  // Binary expressions
306
319
 
307
- protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) {
308
- return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right);
320
+ protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $precedence, int $lhsPrecedence): string {
321
+ return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence);
309
322
  }
310
323
 
311
- protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node) {
312
- return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right);
324
+ protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $precedence, int $lhsPrecedence): string {
325
+ return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right, $precedence, $lhsPrecedence);
313
326
  }
314
327
 
315
- protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node) {
316
- return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right);
328
+ protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precedence, int $lhsPrecedence): string {
329
+ return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right, $precedence, $lhsPrecedence);
317
330
  }
318
331
 
319
- protected function pExpr_BinaryOp_Div(BinaryOp\Div $node) {
320
- return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right);
332
+ protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precedence, int $lhsPrecedence): string {
333
+ return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right, $precedence, $lhsPrecedence);
321
334
  }
322
335
 
323
- protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node) {
324
- return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right);
336
+ protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $precedence, int $lhsPrecedence): string {
337
+ return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right, $precedence, $lhsPrecedence);
325
338
  }
326
339
 
327
- protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node) {
328
- return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right);
340
+ protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precedence, int $lhsPrecedence): string {
341
+ return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right, $precedence, $lhsPrecedence);
329
342
  }
330
343
 
331
- protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node) {
332
- return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right);
344
+ protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node, int $precedence, int $lhsPrecedence): string {
345
+ return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right, $precedence, $lhsPrecedence);
333
346
  }
334
347
 
335
- protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node) {
336
- return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right);
348
+ protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, int $precedence, int $lhsPrecedence): string {
349
+ return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right, $precedence, $lhsPrecedence);
337
350
  }
338
351
 
339
- protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node) {
340
- return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right);
352
+ protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string {
353
+ return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right, $precedence, $lhsPrecedence);
341
354
  }
342
355
 
343
- protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node) {
344
- return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right);
356
+ protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string {
357
+ return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right, $precedence, $lhsPrecedence);
345
358
  }
346
359
 
347
- protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node) {
348
- return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right);
360
+ protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string {
361
+ return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right, $precedence, $lhsPrecedence);
349
362
  }
350
363
 
351
- protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node) {
352
- return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right);
364
+ protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string {
365
+ return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right, $precedence, $lhsPrecedence);
353
366
  }
354
367
 
355
- protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node) {
356
- return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right);
368
+ protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string {
369
+ return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right, $precedence, $lhsPrecedence);
357
370
  }
358
371
 
359
- protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node) {
360
- return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right);
372
+ protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precedence, int $lhsPrecedence): string {
373
+ return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right, $precedence, $lhsPrecedence);
361
374
  }
362
375
 
363
- protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node) {
364
- return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right);
376
+ protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node, int $precedence, int $lhsPrecedence): string {
377
+ return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right, $precedence, $lhsPrecedence);
365
378
  }
366
379
 
367
- protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node) {
368
- return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right);
380
+ protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, int $precedence, int $lhsPrecedence): string {
381
+ return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right, $precedence, $lhsPrecedence);
369
382
  }
370
383
 
371
- protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node) {
372
- return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right);
384
+ protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node, int $precedence, int $lhsPrecedence): string {
385
+ return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right, $precedence, $lhsPrecedence);
373
386
  }
374
387
 
375
- protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node) {
376
- return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right);
388
+ protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $precedence, int $lhsPrecedence): string {
389
+ return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right, $precedence, $lhsPrecedence);
377
390
  }
378
391
 
379
- protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node) {
380
- return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right);
392
+ protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, int $precedence, int $lhsPrecedence): string {
393
+ return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right, $precedence, $lhsPrecedence);
381
394
  }
382
395
 
383
- protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node) {
384
- return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right);
396
+ protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, int $precedence, int $lhsPrecedence): string {
397
+ return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right, $precedence, $lhsPrecedence);
385
398
  }
386
399
 
387
- protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node) {
388
- return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right);
400
+ protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node, int $precedence, int $lhsPrecedence): string {
401
+ return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right, $precedence, $lhsPrecedence);
389
402
  }
390
403
 
391
- protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node) {
392
- return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right);
404
+ protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, int $precedence, int $lhsPrecedence): string {
405
+ return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right, $precedence, $lhsPrecedence);
393
406
  }
394
407
 
395
- protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node) {
396
- return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right);
408
+ protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int $precedence, int $lhsPrecedence): string {
409
+ return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right, $precedence, $lhsPrecedence);
397
410
  }
398
411
 
399
- protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node) {
400
- return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right);
412
+ protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node, int $precedence, int $lhsPrecedence): string {
413
+ return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right, $precedence, $lhsPrecedence);
401
414
  }
402
415
 
403
- protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node) {
404
- return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right);
416
+ protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int $precedence, int $lhsPrecedence): string {
417
+ return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right, $precedence, $lhsPrecedence);
405
418
  }
406
419
 
407
- protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node) {
408
- return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right);
420
+ protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node, int $precedence, int $lhsPrecedence): string {
421
+ return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right, $precedence, $lhsPrecedence);
409
422
  }
410
423
 
411
- protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node) {
412
- return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right);
424
+ protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precedence, int $lhsPrecedence): string {
425
+ return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right, $precedence, $lhsPrecedence);
413
426
  }
414
427
 
415
- protected function pExpr_Instanceof(Expr\Instanceof_ $node) {
416
- list($precedence, $associativity) = $this->precedenceMap[Expr\Instanceof_::class];
417
- return $this->pPrec($node->expr, $precedence, $associativity, -1)
418
- . ' instanceof '
419
- . $this->pNewVariable($node->class);
428
+ protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence): string {
429
+ return $this->pPostfixOp(
430
+ Expr\Instanceof_::class, $node->expr,
431
+ ' instanceof ' . $this->pNewOperand($node->class),
432
+ $precedence, $lhsPrecedence);
420
433
  }
421
434
 
422
435
  // Unary expressions
423
436
 
424
- protected function pExpr_BooleanNot(Expr\BooleanNot $node) {
425
- return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr);
437
+ protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $precedence, int $lhsPrecedence): string {
438
+ return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr, $precedence, $lhsPrecedence);
426
439
  }
427
440
 
428
- protected function pExpr_BitwiseNot(Expr\BitwiseNot $node) {
429
- return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr);
441
+ protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int $lhsPrecedence): string {
442
+ return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr, $precedence, $lhsPrecedence);
430
443
  }
431
444
 
432
- protected function pExpr_UnaryMinus(Expr\UnaryMinus $node) {
433
- if ($node->expr instanceof Expr\UnaryMinus || $node->expr instanceof Expr\PreDec) {
434
- // Enforce -(-$expr) instead of --$expr
435
- return '-(' . $this->p($node->expr) . ')';
436
- }
437
- return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr);
445
+ protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence): string {
446
+ return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr, $precedence, $lhsPrecedence);
438
447
  }
439
448
 
440
- protected function pExpr_UnaryPlus(Expr\UnaryPlus $node) {
441
- if ($node->expr instanceof Expr\UnaryPlus || $node->expr instanceof Expr\PreInc) {
442
- // Enforce +(+$expr) instead of ++$expr
443
- return '+(' . $this->p($node->expr) . ')';
444
- }
445
- return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr);
449
+ protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence): string {
450
+ return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence);
446
451
  }
447
452
 
448
- protected function pExpr_PreInc(Expr\PreInc $node) {
449
- return $this->pPrefixOp(Expr\PreInc::class, '++', $node->var);
453
+ protected function pExpr_PreInc(Expr\PreInc $node): string {
454
+ return '++' . $this->p($node->var);
450
455
  }
451
456
 
452
- protected function pExpr_PreDec(Expr\PreDec $node) {
453
- return $this->pPrefixOp(Expr\PreDec::class, '--', $node->var);
457
+ protected function pExpr_PreDec(Expr\PreDec $node): string {
458
+ return '--' . $this->p($node->var);
454
459
  }
455
460
 
456
- protected function pExpr_PostInc(Expr\PostInc $node) {
457
- return $this->pPostfixOp(Expr\PostInc::class, $node->var, '++');
461
+ protected function pExpr_PostInc(Expr\PostInc $node): string {
462
+ return $this->p($node->var) . '++';
458
463
  }
459
464
 
460
- protected function pExpr_PostDec(Expr\PostDec $node) {
461
- return $this->pPostfixOp(Expr\PostDec::class, $node->var, '--');
465
+ protected function pExpr_PostDec(Expr\PostDec $node): string {
466
+ return $this->p($node->var) . '--';
462
467
  }
463
468
 
464
- protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node) {
465
- return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr);
469
+ protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $precedence, int $lhsPrecedence): string {
470
+ return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr, $precedence, $lhsPrecedence);
466
471
  }
467
472
 
468
- protected function pExpr_YieldFrom(Expr\YieldFrom $node) {
469
- return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr);
473
+ protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $precedence, int $lhsPrecedence): string {
474
+ return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr, $precedence, $lhsPrecedence);
470
475
  }
471
476
 
472
- protected function pExpr_Print(Expr\Print_ $node) {
473
- return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr);
477
+ protected function pExpr_Print(Expr\Print_ $node, int $precedence, int $lhsPrecedence): string {
478
+ return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr, $precedence, $lhsPrecedence);
474
479
  }
475
480
 
476
481
  // Casts
477
482
 
478
- protected function pExpr_Cast_Int(Cast\Int_ $node) {
479
- return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr);
483
+ protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence): string {
484
+ return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr, $precedence, $lhsPrecedence);
480
485
  }
481
486
 
482
- protected function pExpr_Cast_Double(Cast\Double $node) {
487
+ protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lhsPrecedence): string {
483
488
  $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE);
484
489
  if ($kind === Cast\Double::KIND_DOUBLE) {
485
490
  $cast = '(double)';
486
491
  } elseif ($kind === Cast\Double::KIND_FLOAT) {
487
492
  $cast = '(float)';
488
- } elseif ($kind === Cast\Double::KIND_REAL) {
493
+ } else {
494
+ assert($kind === Cast\Double::KIND_REAL);
489
495
  $cast = '(real)';
490
496
  }
491
- return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr);
497
+ return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr, $precedence, $lhsPrecedence);
492
498
  }
493
499
 
494
- protected function pExpr_Cast_String(Cast\String_ $node) {
495
- return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr);
500
+ protected function pExpr_Cast_String(Cast\String_ $node, int $precedence, int $lhsPrecedence): string {
501
+ return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr, $precedence, $lhsPrecedence);
496
502
  }
497
503
 
498
- protected function pExpr_Cast_Array(Cast\Array_ $node) {
499
- return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr);
504
+ protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence): string {
505
+ return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr, $precedence, $lhsPrecedence);
500
506
  }
501
507
 
502
- protected function pExpr_Cast_Object(Cast\Object_ $node) {
503
- return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr);
508
+ protected function pExpr_Cast_Object(Cast\Object_ $node, int $precedence, int $lhsPrecedence): string {
509
+ return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr, $precedence, $lhsPrecedence);
504
510
  }
505
511
 
506
- protected function pExpr_Cast_Bool(Cast\Bool_ $node) {
507
- return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr);
512
+ protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence): string {
513
+ return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr, $precedence, $lhsPrecedence);
508
514
  }
509
515
 
510
- protected function pExpr_Cast_Unset(Cast\Unset_ $node) {
511
- return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr);
516
+ protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhsPrecedence): string {
517
+ return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr, $precedence, $lhsPrecedence);
512
518
  }
513
519
 
514
520
  // Function calls and similar constructs
515
521
 
516
- protected function pExpr_FuncCall(Expr\FuncCall $node) {
522
+ protected function pExpr_FuncCall(Expr\FuncCall $node): string {
517
523
  return $this->pCallLhs($node->name)
518
524
  . '(' . $this->pMaybeMultiline($node->args) . ')';
519
525
  }
520
526
 
521
- protected function pExpr_MethodCall(Expr\MethodCall $node) {
527
+ protected function pExpr_MethodCall(Expr\MethodCall $node): string {
522
528
  return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name)
523
529
  . '(' . $this->pMaybeMultiline($node->args) . ')';
524
530
  }
525
531
 
526
- protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node) {
532
+ protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node): string {
527
533
  return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name)
528
534
  . '(' . $this->pMaybeMultiline($node->args) . ')';
529
535
  }
530
536
 
531
- protected function pExpr_StaticCall(Expr\StaticCall $node) {
537
+ protected function pExpr_StaticCall(Expr\StaticCall $node): string {
532
538
  return $this->pStaticDereferenceLhs($node->class) . '::'
533
539
  . ($node->name instanceof Expr
534
540
  ? ($node->name instanceof Expr\Variable
@@ -538,19 +544,19 @@ class Standard extends PrettyPrinterAbstract
538
544
  . '(' . $this->pMaybeMultiline($node->args) . ')';
539
545
  }
540
546
 
541
- protected function pExpr_Empty(Expr\Empty_ $node) {
547
+ protected function pExpr_Empty(Expr\Empty_ $node): string {
542
548
  return 'empty(' . $this->p($node->expr) . ')';
543
549
  }
544
550
 
545
- protected function pExpr_Isset(Expr\Isset_ $node) {
551
+ protected function pExpr_Isset(Expr\Isset_ $node): string {
546
552
  return 'isset(' . $this->pCommaSeparated($node->vars) . ')';
547
553
  }
548
554
 
549
- protected function pExpr_Eval(Expr\Eval_ $node) {
555
+ protected function pExpr_Eval(Expr\Eval_ $node): string {
550
556
  return 'eval(' . $this->p($node->expr) . ')';
551
557
  }
552
558
 
553
- protected function pExpr_Include(Expr\Include_ $node) {
559
+ protected function pExpr_Include(Expr\Include_ $node, int $precedence, int $lhsPrecedence): string {
554
560
  static $map = [
555
561
  Expr\Include_::TYPE_INCLUDE => 'include',
556
562
  Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once',
@@ -558,20 +564,26 @@ class Standard extends PrettyPrinterAbstract
558
564
  Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once',
559
565
  ];
560
566
 
561
- return $map[$node->type] . ' ' . $this->p($node->expr);
567
+ return $this->pPrefixOp(Expr\Include_::class, $map[$node->type] . ' ', $node->expr, $precedence, $lhsPrecedence);
562
568
  }
563
569
 
564
- protected function pExpr_List(Expr\List_ $node) {
565
- return 'list(' . $this->pCommaSeparated($node->items) . ')';
570
+ protected function pExpr_List(Expr\List_ $node): string {
571
+ $syntax = $node->getAttribute('kind',
572
+ $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST);
573
+ if ($syntax === Expr\List_::KIND_ARRAY) {
574
+ return '[' . $this->pMaybeMultiline($node->items, true) . ']';
575
+ } else {
576
+ return 'list(' . $this->pMaybeMultiline($node->items, true) . ')';
577
+ }
566
578
  }
567
579
 
568
580
  // Other
569
581
 
570
- protected function pExpr_Error(Expr\Error $node) {
582
+ protected function pExpr_Error(Expr\Error $node): string {
571
583
  throw new \LogicException('Cannot pretty-print AST with Error nodes');
572
584
  }
573
585
 
574
- protected function pExpr_Variable(Expr\Variable $node) {
586
+ protected function pExpr_Variable(Expr\Variable $node): string {
575
587
  if ($node->name instanceof Expr) {
576
588
  return '${' . $this->p($node->name) . '}';
577
589
  } else {
@@ -579,9 +591,9 @@ class Standard extends PrettyPrinterAbstract
579
591
  }
580
592
  }
581
593
 
582
- protected function pExpr_Array(Expr\Array_ $node) {
594
+ protected function pExpr_Array(Expr\Array_ $node): string {
583
595
  $syntax = $node->getAttribute('kind',
584
- $this->options['shortArraySyntax'] ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG);
596
+ $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG);
585
597
  if ($syntax === Expr\Array_::KIND_SHORT) {
586
598
  return '[' . $this->pMaybeMultiline($node->items, true) . ']';
587
599
  } else {
@@ -589,124 +601,152 @@ class Standard extends PrettyPrinterAbstract
589
601
  }
590
602
  }
591
603
 
592
- protected function pExpr_ArrayItem(Expr\ArrayItem $node) {
593
- return (null !== $node->key ? $this->p($node->key) . ' => ' : '')
604
+ protected function pKey(?Node $node): string {
605
+ if ($node === null) {
606
+ return '';
607
+ }
608
+
609
+ // => is not really an operator and does not typically participate in precedence resolution.
610
+ // However, there is an exception if yield expressions with keys are involved:
611
+ // [yield $a => $b] is interpreted as [(yield $a => $b)], so we need to ensure that
612
+ // [(yield $a) => $b] is printed with parentheses. We approximate this by lowering the LHS
613
+ // precedence to that of yield (which will also print unnecessary parentheses for rare low
614
+ // precedence unary operators like include).
615
+ $yieldPrecedence = $this->precedenceMap[Expr\Yield_::class][0];
616
+ return $this->p($node, self::MAX_PRECEDENCE, $yieldPrecedence) . ' => ';
617
+ }
618
+
619
+ protected function pArrayItem(Node\ArrayItem $node): string {
620
+ return $this->pKey($node->key)
594
621
  . ($node->byRef ? '&' : '')
595
622
  . ($node->unpack ? '...' : '')
596
623
  . $this->p($node->value);
597
624
  }
598
625
 
599
- protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) {
626
+ protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node): string {
600
627
  return $this->pDereferenceLhs($node->var)
601
628
  . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']';
602
629
  }
603
630
 
604
- protected function pExpr_ConstFetch(Expr\ConstFetch $node) {
631
+ protected function pExpr_ConstFetch(Expr\ConstFetch $node): string {
605
632
  return $this->p($node->name);
606
633
  }
607
634
 
608
- protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node) {
635
+ protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string {
609
636
  return $this->pStaticDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name);
610
637
  }
611
638
 
612
- protected function pExpr_PropertyFetch(Expr\PropertyFetch $node) {
639
+ protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string {
613
640
  return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name);
614
641
  }
615
642
 
616
- protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node) {
643
+ protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node): string {
617
644
  return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name);
618
645
  }
619
646
 
620
- protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node) {
647
+ protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node): string {
621
648
  return $this->pStaticDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name);
622
649
  }
623
650
 
624
- protected function pExpr_ShellExec(Expr\ShellExec $node) {
651
+ protected function pExpr_ShellExec(Expr\ShellExec $node): string {
625
652
  return '`' . $this->pEncapsList($node->parts, '`') . '`';
626
653
  }
627
654
 
628
- protected function pExpr_Closure(Expr\Closure $node) {
655
+ protected function pExpr_Closure(Expr\Closure $node): string {
629
656
  return $this->pAttrGroups($node->attrGroups, true)
630
- . ($node->static ? 'static ' : '')
657
+ . $this->pStatic($node->static)
631
658
  . 'function ' . ($node->byRef ? '&' : '')
632
- . '(' . $this->pCommaSeparated($node->params) . ')'
633
- . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '')
634
- . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '')
659
+ . '(' . $this->pParams($node->params) . ')'
660
+ . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '')
661
+ . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '')
635
662
  . ' {' . $this->pStmts($node->stmts) . $this->nl . '}';
636
663
  }
637
664
 
638
- protected function pExpr_Match(Expr\Match_ $node) {
665
+ protected function pExpr_Match(Expr\Match_ $node): string {
639
666
  return 'match (' . $this->p($node->cond) . ') {'
640
667
  . $this->pCommaSeparatedMultiline($node->arms, true)
641
668
  . $this->nl
642
669
  . '}';
643
670
  }
644
671
 
645
- protected function pMatchArm(Node\MatchArm $node) {
646
- return ($node->conds ? $this->pCommaSeparated($node->conds) : 'default')
647
- . ' => ' . $this->p($node->body);
672
+ protected function pMatchArm(Node\MatchArm $node): string {
673
+ $result = '';
674
+ if ($node->conds) {
675
+ for ($i = 0, $c = \count($node->conds); $i + 1 < $c; $i++) {
676
+ $result .= $this->p($node->conds[$i]) . ', ';
677
+ }
678
+ $result .= $this->pKey($node->conds[$i]);
679
+ } else {
680
+ $result = 'default => ';
681
+ }
682
+ return $result . $this->p($node->body);
648
683
  }
649
684
 
650
- protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) {
651
- return $this->pAttrGroups($node->attrGroups, true)
652
- . ($node->static ? 'static ' : '')
685
+ protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence): string {
686
+ return $this->pPrefixOp(
687
+ Expr\ArrowFunction::class,
688
+ $this->pAttrGroups($node->attrGroups, true)
689
+ . $this->pStatic($node->static)
653
690
  . 'fn' . ($node->byRef ? '&' : '')
654
- . '(' . $this->pCommaSeparated($node->params) . ')'
691
+ . '(' . $this->pParams($node->params) . ')'
655
692
  . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '')
656
- . ' => '
657
- . $this->p($node->expr);
693
+ . ' => ',
694
+ $node->expr, $precedence, $lhsPrecedence);
658
695
  }
659
696
 
660
- protected function pExpr_ClosureUse(Expr\ClosureUse $node) {
697
+ protected function pClosureUse(Node\ClosureUse $node): string {
661
698
  return ($node->byRef ? '&' : '') . $this->p($node->var);
662
699
  }
663
700
 
664
- protected function pExpr_New(Expr\New_ $node) {
701
+ protected function pExpr_New(Expr\New_ $node): string {
665
702
  if ($node->class instanceof Stmt\Class_) {
666
703
  $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : '';
667
704
  return 'new ' . $this->pClassCommon($node->class, $args);
668
705
  }
669
- return 'new ' . $this->pNewVariable($node->class)
706
+ return 'new ' . $this->pNewOperand($node->class)
670
707
  . '(' . $this->pMaybeMultiline($node->args) . ')';
671
708
  }
672
709
 
673
- protected function pExpr_Clone(Expr\Clone_ $node) {
674
- return 'clone ' . $this->p($node->expr);
710
+ protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int $lhsPrecedence): string {
711
+ return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr, $precedence, $lhsPrecedence);
675
712
  }
676
713
 
677
- protected function pExpr_Ternary(Expr\Ternary $node) {
714
+ protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, int $lhsPrecedence): string {
678
715
  // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator.
679
716
  // this is okay because the part between ? and : never needs parentheses.
680
717
  return $this->pInfixOp(Expr\Ternary::class,
681
- $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else
718
+ $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else,
719
+ $precedence, $lhsPrecedence
682
720
  );
683
721
  }
684
722
 
685
- protected function pExpr_Exit(Expr\Exit_ $node) {
723
+ protected function pExpr_Exit(Expr\Exit_ $node): string {
686
724
  $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE);
687
725
  return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die')
688
726
  . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : '');
689
727
  }
690
728
 
691
- protected function pExpr_Throw(Expr\Throw_ $node) {
692
- return 'throw ' . $this->p($node->expr);
729
+ protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrecedence): string {
730
+ return $this->pPrefixOp(Expr\Throw_::class, 'throw ', $node->expr, $precedence, $lhsPrecedence);
693
731
  }
694
732
 
695
- protected function pExpr_Yield(Expr\Yield_ $node) {
733
+ protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence): string {
696
734
  if ($node->value === null) {
697
- return 'yield';
735
+ $opPrecedence = $this->precedenceMap[Expr\Yield_::class][0];
736
+ return $opPrecedence >= $lhsPrecedence ? '(yield)' : 'yield';
698
737
  } else {
699
- // this is a bit ugly, but currently there is no way to detect whether the parentheses are necessary
700
- return '(yield '
701
- . ($node->key !== null ? $this->p($node->key) . ' => ' : '')
702
- . $this->p($node->value)
703
- . ')';
738
+ if (!$this->phpVersion->supportsYieldWithoutParentheses()) {
739
+ return '(yield ' . $this->pKey($node->key) . $this->p($node->value) . ')';
740
+ }
741
+ return $this->pPrefixOp(
742
+ Expr\Yield_::class, 'yield ' . $this->pKey($node->key),
743
+ $node->value, $precedence, $lhsPrecedence);
704
744
  }
705
745
  }
706
746
 
707
747
  // Declarations
708
748
 
709
- protected function pStmt_Namespace(Stmt\Namespace_ $node) {
749
+ protected function pStmt_Namespace(Stmt\Namespace_ $node): string {
710
750
  if ($this->canUseSemicolonNamespaces) {
711
751
  return 'namespace ' . $this->p($node->name) . ';'
712
752
  . $this->nl . $this->pStmts($node->stmts, false);
@@ -716,102 +756,112 @@ class Standard extends PrettyPrinterAbstract
716
756
  }
717
757
  }
718
758
 
719
- protected function pStmt_Use(Stmt\Use_ $node) {
759
+ protected function pStmt_Use(Stmt\Use_ $node): string {
720
760
  return 'use ' . $this->pUseType($node->type)
721
761
  . $this->pCommaSeparated($node->uses) . ';';
722
762
  }
723
763
 
724
- protected function pStmt_GroupUse(Stmt\GroupUse $node) {
764
+ protected function pStmt_GroupUse(Stmt\GroupUse $node): string {
725
765
  return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix)
726
766
  . '\{' . $this->pCommaSeparated($node->uses) . '};';
727
767
  }
728
768
 
729
- protected function pStmt_UseUse(Stmt\UseUse $node) {
769
+ protected function pUseItem(Node\UseItem $node): string {
730
770
  return $this->pUseType($node->type) . $this->p($node->name)
731
771
  . (null !== $node->alias ? ' as ' . $node->alias : '');
732
772
  }
733
773
 
734
- protected function pUseType($type) {
774
+ protected function pUseType(int $type): string {
735
775
  return $type === Stmt\Use_::TYPE_FUNCTION ? 'function '
736
776
  : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : '');
737
777
  }
738
778
 
739
- protected function pStmt_Interface(Stmt\Interface_ $node) {
779
+ protected function pStmt_Interface(Stmt\Interface_ $node): string {
740
780
  return $this->pAttrGroups($node->attrGroups)
741
781
  . 'interface ' . $node->name
742
782
  . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '')
743
783
  . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
744
784
  }
745
785
 
746
- protected function pStmt_Enum(Stmt\Enum_ $node) {
786
+ protected function pStmt_Enum(Stmt\Enum_ $node): string {
747
787
  return $this->pAttrGroups($node->attrGroups)
748
788
  . 'enum ' . $node->name
749
- . ($node->scalarType ? " : $node->scalarType" : '')
789
+ . ($node->scalarType ? ' : ' . $this->p($node->scalarType) : '')
750
790
  . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '')
751
791
  . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
752
792
  }
753
793
 
754
- protected function pStmt_Class(Stmt\Class_ $node) {
794
+ protected function pStmt_Class(Stmt\Class_ $node): string {
755
795
  return $this->pClassCommon($node, ' ' . $node->name);
756
796
  }
757
797
 
758
- protected function pStmt_Trait(Stmt\Trait_ $node) {
798
+ protected function pStmt_Trait(Stmt\Trait_ $node): string {
759
799
  return $this->pAttrGroups($node->attrGroups)
760
800
  . 'trait ' . $node->name
761
801
  . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
762
802
  }
763
803
 
764
- protected function pStmt_EnumCase(Stmt\EnumCase $node) {
804
+ protected function pStmt_EnumCase(Stmt\EnumCase $node): string {
765
805
  return $this->pAttrGroups($node->attrGroups)
766
806
  . 'case ' . $node->name
767
807
  . ($node->expr ? ' = ' . $this->p($node->expr) : '')
768
808
  . ';';
769
809
  }
770
810
 
771
- protected function pStmt_TraitUse(Stmt\TraitUse $node) {
811
+ protected function pStmt_TraitUse(Stmt\TraitUse $node): string {
772
812
  return 'use ' . $this->pCommaSeparated($node->traits)
773
813
  . (empty($node->adaptations)
774
814
  ? ';'
775
815
  : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}');
776
816
  }
777
817
 
778
- protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node) {
818
+ protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node): string {
779
819
  return $this->p($node->trait) . '::' . $node->method
780
820
  . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';';
781
821
  }
782
822
 
783
- protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node) {
823
+ protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node): string {
784
824
  return (null !== $node->trait ? $this->p($node->trait) . '::' : '')
785
825
  . $node->method . ' as'
786
826
  . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '')
787
- . (null !== $node->newName ? ' ' . $node->newName : '')
827
+ . (null !== $node->newName ? ' ' . $node->newName : '')
788
828
  . ';';
789
829
  }
790
830
 
791
- protected function pStmt_Property(Stmt\Property $node) {
831
+ protected function pStmt_Property(Stmt\Property $node): string {
792
832
  return $this->pAttrGroups($node->attrGroups)
793
833
  . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags))
794
834
  . ($node->type ? $this->p($node->type) . ' ' : '')
795
- . $this->pCommaSeparated($node->props) . ';';
835
+ . $this->pCommaSeparated($node->props)
836
+ . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ';');
796
837
  }
797
838
 
798
- protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) {
839
+ protected function pPropertyItem(Node\PropertyItem $node): string {
799
840
  return '$' . $node->name
800
841
  . (null !== $node->default ? ' = ' . $this->p($node->default) : '');
801
842
  }
802
843
 
803
- protected function pStmt_ClassMethod(Stmt\ClassMethod $node) {
844
+ protected function pPropertyHook(Node\PropertyHook $node): string {
845
+ return $this->pAttrGroups($node->attrGroups)
846
+ . $this->pModifiers($node->flags)
847
+ . ($node->byRef ? '&' : '') . $node->name
848
+ . ($node->params ? '(' . $this->pParams($node->params) . ')' : '')
849
+ . (\is_array($node->body) ? ' {' . $this->pStmts($node->body) . $this->nl . '}'
850
+ : ($node->body !== null ? ' => ' . $this->p($node->body) : '') . ';');
851
+ }
852
+
853
+ protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string {
804
854
  return $this->pAttrGroups($node->attrGroups)
805
855
  . $this->pModifiers($node->flags)
806
856
  . 'function ' . ($node->byRef ? '&' : '') . $node->name
807
- . '(' . $this->pMaybeMultiline($node->params) . ')'
808
- . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '')
857
+ . '(' . $this->pParams($node->params) . ')'
858
+ . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '')
809
859
  . (null !== $node->stmts
810
860
  ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'
811
861
  : ';');
812
862
  }
813
863
 
814
- protected function pStmt_ClassConst(Stmt\ClassConst $node) {
864
+ protected function pStmt_ClassConst(Stmt\ClassConst $node): string {
815
865
  return $this->pAttrGroups($node->attrGroups)
816
866
  . $this->pModifiers($node->flags)
817
867
  . 'const '
@@ -819,46 +869,52 @@ class Standard extends PrettyPrinterAbstract
819
869
  . $this->pCommaSeparated($node->consts) . ';';
820
870
  }
821
871
 
822
- protected function pStmt_Function(Stmt\Function_ $node) {
872
+ protected function pStmt_Function(Stmt\Function_ $node): string {
823
873
  return $this->pAttrGroups($node->attrGroups)
824
874
  . 'function ' . ($node->byRef ? '&' : '') . $node->name
825
- . '(' . $this->pCommaSeparated($node->params) . ')'
826
- . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '')
875
+ . '(' . $this->pParams($node->params) . ')'
876
+ . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '')
827
877
  . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
828
878
  }
829
879
 
830
- protected function pStmt_Const(Stmt\Const_ $node) {
831
- return 'const ' . $this->pCommaSeparated($node->consts) . ';';
880
+ protected function pStmt_Const(Stmt\Const_ $node): string {
881
+ return $this->pAttrGroups($node->attrGroups)
882
+ . 'const '
883
+ . $this->pCommaSeparated($node->consts) . ';';
832
884
  }
833
885
 
834
- protected function pStmt_Declare(Stmt\Declare_ $node) {
886
+ protected function pStmt_Declare(Stmt\Declare_ $node): string {
835
887
  return 'declare (' . $this->pCommaSeparated($node->declares) . ')'
836
888
  . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';');
837
889
  }
838
890
 
839
- protected function pStmt_DeclareDeclare(Stmt\DeclareDeclare $node) {
891
+ protected function pDeclareItem(Node\DeclareItem $node): string {
840
892
  return $node->key . '=' . $this->p($node->value);
841
893
  }
842
894
 
843
895
  // Control flow
844
896
 
845
- protected function pStmt_If(Stmt\If_ $node) {
897
+ protected function pStmt_If(Stmt\If_ $node): string {
846
898
  return 'if (' . $this->p($node->cond) . ') {'
847
899
  . $this->pStmts($node->stmts) . $this->nl . '}'
848
900
  . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '')
849
901
  . (null !== $node->else ? ' ' . $this->p($node->else) : '');
850
902
  }
851
903
 
852
- protected function pStmt_ElseIf(Stmt\ElseIf_ $node) {
904
+ protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string {
853
905
  return 'elseif (' . $this->p($node->cond) . ') {'
854
906
  . $this->pStmts($node->stmts) . $this->nl . '}';
855
907
  }
856
908
 
857
- protected function pStmt_Else(Stmt\Else_ $node) {
909
+ protected function pStmt_Else(Stmt\Else_ $node): string {
910
+ if (\count($node->stmts) === 1 && $node->stmts[0] instanceof Stmt\If_) {
911
+ // Print as "else if" rather than "else { if }"
912
+ return 'else ' . $this->p($node->stmts[0]);
913
+ }
858
914
  return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}';
859
915
  }
860
916
 
861
- protected function pStmt_For(Stmt\For_ $node) {
917
+ protected function pStmt_For(Stmt\For_ $node): string {
862
918
  return 'for ('
863
919
  . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '')
864
920
  . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '')
@@ -866,116 +922,116 @@ class Standard extends PrettyPrinterAbstract
866
922
  . ') {' . $this->pStmts($node->stmts) . $this->nl . '}';
867
923
  }
868
924
 
869
- protected function pStmt_Foreach(Stmt\Foreach_ $node) {
925
+ protected function pStmt_Foreach(Stmt\Foreach_ $node): string {
870
926
  return 'foreach (' . $this->p($node->expr) . ' as '
871
927
  . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '')
872
928
  . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {'
873
929
  . $this->pStmts($node->stmts) . $this->nl . '}';
874
930
  }
875
931
 
876
- protected function pStmt_While(Stmt\While_ $node) {
932
+ protected function pStmt_While(Stmt\While_ $node): string {
877
933
  return 'while (' . $this->p($node->cond) . ') {'
878
934
  . $this->pStmts($node->stmts) . $this->nl . '}';
879
935
  }
880
936
 
881
- protected function pStmt_Do(Stmt\Do_ $node) {
937
+ protected function pStmt_Do(Stmt\Do_ $node): string {
882
938
  return 'do {' . $this->pStmts($node->stmts) . $this->nl
883
939
  . '} while (' . $this->p($node->cond) . ');';
884
940
  }
885
941
 
886
- protected function pStmt_Switch(Stmt\Switch_ $node) {
942
+ protected function pStmt_Switch(Stmt\Switch_ $node): string {
887
943
  return 'switch (' . $this->p($node->cond) . ') {'
888
944
  . $this->pStmts($node->cases) . $this->nl . '}';
889
945
  }
890
946
 
891
- protected function pStmt_Case(Stmt\Case_ $node) {
947
+ protected function pStmt_Case(Stmt\Case_ $node): string {
892
948
  return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':'
893
949
  . $this->pStmts($node->stmts);
894
950
  }
895
951
 
896
- protected function pStmt_TryCatch(Stmt\TryCatch $node) {
952
+ protected function pStmt_TryCatch(Stmt\TryCatch $node): string {
897
953
  return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}'
898
954
  . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '')
899
955
  . ($node->finally !== null ? ' ' . $this->p($node->finally) : '');
900
956
  }
901
957
 
902
- protected function pStmt_Catch(Stmt\Catch_ $node) {
958
+ protected function pStmt_Catch(Stmt\Catch_ $node): string {
903
959
  return 'catch (' . $this->pImplode($node->types, '|')
904
960
  . ($node->var !== null ? ' ' . $this->p($node->var) : '')
905
961
  . ') {' . $this->pStmts($node->stmts) . $this->nl . '}';
906
962
  }
907
963
 
908
- protected function pStmt_Finally(Stmt\Finally_ $node) {
964
+ protected function pStmt_Finally(Stmt\Finally_ $node): string {
909
965
  return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}';
910
966
  }
911
967
 
912
- protected function pStmt_Break(Stmt\Break_ $node) {
968
+ protected function pStmt_Break(Stmt\Break_ $node): string {
913
969
  return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';';
914
970
  }
915
971
 
916
- protected function pStmt_Continue(Stmt\Continue_ $node) {
972
+ protected function pStmt_Continue(Stmt\Continue_ $node): string {
917
973
  return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';';
918
974
  }
919
975
 
920
- protected function pStmt_Return(Stmt\Return_ $node) {
976
+ protected function pStmt_Return(Stmt\Return_ $node): string {
921
977
  return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';';
922
978
  }
923
979
 
924
- protected function pStmt_Throw(Stmt\Throw_ $node) {
925
- return 'throw ' . $this->p($node->expr) . ';';
926
- }
927
-
928
- protected function pStmt_Label(Stmt\Label $node) {
980
+ protected function pStmt_Label(Stmt\Label $node): string {
929
981
  return $node->name . ':';
930
982
  }
931
983
 
932
- protected function pStmt_Goto(Stmt\Goto_ $node) {
984
+ protected function pStmt_Goto(Stmt\Goto_ $node): string {
933
985
  return 'goto ' . $node->name . ';';
934
986
  }
935
987
 
936
988
  // Other
937
989
 
938
- protected function pStmt_Expression(Stmt\Expression $node) {
990
+ protected function pStmt_Expression(Stmt\Expression $node): string {
939
991
  return $this->p($node->expr) . ';';
940
992
  }
941
993
 
942
- protected function pStmt_Echo(Stmt\Echo_ $node) {
994
+ protected function pStmt_Echo(Stmt\Echo_ $node): string {
943
995
  return 'echo ' . $this->pCommaSeparated($node->exprs) . ';';
944
996
  }
945
997
 
946
- protected function pStmt_Static(Stmt\Static_ $node) {
998
+ protected function pStmt_Static(Stmt\Static_ $node): string {
947
999
  return 'static ' . $this->pCommaSeparated($node->vars) . ';';
948
1000
  }
949
1001
 
950
- protected function pStmt_Global(Stmt\Global_ $node) {
1002
+ protected function pStmt_Global(Stmt\Global_ $node): string {
951
1003
  return 'global ' . $this->pCommaSeparated($node->vars) . ';';
952
1004
  }
953
1005
 
954
- protected function pStmt_StaticVar(Stmt\StaticVar $node) {
1006
+ protected function pStaticVar(Node\StaticVar $node): string {
955
1007
  return $this->p($node->var)
956
1008
  . (null !== $node->default ? ' = ' . $this->p($node->default) : '');
957
1009
  }
958
1010
 
959
- protected function pStmt_Unset(Stmt\Unset_ $node) {
1011
+ protected function pStmt_Unset(Stmt\Unset_ $node): string {
960
1012
  return 'unset(' . $this->pCommaSeparated($node->vars) . ');';
961
1013
  }
962
1014
 
963
- protected function pStmt_InlineHTML(Stmt\InlineHTML $node) {
964
- $newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : '';
1015
+ protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string {
1016
+ $newline = $node->getAttribute('hasLeadingNewline', true) ? $this->newline : '';
965
1017
  return '?>' . $newline . $node->value . '<?php ';
966
1018
  }
967
1019
 
968
- protected function pStmt_HaltCompiler(Stmt\HaltCompiler $node) {
1020
+ protected function pStmt_HaltCompiler(Stmt\HaltCompiler $node): string {
969
1021
  return '__halt_compiler();' . $node->remaining;
970
1022
  }
971
1023
 
972
- protected function pStmt_Nop(Stmt\Nop $node) {
1024
+ protected function pStmt_Nop(Stmt\Nop $node): string {
973
1025
  return '';
974
1026
  }
975
1027
 
1028
+ protected function pStmt_Block(Stmt\Block $node): string {
1029
+ return '{' . $this->pStmts($node->stmts) . $this->nl . '}';
1030
+ }
1031
+
976
1032
  // Helpers
977
1033
 
978
- protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) {
1034
+ protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken): string {
979
1035
  return $this->pAttrGroups($node->attrGroups, $node->name === null)
980
1036
  . $this->pModifiers($node->flags)
981
1037
  . 'class' . $afterClassToken
@@ -984,18 +1040,20 @@ class Standard extends PrettyPrinterAbstract
984
1040
  . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}';
985
1041
  }
986
1042
 
987
- protected function pObjectProperty($node) {
1043
+ protected function pObjectProperty(Node $node): string {
988
1044
  if ($node instanceof Expr) {
989
1045
  return '{' . $this->p($node) . '}';
990
1046
  } else {
991
- return $node;
1047
+ assert($node instanceof Node\Identifier);
1048
+ return $node->name;
992
1049
  }
993
1050
  }
994
1051
 
995
- protected function pEncapsList(array $encapsList, $quote) {
1052
+ /** @param (Expr|Node\InterpolatedStringPart)[] $encapsList */
1053
+ protected function pEncapsList(array $encapsList, ?string $quote): string {
996
1054
  $return = '';
997
1055
  foreach ($encapsList as $element) {
998
- if ($element instanceof Scalar\EncapsedStringPart) {
1056
+ if ($element instanceof Node\InterpolatedStringPart) {
999
1057
  $return .= $this->escapeString($element->value, $quote);
1000
1058
  } else {
1001
1059
  $return .= '{' . $this->p($element) . '}';
@@ -1005,14 +1063,25 @@ class Standard extends PrettyPrinterAbstract
1005
1063
  return $return;
1006
1064
  }
1007
1065
 
1008
- protected function pSingleQuotedString(string $string) {
1009
- return '\'' . addcslashes($string, '\'\\') . '\'';
1066
+ protected function pSingleQuotedString(string $string): string {
1067
+ // It is idiomatic to only escape backslashes when necessary, i.e. when followed by ', \ or
1068
+ // the end of the string ('Foo\Bar' instead of 'Foo\\Bar'). However, we also don't want to
1069
+ // produce an odd number of backslashes, so '\\\\a' should not get rendered as '\\\a', even
1070
+ // though that would be legal.
1071
+ $regex = '/\'|\\\\(?=[\'\\\\]|$)|(?<=\\\\)\\\\/';
1072
+ return '\'' . preg_replace($regex, '\\\\$0', $string) . '\'';
1010
1073
  }
1011
1074
 
1012
- protected function escapeString($string, $quote) {
1075
+ protected function escapeString(string $string, ?string $quote): string {
1013
1076
  if (null === $quote) {
1014
1077
  // For doc strings, don't escape newlines
1015
1078
  $escaped = addcslashes($string, "\t\f\v$\\");
1079
+ // But do escape isolated \r. Combined with the terminating newline, it might get
1080
+ // interpreted as \r\n and dropped from the string contents.
1081
+ $escaped = preg_replace('/\r(?!\n)/', '\\r', $escaped);
1082
+ if ($this->phpVersion->supportsFlexibleHeredoc()) {
1083
+ $escaped = $this->indentString($escaped);
1084
+ }
1016
1085
  } else {
1017
1086
  $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\");
1018
1087
  }
@@ -1034,26 +1103,24 @@ class Standard extends PrettyPrinterAbstract
1034
1103
  | (?<=[\xF0-\xF4])[\x80-\xBF](?![\x80-\xBF]{2}) # Short 4 byte sequence
1035
1104
  | (?<=[\xF0-\xF4][\x80-\xBF])[\x80-\xBF](?![\x80-\xBF]) # Short 4 byte sequence (2)
1036
1105
  )/x';
1037
- return preg_replace_callback($regex, function ($matches) {
1106
+ return preg_replace_callback($regex, function ($matches): string {
1038
1107
  assert(strlen($matches[0]) === 1);
1039
- $hex = dechex(ord($matches[0]));;
1108
+ $hex = dechex(ord($matches[0]));
1040
1109
  return '\\x' . str_pad($hex, 2, '0', \STR_PAD_LEFT);
1041
1110
  }, $escaped);
1042
1111
  }
1043
1112
 
1044
- protected function containsEndLabel($string, $label, $atStart = true, $atEnd = true) {
1045
- $start = $atStart ? '(?:^|[\r\n])' : '[\r\n]';
1046
- $end = $atEnd ? '(?:$|[;\r\n])' : '[;\r\n]';
1113
+ protected function containsEndLabel(string $string, string $label, bool $atStart = true): bool {
1114
+ $start = $atStart ? '(?:^|[\r\n])[ \t]*' : '[\r\n][ \t]*';
1047
1115
  return false !== strpos($string, $label)
1048
- && preg_match('/' . $start . $label . $end . '/', $string);
1116
+ && preg_match('/' . $start . $label . '(?:$|[^_A-Za-z0-9\x80-\xff])/', $string);
1049
1117
  }
1050
1118
 
1051
- protected function encapsedContainsEndLabel(array $parts, $label) {
1119
+ /** @param (Expr|Node\InterpolatedStringPart)[] $parts */
1120
+ protected function encapsedContainsEndLabel(array $parts, string $label): bool {
1052
1121
  foreach ($parts as $i => $part) {
1053
- $atStart = $i === 0;
1054
- $atEnd = $i === count($parts) - 1;
1055
- if ($part instanceof Scalar\EncapsedStringPart
1056
- && $this->containsEndLabel($part->value, $label, $atStart, $atEnd)
1122
+ if ($part instanceof Node\InterpolatedStringPart
1123
+ && $this->containsEndLabel($this->escapeString($part->value, null), $label, $i === 0)
1057
1124
  ) {
1058
1125
  return true;
1059
1126
  }
@@ -1061,15 +1128,15 @@ class Standard extends PrettyPrinterAbstract
1061
1128
  return false;
1062
1129
  }
1063
1130
 
1064
- protected function pDereferenceLhs(Node $node) {
1131
+ protected function pDereferenceLhs(Node $node): string {
1065
1132
  if (!$this->dereferenceLhsRequiresParens($node)) {
1066
1133
  return $this->p($node);
1067
- } else {
1134
+ } else {
1068
1135
  return '(' . $this->p($node) . ')';
1069
1136
  }
1070
1137
  }
1071
1138
 
1072
- protected function pStaticDereferenceLhs(Node $node) {
1139
+ protected function pStaticDereferenceLhs(Node $node): string {
1073
1140
  if (!$this->staticDereferenceLhsRequiresParens($node)) {
1074
1141
  return $this->p($node);
1075
1142
  } else {
@@ -1077,15 +1144,15 @@ class Standard extends PrettyPrinterAbstract
1077
1144
  }
1078
1145
  }
1079
1146
 
1080
- protected function pCallLhs(Node $node) {
1147
+ protected function pCallLhs(Node $node): string {
1081
1148
  if (!$this->callLhsRequiresParens($node)) {
1082
1149
  return $this->p($node);
1083
- } else {
1150
+ } else {
1084
1151
  return '(' . $this->p($node) . ')';
1085
1152
  }
1086
1153
  }
1087
1154
 
1088
- protected function pNewVariable(Node $node): string {
1155
+ protected function pNewOperand(Node $node): string {
1089
1156
  if (!$this->newOperandRequiresParens($node)) {
1090
1157
  return $this->p($node);
1091
1158
  } else {
@@ -1095,9 +1162,8 @@ class Standard extends PrettyPrinterAbstract
1095
1162
 
1096
1163
  /**
1097
1164
  * @param Node[] $nodes
1098
- * @return bool
1099
1165
  */
1100
- protected function hasNodeWithComments(array $nodes) {
1166
+ protected function hasNodeWithComments(array $nodes): bool {
1101
1167
  foreach ($nodes as $node) {
1102
1168
  if ($node && $node->getComments()) {
1103
1169
  return true;
@@ -1106,7 +1172,8 @@ class Standard extends PrettyPrinterAbstract
1106
1172
  return false;
1107
1173
  }
1108
1174
 
1109
- protected function pMaybeMultiline(array $nodes, bool $trailingComma = false) {
1175
+ /** @param Node[] $nodes */
1176
+ protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): string {
1110
1177
  if (!$this->hasNodeWithComments($nodes)) {
1111
1178
  return $this->pCommaSeparated($nodes);
1112
1179
  } else {
@@ -1114,6 +1181,28 @@ class Standard extends PrettyPrinterAbstract
1114
1181
  }
1115
1182
  }
1116
1183
 
1184
+ /** @param Node\Param[] $params
1185
+ */
1186
+ private function hasParamWithAttributes(array $params): bool {
1187
+ foreach ($params as $param) {
1188
+ if ($param->attrGroups) {
1189
+ return true;
1190
+ }
1191
+ }
1192
+ return false;
1193
+ }
1194
+
1195
+ /** @param Node\Param[] $params */
1196
+ protected function pParams(array $params): string {
1197
+ if ($this->hasNodeWithComments($params) ||
1198
+ ($this->hasParamWithAttributes($params) && !$this->phpVersion->supportsAttributes())
1199
+ ) {
1200
+ return $this->pCommaSeparatedMultiline($params, $this->phpVersion->supportsTrailingCommaInParamList()) . $this->nl;
1201
+ }
1202
+ return $this->pCommaSeparated($params);
1203
+ }
1204
+
1205
+ /** @param Node\AttributeGroup[] $nodes */
1117
1206
  protected function pAttrGroups(array $nodes, bool $inline = false): string {
1118
1207
  $result = '';
1119
1208
  $sep = $inline ? ' ' : $this->nl;