@appthreat/atom-parsetools 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -0,0 +1,2389 @@
1
+ # frozen_string_literal: true
2
+
3
+ =begin
4
+ This file is generated by the templates/template.rb script and should not be
5
+ modified manually. See templates/lib/prism/inspect_visitor.rb.erb
6
+ if you are looking to modify the template
7
+ =end
8
+
9
+ module Prism
10
+ # This visitor is responsible for composing the strings that get returned by
11
+ # the various #inspect methods defined on each of the nodes.
12
+ class InspectVisitor < Visitor
13
+ # Most of the time, we can simply pass down the indent to the next node.
14
+ # However, when we are inside a list we want some extra special formatting
15
+ # when we hit an element in that list. In this case, we have a special
16
+ # command that replaces the subsequent indent with the given value.
17
+ class Replace # :nodoc:
18
+ attr_reader :value
19
+
20
+ def initialize(value)
21
+ @value = value
22
+ end
23
+ end
24
+
25
+ private_constant :Replace
26
+
27
+ # The current prefix string.
28
+ attr_reader :indent
29
+
30
+ # The list of commands that we need to execute in order to compose the
31
+ # final string.
32
+ attr_reader :commands
33
+
34
+ # Initializes a new instance of the InspectVisitor.
35
+ def initialize(indent = +"")
36
+ @indent = indent
37
+ @commands = []
38
+ end
39
+
40
+ # Compose an inspect string for the given node.
41
+ def self.compose(node)
42
+ visitor = new
43
+ node.accept(visitor)
44
+ visitor.compose
45
+ end
46
+
47
+ # Compose the final string.
48
+ def compose
49
+ buffer = +""
50
+ replace = nil
51
+
52
+ until commands.empty?
53
+ # @type var command: String | node | Replace
54
+ # @type var indent: String
55
+ command, indent = *commands.shift
56
+
57
+ case command
58
+ when String
59
+ buffer << (replace || indent)
60
+ buffer << command
61
+ replace = nil
62
+ when Node
63
+ visitor = InspectVisitor.new(indent)
64
+ command.accept(visitor)
65
+ @commands = [*visitor.commands, *@commands]
66
+ when Replace
67
+ replace = command.value
68
+ else
69
+ raise "Unknown command: #{command.inspect}"
70
+ end
71
+ end
72
+
73
+ buffer
74
+ end
75
+
76
+ # Inspect a AliasGlobalVariableNode node.
77
+ def visit_alias_global_variable_node(node)
78
+ commands << [inspect_node("AliasGlobalVariableNode", node), indent]
79
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
80
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
81
+ commands << ["├── new_name:\n", indent]
82
+ commands << [node.new_name, "#{indent}│ "]
83
+ commands << ["├── old_name:\n", indent]
84
+ commands << [node.old_name, "#{indent}│ "]
85
+ commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
86
+ end
87
+
88
+ # Inspect a AliasMethodNode node.
89
+ def visit_alias_method_node(node)
90
+ commands << [inspect_node("AliasMethodNode", node), indent]
91
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
92
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
93
+ commands << ["├── new_name:\n", indent]
94
+ commands << [node.new_name, "#{indent}│ "]
95
+ commands << ["├── old_name:\n", indent]
96
+ commands << [node.old_name, "#{indent}│ "]
97
+ commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
98
+ end
99
+
100
+ # Inspect a AlternationPatternNode node.
101
+ def visit_alternation_pattern_node(node)
102
+ commands << [inspect_node("AlternationPatternNode", node), indent]
103
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
104
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
105
+ commands << ["├── left:\n", indent]
106
+ commands << [node.left, "#{indent}│ "]
107
+ commands << ["├── right:\n", indent]
108
+ commands << [node.right, "#{indent}│ "]
109
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
110
+ end
111
+
112
+ # Inspect a AndNode node.
113
+ def visit_and_node(node)
114
+ commands << [inspect_node("AndNode", node), indent]
115
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
116
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
117
+ commands << ["├── left:\n", indent]
118
+ commands << [node.left, "#{indent}│ "]
119
+ commands << ["├── right:\n", indent]
120
+ commands << [node.right, "#{indent}│ "]
121
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
122
+ end
123
+
124
+ # Inspect a ArgumentsNode node.
125
+ def visit_arguments_node(node)
126
+ commands << [inspect_node("ArgumentsNode", node), indent]
127
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("contains_forwarding" if node.contains_forwarding?), ("contains_keywords" if node.contains_keywords?), ("contains_keyword_splat" if node.contains_keyword_splat?), ("contains_splat" if node.contains_splat?), ("contains_multiple_splats" if node.contains_multiple_splats?)].compact
128
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
129
+ commands << ["└── arguments: (length: #{(arguments = node.arguments).length})\n", indent]
130
+ if arguments.any?
131
+ arguments[0...-1].each do |child|
132
+ commands << [Replace.new("#{indent} ├── "), indent]
133
+ commands << [child, "#{indent} │ "]
134
+ end
135
+ commands << [Replace.new("#{indent} └── "), indent]
136
+ commands << [arguments[-1], "#{indent} "]
137
+ end
138
+ end
139
+
140
+ # Inspect a ArrayNode node.
141
+ def visit_array_node(node)
142
+ commands << [inspect_node("ArrayNode", node), indent]
143
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("contains_splat" if node.contains_splat?)].compact
144
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
145
+ commands << ["├── elements: (length: #{(elements = node.elements).length})\n", indent]
146
+ if elements.any?
147
+ elements[0...-1].each do |child|
148
+ commands << [Replace.new("#{indent}│ ├── "), indent]
149
+ commands << [child, "#{indent}│ │ "]
150
+ end
151
+ commands << [Replace.new("#{indent}│ └── "), indent]
152
+ commands << [elements[-1], "#{indent}│ "]
153
+ end
154
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
155
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
156
+ end
157
+
158
+ # Inspect a ArrayPatternNode node.
159
+ def visit_array_pattern_node(node)
160
+ commands << [inspect_node("ArrayPatternNode", node), indent]
161
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
162
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
163
+ if (constant = node.constant).nil?
164
+ commands << ["├── constant: ∅\n", indent]
165
+ else
166
+ commands << ["├── constant:\n", indent]
167
+ commands << [constant, "#{indent}│ "]
168
+ end
169
+ commands << ["├── requireds: (length: #{(requireds = node.requireds).length})\n", indent]
170
+ if requireds.any?
171
+ requireds[0...-1].each do |child|
172
+ commands << [Replace.new("#{indent}│ ├── "), indent]
173
+ commands << [child, "#{indent}│ │ "]
174
+ end
175
+ commands << [Replace.new("#{indent}│ └── "), indent]
176
+ commands << [requireds[-1], "#{indent}│ "]
177
+ end
178
+ if (rest = node.rest).nil?
179
+ commands << ["├── rest: ∅\n", indent]
180
+ else
181
+ commands << ["├── rest:\n", indent]
182
+ commands << [rest, "#{indent}│ "]
183
+ end
184
+ commands << ["├── posts: (length: #{(posts = node.posts).length})\n", indent]
185
+ if posts.any?
186
+ posts[0...-1].each do |child|
187
+ commands << [Replace.new("#{indent}│ ├── "), indent]
188
+ commands << [child, "#{indent}│ │ "]
189
+ end
190
+ commands << [Replace.new("#{indent}│ └── "), indent]
191
+ commands << [posts[-1], "#{indent}│ "]
192
+ end
193
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
194
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
195
+ end
196
+
197
+ # Inspect a AssocNode node.
198
+ def visit_assoc_node(node)
199
+ commands << [inspect_node("AssocNode", node), indent]
200
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
201
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
202
+ commands << ["├── key:\n", indent]
203
+ commands << [node.key, "#{indent}│ "]
204
+ commands << ["├── value:\n", indent]
205
+ commands << [node.value, "#{indent}│ "]
206
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
207
+ end
208
+
209
+ # Inspect a AssocSplatNode node.
210
+ def visit_assoc_splat_node(node)
211
+ commands << [inspect_node("AssocSplatNode", node), indent]
212
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
213
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
214
+ if (value = node.value).nil?
215
+ commands << ["├── value: ∅\n", indent]
216
+ else
217
+ commands << ["├── value:\n", indent]
218
+ commands << [value, "#{indent}│ "]
219
+ end
220
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
221
+ end
222
+
223
+ # Inspect a BackReferenceReadNode node.
224
+ def visit_back_reference_read_node(node)
225
+ commands << [inspect_node("BackReferenceReadNode", node), indent]
226
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
227
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
228
+ commands << ["└── name: #{node.name.inspect}\n", indent]
229
+ end
230
+
231
+ # Inspect a BeginNode node.
232
+ def visit_begin_node(node)
233
+ commands << [inspect_node("BeginNode", node), indent]
234
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
235
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
236
+ commands << ["├── begin_keyword_loc: #{inspect_location(node.begin_keyword_loc)}\n", indent]
237
+ if (statements = node.statements).nil?
238
+ commands << ["├── statements: ∅\n", indent]
239
+ else
240
+ commands << ["├── statements:\n", indent]
241
+ commands << [statements, "#{indent}│ "]
242
+ end
243
+ if (rescue_clause = node.rescue_clause).nil?
244
+ commands << ["├── rescue_clause: ∅\n", indent]
245
+ else
246
+ commands << ["├── rescue_clause:\n", indent]
247
+ commands << [rescue_clause, "#{indent}│ "]
248
+ end
249
+ if (else_clause = node.else_clause).nil?
250
+ commands << ["├── else_clause: ∅\n", indent]
251
+ else
252
+ commands << ["├── else_clause:\n", indent]
253
+ commands << [else_clause, "#{indent}│ "]
254
+ end
255
+ if (ensure_clause = node.ensure_clause).nil?
256
+ commands << ["├── ensure_clause: ∅\n", indent]
257
+ else
258
+ commands << ["├── ensure_clause:\n", indent]
259
+ commands << [ensure_clause, "#{indent}│ "]
260
+ end
261
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
262
+ end
263
+
264
+ # Inspect a BlockArgumentNode node.
265
+ def visit_block_argument_node(node)
266
+ commands << [inspect_node("BlockArgumentNode", node), indent]
267
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
268
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
269
+ if (expression = node.expression).nil?
270
+ commands << ["├── expression: ∅\n", indent]
271
+ else
272
+ commands << ["├── expression:\n", indent]
273
+ commands << [expression, "#{indent}│ "]
274
+ end
275
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
276
+ end
277
+
278
+ # Inspect a BlockLocalVariableNode node.
279
+ def visit_block_local_variable_node(node)
280
+ commands << [inspect_node("BlockLocalVariableNode", node), indent]
281
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
282
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
283
+ commands << ["└── name: #{node.name.inspect}\n", indent]
284
+ end
285
+
286
+ # Inspect a BlockNode node.
287
+ def visit_block_node(node)
288
+ commands << [inspect_node("BlockNode", node), indent]
289
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
290
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
291
+ commands << ["├── locals: #{node.locals.inspect}\n", indent]
292
+ if (parameters = node.parameters).nil?
293
+ commands << ["├── parameters: ∅\n", indent]
294
+ else
295
+ commands << ["├── parameters:\n", indent]
296
+ commands << [parameters, "#{indent}│ "]
297
+ end
298
+ if (body = node.body).nil?
299
+ commands << ["├── body: ∅\n", indent]
300
+ else
301
+ commands << ["├── body:\n", indent]
302
+ commands << [body, "#{indent}│ "]
303
+ end
304
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
305
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
306
+ end
307
+
308
+ # Inspect a BlockParameterNode node.
309
+ def visit_block_parameter_node(node)
310
+ commands << [inspect_node("BlockParameterNode", node), indent]
311
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
312
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
313
+ if (name = node.name).nil?
314
+ commands << ["├── name: ∅\n", indent]
315
+ else
316
+ commands << ["├── name: #{name.inspect}\n", indent]
317
+ end
318
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
319
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
320
+ end
321
+
322
+ # Inspect a BlockParametersNode node.
323
+ def visit_block_parameters_node(node)
324
+ commands << [inspect_node("BlockParametersNode", node), indent]
325
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
326
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
327
+ if (parameters = node.parameters).nil?
328
+ commands << ["├── parameters: ∅\n", indent]
329
+ else
330
+ commands << ["├── parameters:\n", indent]
331
+ commands << [parameters, "#{indent}│ "]
332
+ end
333
+ commands << ["├── locals: (length: #{(locals = node.locals).length})\n", indent]
334
+ if locals.any?
335
+ locals[0...-1].each do |child|
336
+ commands << [Replace.new("#{indent}│ ├── "), indent]
337
+ commands << [child, "#{indent}│ │ "]
338
+ end
339
+ commands << [Replace.new("#{indent}│ └── "), indent]
340
+ commands << [locals[-1], "#{indent}│ "]
341
+ end
342
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
343
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
344
+ end
345
+
346
+ # Inspect a BreakNode node.
347
+ def visit_break_node(node)
348
+ commands << [inspect_node("BreakNode", node), indent]
349
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
350
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
351
+ if (arguments = node.arguments).nil?
352
+ commands << ["├── arguments: ∅\n", indent]
353
+ else
354
+ commands << ["├── arguments:\n", indent]
355
+ commands << [arguments, "#{indent}│ "]
356
+ end
357
+ commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
358
+ end
359
+
360
+ # Inspect a CallAndWriteNode node.
361
+ def visit_call_and_write_node(node)
362
+ commands << [inspect_node("CallAndWriteNode", node), indent]
363
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
364
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
365
+ if (receiver = node.receiver).nil?
366
+ commands << ["├── receiver: ∅\n", indent]
367
+ else
368
+ commands << ["├── receiver:\n", indent]
369
+ commands << [receiver, "#{indent}│ "]
370
+ end
371
+ commands << ["├── call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent]
372
+ commands << ["├── message_loc: #{inspect_location(node.message_loc)}\n", indent]
373
+ commands << ["├── read_name: #{node.read_name.inspect}\n", indent]
374
+ commands << ["├── write_name: #{node.write_name.inspect}\n", indent]
375
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
376
+ commands << ["└── value:\n", indent]
377
+ commands << [node.value, "#{indent} "]
378
+ end
379
+
380
+ # Inspect a CallNode node.
381
+ def visit_call_node(node)
382
+ commands << [inspect_node("CallNode", node), indent]
383
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
384
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
385
+ if (receiver = node.receiver).nil?
386
+ commands << ["├── receiver: ∅\n", indent]
387
+ else
388
+ commands << ["├── receiver:\n", indent]
389
+ commands << [receiver, "#{indent}│ "]
390
+ end
391
+ commands << ["├── call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent]
392
+ commands << ["├── name: #{node.name.inspect}\n", indent]
393
+ commands << ["├── message_loc: #{inspect_location(node.message_loc)}\n", indent]
394
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
395
+ if (arguments = node.arguments).nil?
396
+ commands << ["├── arguments: ∅\n", indent]
397
+ else
398
+ commands << ["├── arguments:\n", indent]
399
+ commands << [arguments, "#{indent}│ "]
400
+ end
401
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
402
+ if (block = node.block).nil?
403
+ commands << ["└── block: ∅\n", indent]
404
+ else
405
+ commands << ["└── block:\n", indent]
406
+ commands << [block, "#{indent} "]
407
+ end
408
+ end
409
+
410
+ # Inspect a CallOperatorWriteNode node.
411
+ def visit_call_operator_write_node(node)
412
+ commands << [inspect_node("CallOperatorWriteNode", node), indent]
413
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
414
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
415
+ if (receiver = node.receiver).nil?
416
+ commands << ["├── receiver: ∅\n", indent]
417
+ else
418
+ commands << ["├── receiver:\n", indent]
419
+ commands << [receiver, "#{indent}│ "]
420
+ end
421
+ commands << ["├── call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent]
422
+ commands << ["├── message_loc: #{inspect_location(node.message_loc)}\n", indent]
423
+ commands << ["├── read_name: #{node.read_name.inspect}\n", indent]
424
+ commands << ["├── write_name: #{node.write_name.inspect}\n", indent]
425
+ commands << ["├── binary_operator: #{node.binary_operator.inspect}\n", indent]
426
+ commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
427
+ commands << ["└── value:\n", indent]
428
+ commands << [node.value, "#{indent} "]
429
+ end
430
+
431
+ # Inspect a CallOrWriteNode node.
432
+ def visit_call_or_write_node(node)
433
+ commands << [inspect_node("CallOrWriteNode", node), indent]
434
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
435
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
436
+ if (receiver = node.receiver).nil?
437
+ commands << ["├── receiver: ∅\n", indent]
438
+ else
439
+ commands << ["├── receiver:\n", indent]
440
+ commands << [receiver, "#{indent}│ "]
441
+ end
442
+ commands << ["├── call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent]
443
+ commands << ["├── message_loc: #{inspect_location(node.message_loc)}\n", indent]
444
+ commands << ["├── read_name: #{node.read_name.inspect}\n", indent]
445
+ commands << ["├── write_name: #{node.write_name.inspect}\n", indent]
446
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
447
+ commands << ["└── value:\n", indent]
448
+ commands << [node.value, "#{indent} "]
449
+ end
450
+
451
+ # Inspect a CallTargetNode node.
452
+ def visit_call_target_node(node)
453
+ commands << [inspect_node("CallTargetNode", node), indent]
454
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
455
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
456
+ commands << ["├── receiver:\n", indent]
457
+ commands << [node.receiver, "#{indent}│ "]
458
+ commands << ["├── call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent]
459
+ commands << ["├── name: #{node.name.inspect}\n", indent]
460
+ commands << ["└── message_loc: #{inspect_location(node.message_loc)}\n", indent]
461
+ end
462
+
463
+ # Inspect a CapturePatternNode node.
464
+ def visit_capture_pattern_node(node)
465
+ commands << [inspect_node("CapturePatternNode", node), indent]
466
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
467
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
468
+ commands << ["├── value:\n", indent]
469
+ commands << [node.value, "#{indent}│ "]
470
+ commands << ["├── target:\n", indent]
471
+ commands << [node.target, "#{indent}│ "]
472
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
473
+ end
474
+
475
+ # Inspect a CaseMatchNode node.
476
+ def visit_case_match_node(node)
477
+ commands << [inspect_node("CaseMatchNode", node), indent]
478
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
479
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
480
+ if (predicate = node.predicate).nil?
481
+ commands << ["├── predicate: ∅\n", indent]
482
+ else
483
+ commands << ["├── predicate:\n", indent]
484
+ commands << [predicate, "#{indent}│ "]
485
+ end
486
+ commands << ["├── conditions: (length: #{(conditions = node.conditions).length})\n", indent]
487
+ if conditions.any?
488
+ conditions[0...-1].each do |child|
489
+ commands << [Replace.new("#{indent}│ ├── "), indent]
490
+ commands << [child, "#{indent}│ │ "]
491
+ end
492
+ commands << [Replace.new("#{indent}│ └── "), indent]
493
+ commands << [conditions[-1], "#{indent}│ "]
494
+ end
495
+ if (else_clause = node.else_clause).nil?
496
+ commands << ["├── else_clause: ∅\n", indent]
497
+ else
498
+ commands << ["├── else_clause:\n", indent]
499
+ commands << [else_clause, "#{indent}│ "]
500
+ end
501
+ commands << ["├── case_keyword_loc: #{inspect_location(node.case_keyword_loc)}\n", indent]
502
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
503
+ end
504
+
505
+ # Inspect a CaseNode node.
506
+ def visit_case_node(node)
507
+ commands << [inspect_node("CaseNode", node), indent]
508
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
509
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
510
+ if (predicate = node.predicate).nil?
511
+ commands << ["├── predicate: ∅\n", indent]
512
+ else
513
+ commands << ["├── predicate:\n", indent]
514
+ commands << [predicate, "#{indent}│ "]
515
+ end
516
+ commands << ["├── conditions: (length: #{(conditions = node.conditions).length})\n", indent]
517
+ if conditions.any?
518
+ conditions[0...-1].each do |child|
519
+ commands << [Replace.new("#{indent}│ ├── "), indent]
520
+ commands << [child, "#{indent}│ │ "]
521
+ end
522
+ commands << [Replace.new("#{indent}│ └── "), indent]
523
+ commands << [conditions[-1], "#{indent}│ "]
524
+ end
525
+ if (else_clause = node.else_clause).nil?
526
+ commands << ["├── else_clause: ∅\n", indent]
527
+ else
528
+ commands << ["├── else_clause:\n", indent]
529
+ commands << [else_clause, "#{indent}│ "]
530
+ end
531
+ commands << ["├── case_keyword_loc: #{inspect_location(node.case_keyword_loc)}\n", indent]
532
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
533
+ end
534
+
535
+ # Inspect a ClassNode node.
536
+ def visit_class_node(node)
537
+ commands << [inspect_node("ClassNode", node), indent]
538
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
539
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
540
+ commands << ["├── locals: #{node.locals.inspect}\n", indent]
541
+ commands << ["├── class_keyword_loc: #{inspect_location(node.class_keyword_loc)}\n", indent]
542
+ commands << ["├── constant_path:\n", indent]
543
+ commands << [node.constant_path, "#{indent}│ "]
544
+ commands << ["├── inheritance_operator_loc: #{inspect_location(node.inheritance_operator_loc)}\n", indent]
545
+ if (superclass = node.superclass).nil?
546
+ commands << ["├── superclass: ∅\n", indent]
547
+ else
548
+ commands << ["├── superclass:\n", indent]
549
+ commands << [superclass, "#{indent}│ "]
550
+ end
551
+ if (body = node.body).nil?
552
+ commands << ["├── body: ∅\n", indent]
553
+ else
554
+ commands << ["├── body:\n", indent]
555
+ commands << [body, "#{indent}│ "]
556
+ end
557
+ commands << ["├── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
558
+ commands << ["└── name: #{node.name.inspect}\n", indent]
559
+ end
560
+
561
+ # Inspect a ClassVariableAndWriteNode node.
562
+ def visit_class_variable_and_write_node(node)
563
+ commands << [inspect_node("ClassVariableAndWriteNode", node), indent]
564
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
565
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
566
+ commands << ["├── name: #{node.name.inspect}\n", indent]
567
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
568
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
569
+ commands << ["└── value:\n", indent]
570
+ commands << [node.value, "#{indent} "]
571
+ end
572
+
573
+ # Inspect a ClassVariableOperatorWriteNode node.
574
+ def visit_class_variable_operator_write_node(node)
575
+ commands << [inspect_node("ClassVariableOperatorWriteNode", node), indent]
576
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
577
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
578
+ commands << ["├── name: #{node.name.inspect}\n", indent]
579
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
580
+ commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
581
+ commands << ["├── value:\n", indent]
582
+ commands << [node.value, "#{indent}│ "]
583
+ commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
584
+ end
585
+
586
+ # Inspect a ClassVariableOrWriteNode node.
587
+ def visit_class_variable_or_write_node(node)
588
+ commands << [inspect_node("ClassVariableOrWriteNode", node), indent]
589
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
590
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
591
+ commands << ["├── name: #{node.name.inspect}\n", indent]
592
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
593
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
594
+ commands << ["└── value:\n", indent]
595
+ commands << [node.value, "#{indent} "]
596
+ end
597
+
598
+ # Inspect a ClassVariableReadNode node.
599
+ def visit_class_variable_read_node(node)
600
+ commands << [inspect_node("ClassVariableReadNode", node), indent]
601
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
602
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
603
+ commands << ["└── name: #{node.name.inspect}\n", indent]
604
+ end
605
+
606
+ # Inspect a ClassVariableTargetNode node.
607
+ def visit_class_variable_target_node(node)
608
+ commands << [inspect_node("ClassVariableTargetNode", node), indent]
609
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
610
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
611
+ commands << ["└── name: #{node.name.inspect}\n", indent]
612
+ end
613
+
614
+ # Inspect a ClassVariableWriteNode node.
615
+ def visit_class_variable_write_node(node)
616
+ commands << [inspect_node("ClassVariableWriteNode", node), indent]
617
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
618
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
619
+ commands << ["├── name: #{node.name.inspect}\n", indent]
620
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
621
+ commands << ["├── value:\n", indent]
622
+ commands << [node.value, "#{indent}│ "]
623
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
624
+ end
625
+
626
+ # Inspect a ConstantAndWriteNode node.
627
+ def visit_constant_and_write_node(node)
628
+ commands << [inspect_node("ConstantAndWriteNode", node), indent]
629
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
630
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
631
+ commands << ["├── name: #{node.name.inspect}\n", indent]
632
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
633
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
634
+ commands << ["└── value:\n", indent]
635
+ commands << [node.value, "#{indent} "]
636
+ end
637
+
638
+ # Inspect a ConstantOperatorWriteNode node.
639
+ def visit_constant_operator_write_node(node)
640
+ commands << [inspect_node("ConstantOperatorWriteNode", node), indent]
641
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
642
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
643
+ commands << ["├── name: #{node.name.inspect}\n", indent]
644
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
645
+ commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
646
+ commands << ["├── value:\n", indent]
647
+ commands << [node.value, "#{indent}│ "]
648
+ commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
649
+ end
650
+
651
+ # Inspect a ConstantOrWriteNode node.
652
+ def visit_constant_or_write_node(node)
653
+ commands << [inspect_node("ConstantOrWriteNode", node), indent]
654
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
655
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
656
+ commands << ["├── name: #{node.name.inspect}\n", indent]
657
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
658
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
659
+ commands << ["└── value:\n", indent]
660
+ commands << [node.value, "#{indent} "]
661
+ end
662
+
663
+ # Inspect a ConstantPathAndWriteNode node.
664
+ def visit_constant_path_and_write_node(node)
665
+ commands << [inspect_node("ConstantPathAndWriteNode", node), indent]
666
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
667
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
668
+ commands << ["├── target:\n", indent]
669
+ commands << [node.target, "#{indent}│ "]
670
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
671
+ commands << ["└── value:\n", indent]
672
+ commands << [node.value, "#{indent} "]
673
+ end
674
+
675
+ # Inspect a ConstantPathNode node.
676
+ def visit_constant_path_node(node)
677
+ commands << [inspect_node("ConstantPathNode", node), indent]
678
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
679
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
680
+ if (parent = node.parent).nil?
681
+ commands << ["├── parent: ∅\n", indent]
682
+ else
683
+ commands << ["├── parent:\n", indent]
684
+ commands << [parent, "#{indent}│ "]
685
+ end
686
+ if (name = node.name).nil?
687
+ commands << ["├── name: ∅\n", indent]
688
+ else
689
+ commands << ["├── name: #{name.inspect}\n", indent]
690
+ end
691
+ commands << ["├── delimiter_loc: #{inspect_location(node.delimiter_loc)}\n", indent]
692
+ commands << ["└── name_loc: #{inspect_location(node.name_loc)}\n", indent]
693
+ end
694
+
695
+ # Inspect a ConstantPathOperatorWriteNode node.
696
+ def visit_constant_path_operator_write_node(node)
697
+ commands << [inspect_node("ConstantPathOperatorWriteNode", node), indent]
698
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
699
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
700
+ commands << ["├── target:\n", indent]
701
+ commands << [node.target, "#{indent}│ "]
702
+ commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
703
+ commands << ["├── value:\n", indent]
704
+ commands << [node.value, "#{indent}│ "]
705
+ commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
706
+ end
707
+
708
+ # Inspect a ConstantPathOrWriteNode node.
709
+ def visit_constant_path_or_write_node(node)
710
+ commands << [inspect_node("ConstantPathOrWriteNode", node), indent]
711
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
712
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
713
+ commands << ["├── target:\n", indent]
714
+ commands << [node.target, "#{indent}│ "]
715
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
716
+ commands << ["└── value:\n", indent]
717
+ commands << [node.value, "#{indent} "]
718
+ end
719
+
720
+ # Inspect a ConstantPathTargetNode node.
721
+ def visit_constant_path_target_node(node)
722
+ commands << [inspect_node("ConstantPathTargetNode", node), indent]
723
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
724
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
725
+ if (parent = node.parent).nil?
726
+ commands << ["├── parent: ∅\n", indent]
727
+ else
728
+ commands << ["├── parent:\n", indent]
729
+ commands << [parent, "#{indent}│ "]
730
+ end
731
+ if (name = node.name).nil?
732
+ commands << ["├── name: ∅\n", indent]
733
+ else
734
+ commands << ["├── name: #{name.inspect}\n", indent]
735
+ end
736
+ commands << ["├── delimiter_loc: #{inspect_location(node.delimiter_loc)}\n", indent]
737
+ commands << ["└── name_loc: #{inspect_location(node.name_loc)}\n", indent]
738
+ end
739
+
740
+ # Inspect a ConstantPathWriteNode node.
741
+ def visit_constant_path_write_node(node)
742
+ commands << [inspect_node("ConstantPathWriteNode", node), indent]
743
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
744
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
745
+ commands << ["├── target:\n", indent]
746
+ commands << [node.target, "#{indent}│ "]
747
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
748
+ commands << ["└── value:\n", indent]
749
+ commands << [node.value, "#{indent} "]
750
+ end
751
+
752
+ # Inspect a ConstantReadNode node.
753
+ def visit_constant_read_node(node)
754
+ commands << [inspect_node("ConstantReadNode", node), indent]
755
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
756
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
757
+ commands << ["└── name: #{node.name.inspect}\n", indent]
758
+ end
759
+
760
+ # Inspect a ConstantTargetNode node.
761
+ def visit_constant_target_node(node)
762
+ commands << [inspect_node("ConstantTargetNode", node), indent]
763
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
764
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
765
+ commands << ["└── name: #{node.name.inspect}\n", indent]
766
+ end
767
+
768
+ # Inspect a ConstantWriteNode node.
769
+ def visit_constant_write_node(node)
770
+ commands << [inspect_node("ConstantWriteNode", node), indent]
771
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
772
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
773
+ commands << ["├── name: #{node.name.inspect}\n", indent]
774
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
775
+ commands << ["├── value:\n", indent]
776
+ commands << [node.value, "#{indent}│ "]
777
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
778
+ end
779
+
780
+ # Inspect a DefNode node.
781
+ def visit_def_node(node)
782
+ commands << [inspect_node("DefNode", node), indent]
783
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
784
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
785
+ commands << ["├── name: #{node.name.inspect}\n", indent]
786
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
787
+ if (receiver = node.receiver).nil?
788
+ commands << ["├── receiver: ∅\n", indent]
789
+ else
790
+ commands << ["├── receiver:\n", indent]
791
+ commands << [receiver, "#{indent}│ "]
792
+ end
793
+ if (parameters = node.parameters).nil?
794
+ commands << ["├── parameters: ∅\n", indent]
795
+ else
796
+ commands << ["├── parameters:\n", indent]
797
+ commands << [parameters, "#{indent}│ "]
798
+ end
799
+ if (body = node.body).nil?
800
+ commands << ["├── body: ∅\n", indent]
801
+ else
802
+ commands << ["├── body:\n", indent]
803
+ commands << [body, "#{indent}│ "]
804
+ end
805
+ commands << ["├── locals: #{node.locals.inspect}\n", indent]
806
+ commands << ["├── def_keyword_loc: #{inspect_location(node.def_keyword_loc)}\n", indent]
807
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
808
+ commands << ["├── lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent]
809
+ commands << ["├── rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent]
810
+ commands << ["├── equal_loc: #{inspect_location(node.equal_loc)}\n", indent]
811
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
812
+ end
813
+
814
+ # Inspect a DefinedNode node.
815
+ def visit_defined_node(node)
816
+ commands << [inspect_node("DefinedNode", node), indent]
817
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
818
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
819
+ commands << ["├── lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent]
820
+ commands << ["├── value:\n", indent]
821
+ commands << [node.value, "#{indent}│ "]
822
+ commands << ["├── rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent]
823
+ commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
824
+ end
825
+
826
+ # Inspect a ElseNode node.
827
+ def visit_else_node(node)
828
+ commands << [inspect_node("ElseNode", node), indent]
829
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
830
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
831
+ commands << ["├── else_keyword_loc: #{inspect_location(node.else_keyword_loc)}\n", indent]
832
+ if (statements = node.statements).nil?
833
+ commands << ["├── statements: ∅\n", indent]
834
+ else
835
+ commands << ["├── statements:\n", indent]
836
+ commands << [statements, "#{indent}│ "]
837
+ end
838
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
839
+ end
840
+
841
+ # Inspect a EmbeddedStatementsNode node.
842
+ def visit_embedded_statements_node(node)
843
+ commands << [inspect_node("EmbeddedStatementsNode", node), indent]
844
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
845
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
846
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
847
+ if (statements = node.statements).nil?
848
+ commands << ["├── statements: ∅\n", indent]
849
+ else
850
+ commands << ["├── statements:\n", indent]
851
+ commands << [statements, "#{indent}│ "]
852
+ end
853
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
854
+ end
855
+
856
+ # Inspect a EmbeddedVariableNode node.
857
+ def visit_embedded_variable_node(node)
858
+ commands << [inspect_node("EmbeddedVariableNode", node), indent]
859
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
860
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
861
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
862
+ commands << ["└── variable:\n", indent]
863
+ commands << [node.variable, "#{indent} "]
864
+ end
865
+
866
+ # Inspect a EnsureNode node.
867
+ def visit_ensure_node(node)
868
+ commands << [inspect_node("EnsureNode", node), indent]
869
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
870
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
871
+ commands << ["├── ensure_keyword_loc: #{inspect_location(node.ensure_keyword_loc)}\n", indent]
872
+ if (statements = node.statements).nil?
873
+ commands << ["├── statements: ∅\n", indent]
874
+ else
875
+ commands << ["├── statements:\n", indent]
876
+ commands << [statements, "#{indent}│ "]
877
+ end
878
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
879
+ end
880
+
881
+ # Inspect a FalseNode node.
882
+ def visit_false_node(node)
883
+ commands << [inspect_node("FalseNode", node), indent]
884
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
885
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
886
+ end
887
+
888
+ # Inspect a FindPatternNode node.
889
+ def visit_find_pattern_node(node)
890
+ commands << [inspect_node("FindPatternNode", node), indent]
891
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
892
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
893
+ if (constant = node.constant).nil?
894
+ commands << ["├── constant: ∅\n", indent]
895
+ else
896
+ commands << ["├── constant:\n", indent]
897
+ commands << [constant, "#{indent}│ "]
898
+ end
899
+ commands << ["├── left:\n", indent]
900
+ commands << [node.left, "#{indent}│ "]
901
+ commands << ["├── requireds: (length: #{(requireds = node.requireds).length})\n", indent]
902
+ if requireds.any?
903
+ requireds[0...-1].each do |child|
904
+ commands << [Replace.new("#{indent}│ ├── "), indent]
905
+ commands << [child, "#{indent}│ │ "]
906
+ end
907
+ commands << [Replace.new("#{indent}│ └── "), indent]
908
+ commands << [requireds[-1], "#{indent}│ "]
909
+ end
910
+ commands << ["├── right:\n", indent]
911
+ commands << [node.right, "#{indent}│ "]
912
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
913
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
914
+ end
915
+
916
+ # Inspect a FlipFlopNode node.
917
+ def visit_flip_flop_node(node)
918
+ commands << [inspect_node("FlipFlopNode", node), indent]
919
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("exclude_end" if node.exclude_end?)].compact
920
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
921
+ if (left = node.left).nil?
922
+ commands << ["├── left: ∅\n", indent]
923
+ else
924
+ commands << ["├── left:\n", indent]
925
+ commands << [left, "#{indent}│ "]
926
+ end
927
+ if (right = node.right).nil?
928
+ commands << ["├── right: ∅\n", indent]
929
+ else
930
+ commands << ["├── right:\n", indent]
931
+ commands << [right, "#{indent}│ "]
932
+ end
933
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
934
+ end
935
+
936
+ # Inspect a FloatNode node.
937
+ def visit_float_node(node)
938
+ commands << [inspect_node("FloatNode", node), indent]
939
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
940
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
941
+ commands << ["└── value: #{node.value.inspect}\n", indent]
942
+ end
943
+
944
+ # Inspect a ForNode node.
945
+ def visit_for_node(node)
946
+ commands << [inspect_node("ForNode", node), indent]
947
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
948
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
949
+ commands << ["├── index:\n", indent]
950
+ commands << [node.index, "#{indent}│ "]
951
+ commands << ["├── collection:\n", indent]
952
+ commands << [node.collection, "#{indent}│ "]
953
+ if (statements = node.statements).nil?
954
+ commands << ["├── statements: ∅\n", indent]
955
+ else
956
+ commands << ["├── statements:\n", indent]
957
+ commands << [statements, "#{indent}│ "]
958
+ end
959
+ commands << ["├── for_keyword_loc: #{inspect_location(node.for_keyword_loc)}\n", indent]
960
+ commands << ["├── in_keyword_loc: #{inspect_location(node.in_keyword_loc)}\n", indent]
961
+ commands << ["├── do_keyword_loc: #{inspect_location(node.do_keyword_loc)}\n", indent]
962
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
963
+ end
964
+
965
+ # Inspect a ForwardingArgumentsNode node.
966
+ def visit_forwarding_arguments_node(node)
967
+ commands << [inspect_node("ForwardingArgumentsNode", node), indent]
968
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
969
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
970
+ end
971
+
972
+ # Inspect a ForwardingParameterNode node.
973
+ def visit_forwarding_parameter_node(node)
974
+ commands << [inspect_node("ForwardingParameterNode", node), indent]
975
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
976
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
977
+ end
978
+
979
+ # Inspect a ForwardingSuperNode node.
980
+ def visit_forwarding_super_node(node)
981
+ commands << [inspect_node("ForwardingSuperNode", node), indent]
982
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
983
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
984
+ if (block = node.block).nil?
985
+ commands << ["└── block: ∅\n", indent]
986
+ else
987
+ commands << ["└── block:\n", indent]
988
+ commands << [block, "#{indent} "]
989
+ end
990
+ end
991
+
992
+ # Inspect a GlobalVariableAndWriteNode node.
993
+ def visit_global_variable_and_write_node(node)
994
+ commands << [inspect_node("GlobalVariableAndWriteNode", node), indent]
995
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
996
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
997
+ commands << ["├── name: #{node.name.inspect}\n", indent]
998
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
999
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1000
+ commands << ["└── value:\n", indent]
1001
+ commands << [node.value, "#{indent} "]
1002
+ end
1003
+
1004
+ # Inspect a GlobalVariableOperatorWriteNode node.
1005
+ def visit_global_variable_operator_write_node(node)
1006
+ commands << [inspect_node("GlobalVariableOperatorWriteNode", node), indent]
1007
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1008
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1009
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1010
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1011
+ commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
1012
+ commands << ["├── value:\n", indent]
1013
+ commands << [node.value, "#{indent}│ "]
1014
+ commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
1015
+ end
1016
+
1017
+ # Inspect a GlobalVariableOrWriteNode node.
1018
+ def visit_global_variable_or_write_node(node)
1019
+ commands << [inspect_node("GlobalVariableOrWriteNode", node), indent]
1020
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1021
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1022
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1023
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1024
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1025
+ commands << ["└── value:\n", indent]
1026
+ commands << [node.value, "#{indent} "]
1027
+ end
1028
+
1029
+ # Inspect a GlobalVariableReadNode node.
1030
+ def visit_global_variable_read_node(node)
1031
+ commands << [inspect_node("GlobalVariableReadNode", node), indent]
1032
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1033
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1034
+ commands << ["└── name: #{node.name.inspect}\n", indent]
1035
+ end
1036
+
1037
+ # Inspect a GlobalVariableTargetNode node.
1038
+ def visit_global_variable_target_node(node)
1039
+ commands << [inspect_node("GlobalVariableTargetNode", node), indent]
1040
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1041
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1042
+ commands << ["└── name: #{node.name.inspect}\n", indent]
1043
+ end
1044
+
1045
+ # Inspect a GlobalVariableWriteNode node.
1046
+ def visit_global_variable_write_node(node)
1047
+ commands << [inspect_node("GlobalVariableWriteNode", node), indent]
1048
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1049
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1050
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1051
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1052
+ commands << ["├── value:\n", indent]
1053
+ commands << [node.value, "#{indent}│ "]
1054
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1055
+ end
1056
+
1057
+ # Inspect a HashNode node.
1058
+ def visit_hash_node(node)
1059
+ commands << [inspect_node("HashNode", node), indent]
1060
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1061
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1062
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1063
+ commands << ["├── elements: (length: #{(elements = node.elements).length})\n", indent]
1064
+ if elements.any?
1065
+ elements[0...-1].each do |child|
1066
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1067
+ commands << [child, "#{indent}│ │ "]
1068
+ end
1069
+ commands << [Replace.new("#{indent}│ └── "), indent]
1070
+ commands << [elements[-1], "#{indent}│ "]
1071
+ end
1072
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1073
+ end
1074
+
1075
+ # Inspect a HashPatternNode node.
1076
+ def visit_hash_pattern_node(node)
1077
+ commands << [inspect_node("HashPatternNode", node), indent]
1078
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1079
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1080
+ if (constant = node.constant).nil?
1081
+ commands << ["├── constant: ∅\n", indent]
1082
+ else
1083
+ commands << ["├── constant:\n", indent]
1084
+ commands << [constant, "#{indent}│ "]
1085
+ end
1086
+ commands << ["├── elements: (length: #{(elements = node.elements).length})\n", indent]
1087
+ if elements.any?
1088
+ elements[0...-1].each do |child|
1089
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1090
+ commands << [child, "#{indent}│ │ "]
1091
+ end
1092
+ commands << [Replace.new("#{indent}│ └── "), indent]
1093
+ commands << [elements[-1], "#{indent}│ "]
1094
+ end
1095
+ if (rest = node.rest).nil?
1096
+ commands << ["├── rest: ∅\n", indent]
1097
+ else
1098
+ commands << ["├── rest:\n", indent]
1099
+ commands << [rest, "#{indent}│ "]
1100
+ end
1101
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1102
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1103
+ end
1104
+
1105
+ # Inspect a IfNode node.
1106
+ def visit_if_node(node)
1107
+ commands << [inspect_node("IfNode", node), indent]
1108
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1109
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1110
+ commands << ["├── if_keyword_loc: #{inspect_location(node.if_keyword_loc)}\n", indent]
1111
+ commands << ["├── predicate:\n", indent]
1112
+ commands << [node.predicate, "#{indent}│ "]
1113
+ commands << ["├── then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent]
1114
+ if (statements = node.statements).nil?
1115
+ commands << ["├── statements: ∅\n", indent]
1116
+ else
1117
+ commands << ["├── statements:\n", indent]
1118
+ commands << [statements, "#{indent}│ "]
1119
+ end
1120
+ if (subsequent = node.subsequent).nil?
1121
+ commands << ["├── subsequent: ∅\n", indent]
1122
+ else
1123
+ commands << ["├── subsequent:\n", indent]
1124
+ commands << [subsequent, "#{indent}│ "]
1125
+ end
1126
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
1127
+ end
1128
+
1129
+ # Inspect a ImaginaryNode node.
1130
+ def visit_imaginary_node(node)
1131
+ commands << [inspect_node("ImaginaryNode", node), indent]
1132
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1133
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1134
+ commands << ["└── numeric:\n", indent]
1135
+ commands << [node.numeric, "#{indent} "]
1136
+ end
1137
+
1138
+ # Inspect a ImplicitNode node.
1139
+ def visit_implicit_node(node)
1140
+ commands << [inspect_node("ImplicitNode", node), indent]
1141
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1142
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1143
+ commands << ["└── value:\n", indent]
1144
+ commands << [node.value, "#{indent} "]
1145
+ end
1146
+
1147
+ # Inspect a ImplicitRestNode node.
1148
+ def visit_implicit_rest_node(node)
1149
+ commands << [inspect_node("ImplicitRestNode", node), indent]
1150
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1151
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1152
+ end
1153
+
1154
+ # Inspect a InNode node.
1155
+ def visit_in_node(node)
1156
+ commands << [inspect_node("InNode", node), indent]
1157
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1158
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1159
+ commands << ["├── pattern:\n", indent]
1160
+ commands << [node.pattern, "#{indent}│ "]
1161
+ if (statements = node.statements).nil?
1162
+ commands << ["├── statements: ∅\n", indent]
1163
+ else
1164
+ commands << ["├── statements:\n", indent]
1165
+ commands << [statements, "#{indent}│ "]
1166
+ end
1167
+ commands << ["├── in_loc: #{inspect_location(node.in_loc)}\n", indent]
1168
+ commands << ["└── then_loc: #{inspect_location(node.then_loc)}\n", indent]
1169
+ end
1170
+
1171
+ # Inspect a IndexAndWriteNode node.
1172
+ def visit_index_and_write_node(node)
1173
+ commands << [inspect_node("IndexAndWriteNode", node), indent]
1174
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
1175
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1176
+ if (receiver = node.receiver).nil?
1177
+ commands << ["├── receiver: ∅\n", indent]
1178
+ else
1179
+ commands << ["├── receiver:\n", indent]
1180
+ commands << [receiver, "#{indent}│ "]
1181
+ end
1182
+ commands << ["├── call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent]
1183
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1184
+ if (arguments = node.arguments).nil?
1185
+ commands << ["├── arguments: ∅\n", indent]
1186
+ else
1187
+ commands << ["├── arguments:\n", indent]
1188
+ commands << [arguments, "#{indent}│ "]
1189
+ end
1190
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1191
+ if (block = node.block).nil?
1192
+ commands << ["├── block: ∅\n", indent]
1193
+ else
1194
+ commands << ["├── block:\n", indent]
1195
+ commands << [block, "#{indent}│ "]
1196
+ end
1197
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1198
+ commands << ["└── value:\n", indent]
1199
+ commands << [node.value, "#{indent} "]
1200
+ end
1201
+
1202
+ # Inspect a IndexOperatorWriteNode node.
1203
+ def visit_index_operator_write_node(node)
1204
+ commands << [inspect_node("IndexOperatorWriteNode", node), indent]
1205
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
1206
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1207
+ if (receiver = node.receiver).nil?
1208
+ commands << ["├── receiver: ∅\n", indent]
1209
+ else
1210
+ commands << ["├── receiver:\n", indent]
1211
+ commands << [receiver, "#{indent}│ "]
1212
+ end
1213
+ commands << ["├── call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent]
1214
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1215
+ if (arguments = node.arguments).nil?
1216
+ commands << ["├── arguments: ∅\n", indent]
1217
+ else
1218
+ commands << ["├── arguments:\n", indent]
1219
+ commands << [arguments, "#{indent}│ "]
1220
+ end
1221
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1222
+ if (block = node.block).nil?
1223
+ commands << ["├── block: ∅\n", indent]
1224
+ else
1225
+ commands << ["├── block:\n", indent]
1226
+ commands << [block, "#{indent}│ "]
1227
+ end
1228
+ commands << ["├── binary_operator: #{node.binary_operator.inspect}\n", indent]
1229
+ commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
1230
+ commands << ["└── value:\n", indent]
1231
+ commands << [node.value, "#{indent} "]
1232
+ end
1233
+
1234
+ # Inspect a IndexOrWriteNode node.
1235
+ def visit_index_or_write_node(node)
1236
+ commands << [inspect_node("IndexOrWriteNode", node), indent]
1237
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
1238
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1239
+ if (receiver = node.receiver).nil?
1240
+ commands << ["├── receiver: ∅\n", indent]
1241
+ else
1242
+ commands << ["├── receiver:\n", indent]
1243
+ commands << [receiver, "#{indent}│ "]
1244
+ end
1245
+ commands << ["├── call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent]
1246
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1247
+ if (arguments = node.arguments).nil?
1248
+ commands << ["├── arguments: ∅\n", indent]
1249
+ else
1250
+ commands << ["├── arguments:\n", indent]
1251
+ commands << [arguments, "#{indent}│ "]
1252
+ end
1253
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1254
+ if (block = node.block).nil?
1255
+ commands << ["├── block: ∅\n", indent]
1256
+ else
1257
+ commands << ["├── block:\n", indent]
1258
+ commands << [block, "#{indent}│ "]
1259
+ end
1260
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1261
+ commands << ["└── value:\n", indent]
1262
+ commands << [node.value, "#{indent} "]
1263
+ end
1264
+
1265
+ # Inspect a IndexTargetNode node.
1266
+ def visit_index_target_node(node)
1267
+ commands << [inspect_node("IndexTargetNode", node), indent]
1268
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
1269
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1270
+ commands << ["├── receiver:\n", indent]
1271
+ commands << [node.receiver, "#{indent}│ "]
1272
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1273
+ if (arguments = node.arguments).nil?
1274
+ commands << ["├── arguments: ∅\n", indent]
1275
+ else
1276
+ commands << ["├── arguments:\n", indent]
1277
+ commands << [arguments, "#{indent}│ "]
1278
+ end
1279
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1280
+ if (block = node.block).nil?
1281
+ commands << ["└── block: ∅\n", indent]
1282
+ else
1283
+ commands << ["└── block:\n", indent]
1284
+ commands << [block, "#{indent} "]
1285
+ end
1286
+ end
1287
+
1288
+ # Inspect a InstanceVariableAndWriteNode node.
1289
+ def visit_instance_variable_and_write_node(node)
1290
+ commands << [inspect_node("InstanceVariableAndWriteNode", node), indent]
1291
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1292
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1293
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1294
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1295
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1296
+ commands << ["└── value:\n", indent]
1297
+ commands << [node.value, "#{indent} "]
1298
+ end
1299
+
1300
+ # Inspect a InstanceVariableOperatorWriteNode node.
1301
+ def visit_instance_variable_operator_write_node(node)
1302
+ commands << [inspect_node("InstanceVariableOperatorWriteNode", node), indent]
1303
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1304
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1305
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1306
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1307
+ commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
1308
+ commands << ["├── value:\n", indent]
1309
+ commands << [node.value, "#{indent}│ "]
1310
+ commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
1311
+ end
1312
+
1313
+ # Inspect a InstanceVariableOrWriteNode node.
1314
+ def visit_instance_variable_or_write_node(node)
1315
+ commands << [inspect_node("InstanceVariableOrWriteNode", node), indent]
1316
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1317
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1318
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1319
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1320
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1321
+ commands << ["└── value:\n", indent]
1322
+ commands << [node.value, "#{indent} "]
1323
+ end
1324
+
1325
+ # Inspect a InstanceVariableReadNode node.
1326
+ def visit_instance_variable_read_node(node)
1327
+ commands << [inspect_node("InstanceVariableReadNode", node), indent]
1328
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1329
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1330
+ commands << ["└── name: #{node.name.inspect}\n", indent]
1331
+ end
1332
+
1333
+ # Inspect a InstanceVariableTargetNode node.
1334
+ def visit_instance_variable_target_node(node)
1335
+ commands << [inspect_node("InstanceVariableTargetNode", node), indent]
1336
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1337
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1338
+ commands << ["└── name: #{node.name.inspect}\n", indent]
1339
+ end
1340
+
1341
+ # Inspect a InstanceVariableWriteNode node.
1342
+ def visit_instance_variable_write_node(node)
1343
+ commands << [inspect_node("InstanceVariableWriteNode", node), indent]
1344
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1345
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1346
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1347
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1348
+ commands << ["├── value:\n", indent]
1349
+ commands << [node.value, "#{indent}│ "]
1350
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1351
+ end
1352
+
1353
+ # Inspect a IntegerNode node.
1354
+ def visit_integer_node(node)
1355
+ commands << [inspect_node("IntegerNode", node), indent]
1356
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("binary" if node.binary?), ("decimal" if node.decimal?), ("octal" if node.octal?), ("hexadecimal" if node.hexadecimal?)].compact
1357
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1358
+ commands << ["└── value: #{node.value.inspect}\n", indent]
1359
+ end
1360
+
1361
+ # Inspect a InterpolatedMatchLastLineNode node.
1362
+ def visit_interpolated_match_last_line_node(node)
1363
+ commands << [inspect_node("InterpolatedMatchLastLineNode", node), indent]
1364
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
1365
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1366
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1367
+ commands << ["├── parts: (length: #{(parts = node.parts).length})\n", indent]
1368
+ if parts.any?
1369
+ parts[0...-1].each do |child|
1370
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1371
+ commands << [child, "#{indent}│ │ "]
1372
+ end
1373
+ commands << [Replace.new("#{indent}│ └── "), indent]
1374
+ commands << [parts[-1], "#{indent}│ "]
1375
+ end
1376
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1377
+ end
1378
+
1379
+ # Inspect a InterpolatedRegularExpressionNode node.
1380
+ def visit_interpolated_regular_expression_node(node)
1381
+ commands << [inspect_node("InterpolatedRegularExpressionNode", node), indent]
1382
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
1383
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1384
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1385
+ commands << ["├── parts: (length: #{(parts = node.parts).length})\n", indent]
1386
+ if parts.any?
1387
+ parts[0...-1].each do |child|
1388
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1389
+ commands << [child, "#{indent}│ │ "]
1390
+ end
1391
+ commands << [Replace.new("#{indent}│ └── "), indent]
1392
+ commands << [parts[-1], "#{indent}│ "]
1393
+ end
1394
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1395
+ end
1396
+
1397
+ # Inspect a InterpolatedStringNode node.
1398
+ def visit_interpolated_string_node(node)
1399
+ commands << [inspect_node("InterpolatedStringNode", node), indent]
1400
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("frozen" if node.frozen?), ("mutable" if node.mutable?)].compact
1401
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1402
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1403
+ commands << ["├── parts: (length: #{(parts = node.parts).length})\n", indent]
1404
+ if parts.any?
1405
+ parts[0...-1].each do |child|
1406
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1407
+ commands << [child, "#{indent}│ │ "]
1408
+ end
1409
+ commands << [Replace.new("#{indent}│ └── "), indent]
1410
+ commands << [parts[-1], "#{indent}│ "]
1411
+ end
1412
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1413
+ end
1414
+
1415
+ # Inspect a InterpolatedSymbolNode node.
1416
+ def visit_interpolated_symbol_node(node)
1417
+ commands << [inspect_node("InterpolatedSymbolNode", node), indent]
1418
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1419
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1420
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1421
+ commands << ["├── parts: (length: #{(parts = node.parts).length})\n", indent]
1422
+ if parts.any?
1423
+ parts[0...-1].each do |child|
1424
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1425
+ commands << [child, "#{indent}│ │ "]
1426
+ end
1427
+ commands << [Replace.new("#{indent}│ └── "), indent]
1428
+ commands << [parts[-1], "#{indent}│ "]
1429
+ end
1430
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1431
+ end
1432
+
1433
+ # Inspect a InterpolatedXStringNode node.
1434
+ def visit_interpolated_x_string_node(node)
1435
+ commands << [inspect_node("InterpolatedXStringNode", node), indent]
1436
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1437
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1438
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1439
+ commands << ["├── parts: (length: #{(parts = node.parts).length})\n", indent]
1440
+ if parts.any?
1441
+ parts[0...-1].each do |child|
1442
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1443
+ commands << [child, "#{indent}│ │ "]
1444
+ end
1445
+ commands << [Replace.new("#{indent}│ └── "), indent]
1446
+ commands << [parts[-1], "#{indent}│ "]
1447
+ end
1448
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1449
+ end
1450
+
1451
+ # Inspect a ItLocalVariableReadNode node.
1452
+ def visit_it_local_variable_read_node(node)
1453
+ commands << [inspect_node("ItLocalVariableReadNode", node), indent]
1454
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1455
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1456
+ end
1457
+
1458
+ # Inspect a ItParametersNode node.
1459
+ def visit_it_parameters_node(node)
1460
+ commands << [inspect_node("ItParametersNode", node), indent]
1461
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1462
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1463
+ end
1464
+
1465
+ # Inspect a KeywordHashNode node.
1466
+ def visit_keyword_hash_node(node)
1467
+ commands << [inspect_node("KeywordHashNode", node), indent]
1468
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("symbol_keys" if node.symbol_keys?)].compact
1469
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1470
+ commands << ["└── elements: (length: #{(elements = node.elements).length})\n", indent]
1471
+ if elements.any?
1472
+ elements[0...-1].each do |child|
1473
+ commands << [Replace.new("#{indent} ├── "), indent]
1474
+ commands << [child, "#{indent} │ "]
1475
+ end
1476
+ commands << [Replace.new("#{indent} └── "), indent]
1477
+ commands << [elements[-1], "#{indent} "]
1478
+ end
1479
+ end
1480
+
1481
+ # Inspect a KeywordRestParameterNode node.
1482
+ def visit_keyword_rest_parameter_node(node)
1483
+ commands << [inspect_node("KeywordRestParameterNode", node), indent]
1484
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
1485
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1486
+ if (name = node.name).nil?
1487
+ commands << ["├── name: ∅\n", indent]
1488
+ else
1489
+ commands << ["├── name: #{name.inspect}\n", indent]
1490
+ end
1491
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1492
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1493
+ end
1494
+
1495
+ # Inspect a LambdaNode node.
1496
+ def visit_lambda_node(node)
1497
+ commands << [inspect_node("LambdaNode", node), indent]
1498
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1499
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1500
+ commands << ["├── locals: #{node.locals.inspect}\n", indent]
1501
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1502
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1503
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1504
+ if (parameters = node.parameters).nil?
1505
+ commands << ["├── parameters: ∅\n", indent]
1506
+ else
1507
+ commands << ["├── parameters:\n", indent]
1508
+ commands << [parameters, "#{indent}│ "]
1509
+ end
1510
+ if (body = node.body).nil?
1511
+ commands << ["└── body: ∅\n", indent]
1512
+ else
1513
+ commands << ["└── body:\n", indent]
1514
+ commands << [body, "#{indent} "]
1515
+ end
1516
+ end
1517
+
1518
+ # Inspect a LocalVariableAndWriteNode node.
1519
+ def visit_local_variable_and_write_node(node)
1520
+ commands << [inspect_node("LocalVariableAndWriteNode", node), indent]
1521
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1522
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1523
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1524
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1525
+ commands << ["├── value:\n", indent]
1526
+ commands << [node.value, "#{indent}│ "]
1527
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1528
+ commands << ["└── depth: #{node.depth.inspect}\n", indent]
1529
+ end
1530
+
1531
+ # Inspect a LocalVariableOperatorWriteNode node.
1532
+ def visit_local_variable_operator_write_node(node)
1533
+ commands << [inspect_node("LocalVariableOperatorWriteNode", node), indent]
1534
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1535
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1536
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1537
+ commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
1538
+ commands << ["├── value:\n", indent]
1539
+ commands << [node.value, "#{indent}│ "]
1540
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1541
+ commands << ["├── binary_operator: #{node.binary_operator.inspect}\n", indent]
1542
+ commands << ["└── depth: #{node.depth.inspect}\n", indent]
1543
+ end
1544
+
1545
+ # Inspect a LocalVariableOrWriteNode node.
1546
+ def visit_local_variable_or_write_node(node)
1547
+ commands << [inspect_node("LocalVariableOrWriteNode", node), indent]
1548
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1549
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1550
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1551
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1552
+ commands << ["├── value:\n", indent]
1553
+ commands << [node.value, "#{indent}│ "]
1554
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1555
+ commands << ["└── depth: #{node.depth.inspect}\n", indent]
1556
+ end
1557
+
1558
+ # Inspect a LocalVariableReadNode node.
1559
+ def visit_local_variable_read_node(node)
1560
+ commands << [inspect_node("LocalVariableReadNode", node), indent]
1561
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1562
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1563
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1564
+ commands << ["└── depth: #{node.depth.inspect}\n", indent]
1565
+ end
1566
+
1567
+ # Inspect a LocalVariableTargetNode node.
1568
+ def visit_local_variable_target_node(node)
1569
+ commands << [inspect_node("LocalVariableTargetNode", node), indent]
1570
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1571
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1572
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1573
+ commands << ["└── depth: #{node.depth.inspect}\n", indent]
1574
+ end
1575
+
1576
+ # Inspect a LocalVariableWriteNode node.
1577
+ def visit_local_variable_write_node(node)
1578
+ commands << [inspect_node("LocalVariableWriteNode", node), indent]
1579
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1580
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1581
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1582
+ commands << ["├── depth: #{node.depth.inspect}\n", indent]
1583
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1584
+ commands << ["├── value:\n", indent]
1585
+ commands << [node.value, "#{indent}│ "]
1586
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1587
+ end
1588
+
1589
+ # Inspect a MatchLastLineNode node.
1590
+ def visit_match_last_line_node(node)
1591
+ commands << [inspect_node("MatchLastLineNode", node), indent]
1592
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
1593
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1594
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1595
+ commands << ["├── content_loc: #{inspect_location(node.content_loc)}\n", indent]
1596
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1597
+ commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
1598
+ end
1599
+
1600
+ # Inspect a MatchPredicateNode node.
1601
+ def visit_match_predicate_node(node)
1602
+ commands << [inspect_node("MatchPredicateNode", node), indent]
1603
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1604
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1605
+ commands << ["├── value:\n", indent]
1606
+ commands << [node.value, "#{indent}│ "]
1607
+ commands << ["├── pattern:\n", indent]
1608
+ commands << [node.pattern, "#{indent}│ "]
1609
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1610
+ end
1611
+
1612
+ # Inspect a MatchRequiredNode node.
1613
+ def visit_match_required_node(node)
1614
+ commands << [inspect_node("MatchRequiredNode", node), indent]
1615
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1616
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1617
+ commands << ["├── value:\n", indent]
1618
+ commands << [node.value, "#{indent}│ "]
1619
+ commands << ["├── pattern:\n", indent]
1620
+ commands << [node.pattern, "#{indent}│ "]
1621
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1622
+ end
1623
+
1624
+ # Inspect a MatchWriteNode node.
1625
+ def visit_match_write_node(node)
1626
+ commands << [inspect_node("MatchWriteNode", node), indent]
1627
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1628
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1629
+ commands << ["├── call:\n", indent]
1630
+ commands << [node.call, "#{indent}│ "]
1631
+ commands << ["└── targets: (length: #{(targets = node.targets).length})\n", indent]
1632
+ if targets.any?
1633
+ targets[0...-1].each do |child|
1634
+ commands << [Replace.new("#{indent} ├── "), indent]
1635
+ commands << [child, "#{indent} │ "]
1636
+ end
1637
+ commands << [Replace.new("#{indent} └── "), indent]
1638
+ commands << [targets[-1], "#{indent} "]
1639
+ end
1640
+ end
1641
+
1642
+ # Inspect a MissingNode node.
1643
+ def visit_missing_node(node)
1644
+ commands << [inspect_node("MissingNode", node), indent]
1645
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1646
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1647
+ end
1648
+
1649
+ # Inspect a ModuleNode node.
1650
+ def visit_module_node(node)
1651
+ commands << [inspect_node("ModuleNode", node), indent]
1652
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1653
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1654
+ commands << ["├── locals: #{node.locals.inspect}\n", indent]
1655
+ commands << ["├── module_keyword_loc: #{inspect_location(node.module_keyword_loc)}\n", indent]
1656
+ commands << ["├── constant_path:\n", indent]
1657
+ commands << [node.constant_path, "#{indent}│ "]
1658
+ if (body = node.body).nil?
1659
+ commands << ["├── body: ∅\n", indent]
1660
+ else
1661
+ commands << ["├── body:\n", indent]
1662
+ commands << [body, "#{indent}│ "]
1663
+ end
1664
+ commands << ["├── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
1665
+ commands << ["└── name: #{node.name.inspect}\n", indent]
1666
+ end
1667
+
1668
+ # Inspect a MultiTargetNode node.
1669
+ def visit_multi_target_node(node)
1670
+ commands << [inspect_node("MultiTargetNode", node), indent]
1671
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1672
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1673
+ commands << ["├── lefts: (length: #{(lefts = node.lefts).length})\n", indent]
1674
+ if lefts.any?
1675
+ lefts[0...-1].each do |child|
1676
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1677
+ commands << [child, "#{indent}│ │ "]
1678
+ end
1679
+ commands << [Replace.new("#{indent}│ └── "), indent]
1680
+ commands << [lefts[-1], "#{indent}│ "]
1681
+ end
1682
+ if (rest = node.rest).nil?
1683
+ commands << ["├── rest: ∅\n", indent]
1684
+ else
1685
+ commands << ["├── rest:\n", indent]
1686
+ commands << [rest, "#{indent}│ "]
1687
+ end
1688
+ commands << ["├── rights: (length: #{(rights = node.rights).length})\n", indent]
1689
+ if rights.any?
1690
+ rights[0...-1].each do |child|
1691
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1692
+ commands << [child, "#{indent}│ │ "]
1693
+ end
1694
+ commands << [Replace.new("#{indent}│ └── "), indent]
1695
+ commands << [rights[-1], "#{indent}│ "]
1696
+ end
1697
+ commands << ["├── lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent]
1698
+ commands << ["└── rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent]
1699
+ end
1700
+
1701
+ # Inspect a MultiWriteNode node.
1702
+ def visit_multi_write_node(node)
1703
+ commands << [inspect_node("MultiWriteNode", node), indent]
1704
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1705
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1706
+ commands << ["├── lefts: (length: #{(lefts = node.lefts).length})\n", indent]
1707
+ if lefts.any?
1708
+ lefts[0...-1].each do |child|
1709
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1710
+ commands << [child, "#{indent}│ │ "]
1711
+ end
1712
+ commands << [Replace.new("#{indent}│ └── "), indent]
1713
+ commands << [lefts[-1], "#{indent}│ "]
1714
+ end
1715
+ if (rest = node.rest).nil?
1716
+ commands << ["├── rest: ∅\n", indent]
1717
+ else
1718
+ commands << ["├── rest:\n", indent]
1719
+ commands << [rest, "#{indent}│ "]
1720
+ end
1721
+ commands << ["├── rights: (length: #{(rights = node.rights).length})\n", indent]
1722
+ if rights.any?
1723
+ rights[0...-1].each do |child|
1724
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1725
+ commands << [child, "#{indent}│ │ "]
1726
+ end
1727
+ commands << [Replace.new("#{indent}│ └── "), indent]
1728
+ commands << [rights[-1], "#{indent}│ "]
1729
+ end
1730
+ commands << ["├── lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent]
1731
+ commands << ["├── rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent]
1732
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1733
+ commands << ["└── value:\n", indent]
1734
+ commands << [node.value, "#{indent} "]
1735
+ end
1736
+
1737
+ # Inspect a NextNode node.
1738
+ def visit_next_node(node)
1739
+ commands << [inspect_node("NextNode", node), indent]
1740
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1741
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1742
+ if (arguments = node.arguments).nil?
1743
+ commands << ["├── arguments: ∅\n", indent]
1744
+ else
1745
+ commands << ["├── arguments:\n", indent]
1746
+ commands << [arguments, "#{indent}│ "]
1747
+ end
1748
+ commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
1749
+ end
1750
+
1751
+ # Inspect a NilNode node.
1752
+ def visit_nil_node(node)
1753
+ commands << [inspect_node("NilNode", node), indent]
1754
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1755
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1756
+ end
1757
+
1758
+ # Inspect a NoKeywordsParameterNode node.
1759
+ def visit_no_keywords_parameter_node(node)
1760
+ commands << [inspect_node("NoKeywordsParameterNode", node), indent]
1761
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1762
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1763
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1764
+ commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
1765
+ end
1766
+
1767
+ # Inspect a NumberedParametersNode node.
1768
+ def visit_numbered_parameters_node(node)
1769
+ commands << [inspect_node("NumberedParametersNode", node), indent]
1770
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1771
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1772
+ commands << ["└── maximum: #{node.maximum.inspect}\n", indent]
1773
+ end
1774
+
1775
+ # Inspect a NumberedReferenceReadNode node.
1776
+ def visit_numbered_reference_read_node(node)
1777
+ commands << [inspect_node("NumberedReferenceReadNode", node), indent]
1778
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1779
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1780
+ commands << ["└── number: #{node.number.inspect}\n", indent]
1781
+ end
1782
+
1783
+ # Inspect a OptionalKeywordParameterNode node.
1784
+ def visit_optional_keyword_parameter_node(node)
1785
+ commands << [inspect_node("OptionalKeywordParameterNode", node), indent]
1786
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
1787
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1788
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1789
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1790
+ commands << ["└── value:\n", indent]
1791
+ commands << [node.value, "#{indent} "]
1792
+ end
1793
+
1794
+ # Inspect a OptionalParameterNode node.
1795
+ def visit_optional_parameter_node(node)
1796
+ commands << [inspect_node("OptionalParameterNode", node), indent]
1797
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
1798
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1799
+ commands << ["├── name: #{node.name.inspect}\n", indent]
1800
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
1801
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1802
+ commands << ["└── value:\n", indent]
1803
+ commands << [node.value, "#{indent} "]
1804
+ end
1805
+
1806
+ # Inspect a OrNode node.
1807
+ def visit_or_node(node)
1808
+ commands << [inspect_node("OrNode", node), indent]
1809
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1810
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1811
+ commands << ["├── left:\n", indent]
1812
+ commands << [node.left, "#{indent}│ "]
1813
+ commands << ["├── right:\n", indent]
1814
+ commands << [node.right, "#{indent}│ "]
1815
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1816
+ end
1817
+
1818
+ # Inspect a ParametersNode node.
1819
+ def visit_parameters_node(node)
1820
+ commands << [inspect_node("ParametersNode", node), indent]
1821
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1822
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1823
+ commands << ["├── requireds: (length: #{(requireds = node.requireds).length})\n", indent]
1824
+ if requireds.any?
1825
+ requireds[0...-1].each do |child|
1826
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1827
+ commands << [child, "#{indent}│ │ "]
1828
+ end
1829
+ commands << [Replace.new("#{indent}│ └── "), indent]
1830
+ commands << [requireds[-1], "#{indent}│ "]
1831
+ end
1832
+ commands << ["├── optionals: (length: #{(optionals = node.optionals).length})\n", indent]
1833
+ if optionals.any?
1834
+ optionals[0...-1].each do |child|
1835
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1836
+ commands << [child, "#{indent}│ │ "]
1837
+ end
1838
+ commands << [Replace.new("#{indent}│ └── "), indent]
1839
+ commands << [optionals[-1], "#{indent}│ "]
1840
+ end
1841
+ if (rest = node.rest).nil?
1842
+ commands << ["├── rest: ∅\n", indent]
1843
+ else
1844
+ commands << ["├── rest:\n", indent]
1845
+ commands << [rest, "#{indent}│ "]
1846
+ end
1847
+ commands << ["├── posts: (length: #{(posts = node.posts).length})\n", indent]
1848
+ if posts.any?
1849
+ posts[0...-1].each do |child|
1850
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1851
+ commands << [child, "#{indent}│ │ "]
1852
+ end
1853
+ commands << [Replace.new("#{indent}│ └── "), indent]
1854
+ commands << [posts[-1], "#{indent}│ "]
1855
+ end
1856
+ commands << ["├── keywords: (length: #{(keywords = node.keywords).length})\n", indent]
1857
+ if keywords.any?
1858
+ keywords[0...-1].each do |child|
1859
+ commands << [Replace.new("#{indent}│ ├── "), indent]
1860
+ commands << [child, "#{indent}│ │ "]
1861
+ end
1862
+ commands << [Replace.new("#{indent}│ └── "), indent]
1863
+ commands << [keywords[-1], "#{indent}│ "]
1864
+ end
1865
+ if (keyword_rest = node.keyword_rest).nil?
1866
+ commands << ["├── keyword_rest: ∅\n", indent]
1867
+ else
1868
+ commands << ["├── keyword_rest:\n", indent]
1869
+ commands << [keyword_rest, "#{indent}│ "]
1870
+ end
1871
+ if (block = node.block).nil?
1872
+ commands << ["└── block: ∅\n", indent]
1873
+ else
1874
+ commands << ["└── block:\n", indent]
1875
+ commands << [block, "#{indent} "]
1876
+ end
1877
+ end
1878
+
1879
+ # Inspect a ParenthesesNode node.
1880
+ def visit_parentheses_node(node)
1881
+ commands << [inspect_node("ParenthesesNode", node), indent]
1882
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("multiple_statements" if node.multiple_statements?)].compact
1883
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1884
+ if (body = node.body).nil?
1885
+ commands << ["├── body: ∅\n", indent]
1886
+ else
1887
+ commands << ["├── body:\n", indent]
1888
+ commands << [body, "#{indent}│ "]
1889
+ end
1890
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1891
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1892
+ end
1893
+
1894
+ # Inspect a PinnedExpressionNode node.
1895
+ def visit_pinned_expression_node(node)
1896
+ commands << [inspect_node("PinnedExpressionNode", node), indent]
1897
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1898
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1899
+ commands << ["├── expression:\n", indent]
1900
+ commands << [node.expression, "#{indent}│ "]
1901
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1902
+ commands << ["├── lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent]
1903
+ commands << ["└── rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent]
1904
+ end
1905
+
1906
+ # Inspect a PinnedVariableNode node.
1907
+ def visit_pinned_variable_node(node)
1908
+ commands << [inspect_node("PinnedVariableNode", node), indent]
1909
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1910
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1911
+ commands << ["├── variable:\n", indent]
1912
+ commands << [node.variable, "#{indent}│ "]
1913
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1914
+ end
1915
+
1916
+ # Inspect a PostExecutionNode node.
1917
+ def visit_post_execution_node(node)
1918
+ commands << [inspect_node("PostExecutionNode", node), indent]
1919
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1920
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1921
+ if (statements = node.statements).nil?
1922
+ commands << ["├── statements: ∅\n", indent]
1923
+ else
1924
+ commands << ["├── statements:\n", indent]
1925
+ commands << [statements, "#{indent}│ "]
1926
+ end
1927
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
1928
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1929
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1930
+ end
1931
+
1932
+ # Inspect a PreExecutionNode node.
1933
+ def visit_pre_execution_node(node)
1934
+ commands << [inspect_node("PreExecutionNode", node), indent]
1935
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1936
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1937
+ if (statements = node.statements).nil?
1938
+ commands << ["├── statements: ∅\n", indent]
1939
+ else
1940
+ commands << ["├── statements:\n", indent]
1941
+ commands << [statements, "#{indent}│ "]
1942
+ end
1943
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
1944
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
1945
+ commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
1946
+ end
1947
+
1948
+ # Inspect a ProgramNode node.
1949
+ def visit_program_node(node)
1950
+ commands << [inspect_node("ProgramNode", node), indent]
1951
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1952
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1953
+ commands << ["├── locals: #{node.locals.inspect}\n", indent]
1954
+ commands << ["└── statements:\n", indent]
1955
+ commands << [node.statements, "#{indent} "]
1956
+ end
1957
+
1958
+ # Inspect a RangeNode node.
1959
+ def visit_range_node(node)
1960
+ commands << [inspect_node("RangeNode", node), indent]
1961
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("exclude_end" if node.exclude_end?)].compact
1962
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1963
+ if (left = node.left).nil?
1964
+ commands << ["├── left: ∅\n", indent]
1965
+ else
1966
+ commands << ["├── left:\n", indent]
1967
+ commands << [left, "#{indent}│ "]
1968
+ end
1969
+ if (right = node.right).nil?
1970
+ commands << ["├── right: ∅\n", indent]
1971
+ else
1972
+ commands << ["├── right:\n", indent]
1973
+ commands << [right, "#{indent}│ "]
1974
+ end
1975
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
1976
+ end
1977
+
1978
+ # Inspect a RationalNode node.
1979
+ def visit_rational_node(node)
1980
+ commands << [inspect_node("RationalNode", node), indent]
1981
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("binary" if node.binary?), ("decimal" if node.decimal?), ("octal" if node.octal?), ("hexadecimal" if node.hexadecimal?)].compact
1982
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1983
+ commands << ["├── numerator: #{node.numerator.inspect}\n", indent]
1984
+ commands << ["└── denominator: #{node.denominator.inspect}\n", indent]
1985
+ end
1986
+
1987
+ # Inspect a RedoNode node.
1988
+ def visit_redo_node(node)
1989
+ commands << [inspect_node("RedoNode", node), indent]
1990
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
1991
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1992
+ end
1993
+
1994
+ # Inspect a RegularExpressionNode node.
1995
+ def visit_regular_expression_node(node)
1996
+ commands << [inspect_node("RegularExpressionNode", node), indent]
1997
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
1998
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
1999
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
2000
+ commands << ["├── content_loc: #{inspect_location(node.content_loc)}\n", indent]
2001
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
2002
+ commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
2003
+ end
2004
+
2005
+ # Inspect a RequiredKeywordParameterNode node.
2006
+ def visit_required_keyword_parameter_node(node)
2007
+ commands << [inspect_node("RequiredKeywordParameterNode", node), indent]
2008
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
2009
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2010
+ commands << ["├── name: #{node.name.inspect}\n", indent]
2011
+ commands << ["└── name_loc: #{inspect_location(node.name_loc)}\n", indent]
2012
+ end
2013
+
2014
+ # Inspect a RequiredParameterNode node.
2015
+ def visit_required_parameter_node(node)
2016
+ commands << [inspect_node("RequiredParameterNode", node), indent]
2017
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
2018
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2019
+ commands << ["└── name: #{node.name.inspect}\n", indent]
2020
+ end
2021
+
2022
+ # Inspect a RescueModifierNode node.
2023
+ def visit_rescue_modifier_node(node)
2024
+ commands << [inspect_node("RescueModifierNode", node), indent]
2025
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2026
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2027
+ commands << ["├── expression:\n", indent]
2028
+ commands << [node.expression, "#{indent}│ "]
2029
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2030
+ commands << ["└── rescue_expression:\n", indent]
2031
+ commands << [node.rescue_expression, "#{indent} "]
2032
+ end
2033
+
2034
+ # Inspect a RescueNode node.
2035
+ def visit_rescue_node(node)
2036
+ commands << [inspect_node("RescueNode", node), indent]
2037
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2038
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2039
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2040
+ commands << ["├── exceptions: (length: #{(exceptions = node.exceptions).length})\n", indent]
2041
+ if exceptions.any?
2042
+ exceptions[0...-1].each do |child|
2043
+ commands << [Replace.new("#{indent}│ ├── "), indent]
2044
+ commands << [child, "#{indent}│ │ "]
2045
+ end
2046
+ commands << [Replace.new("#{indent}│ └── "), indent]
2047
+ commands << [exceptions[-1], "#{indent}│ "]
2048
+ end
2049
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
2050
+ if (reference = node.reference).nil?
2051
+ commands << ["├── reference: ∅\n", indent]
2052
+ else
2053
+ commands << ["├── reference:\n", indent]
2054
+ commands << [reference, "#{indent}│ "]
2055
+ end
2056
+ commands << ["├── then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent]
2057
+ if (statements = node.statements).nil?
2058
+ commands << ["├── statements: ∅\n", indent]
2059
+ else
2060
+ commands << ["├── statements:\n", indent]
2061
+ commands << [statements, "#{indent}│ "]
2062
+ end
2063
+ if (subsequent = node.subsequent).nil?
2064
+ commands << ["└── subsequent: ∅\n", indent]
2065
+ else
2066
+ commands << ["└── subsequent:\n", indent]
2067
+ commands << [subsequent, "#{indent} "]
2068
+ end
2069
+ end
2070
+
2071
+ # Inspect a RestParameterNode node.
2072
+ def visit_rest_parameter_node(node)
2073
+ commands << [inspect_node("RestParameterNode", node), indent]
2074
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
2075
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2076
+ if (name = node.name).nil?
2077
+ commands << ["├── name: ∅\n", indent]
2078
+ else
2079
+ commands << ["├── name: #{name.inspect}\n", indent]
2080
+ end
2081
+ commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
2082
+ commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
2083
+ end
2084
+
2085
+ # Inspect a RetryNode node.
2086
+ def visit_retry_node(node)
2087
+ commands << [inspect_node("RetryNode", node), indent]
2088
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2089
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2090
+ end
2091
+
2092
+ # Inspect a ReturnNode node.
2093
+ def visit_return_node(node)
2094
+ commands << [inspect_node("ReturnNode", node), indent]
2095
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2096
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2097
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2098
+ if (arguments = node.arguments).nil?
2099
+ commands << ["└── arguments: ∅\n", indent]
2100
+ else
2101
+ commands << ["└── arguments:\n", indent]
2102
+ commands << [arguments, "#{indent} "]
2103
+ end
2104
+ end
2105
+
2106
+ # Inspect a SelfNode node.
2107
+ def visit_self_node(node)
2108
+ commands << [inspect_node("SelfNode", node), indent]
2109
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2110
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2111
+ end
2112
+
2113
+ # Inspect a ShareableConstantNode node.
2114
+ def visit_shareable_constant_node(node)
2115
+ commands << [inspect_node("ShareableConstantNode", node), indent]
2116
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("literal" if node.literal?), ("experimental_everything" if node.experimental_everything?), ("experimental_copy" if node.experimental_copy?)].compact
2117
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2118
+ commands << ["└── write:\n", indent]
2119
+ commands << [node.write, "#{indent} "]
2120
+ end
2121
+
2122
+ # Inspect a SingletonClassNode node.
2123
+ def visit_singleton_class_node(node)
2124
+ commands << [inspect_node("SingletonClassNode", node), indent]
2125
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2126
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2127
+ commands << ["├── locals: #{node.locals.inspect}\n", indent]
2128
+ commands << ["├── class_keyword_loc: #{inspect_location(node.class_keyword_loc)}\n", indent]
2129
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
2130
+ commands << ["├── expression:\n", indent]
2131
+ commands << [node.expression, "#{indent}│ "]
2132
+ if (body = node.body).nil?
2133
+ commands << ["├── body: ∅\n", indent]
2134
+ else
2135
+ commands << ["├── body:\n", indent]
2136
+ commands << [body, "#{indent}│ "]
2137
+ end
2138
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
2139
+ end
2140
+
2141
+ # Inspect a SourceEncodingNode node.
2142
+ def visit_source_encoding_node(node)
2143
+ commands << [inspect_node("SourceEncodingNode", node), indent]
2144
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2145
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2146
+ end
2147
+
2148
+ # Inspect a SourceFileNode node.
2149
+ def visit_source_file_node(node)
2150
+ commands << [inspect_node("SourceFileNode", node), indent]
2151
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("frozen" if node.frozen?), ("mutable" if node.mutable?)].compact
2152
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2153
+ commands << ["└── filepath: #{node.filepath.inspect}\n", indent]
2154
+ end
2155
+
2156
+ # Inspect a SourceLineNode node.
2157
+ def visit_source_line_node(node)
2158
+ commands << [inspect_node("SourceLineNode", node), indent]
2159
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2160
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2161
+ end
2162
+
2163
+ # Inspect a SplatNode node.
2164
+ def visit_splat_node(node)
2165
+ commands << [inspect_node("SplatNode", node), indent]
2166
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2167
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2168
+ commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
2169
+ if (expression = node.expression).nil?
2170
+ commands << ["└── expression: ∅\n", indent]
2171
+ else
2172
+ commands << ["└── expression:\n", indent]
2173
+ commands << [expression, "#{indent} "]
2174
+ end
2175
+ end
2176
+
2177
+ # Inspect a StatementsNode node.
2178
+ def visit_statements_node(node)
2179
+ commands << [inspect_node("StatementsNode", node), indent]
2180
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2181
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2182
+ commands << ["└── body: (length: #{(body = node.body).length})\n", indent]
2183
+ if body.any?
2184
+ body[0...-1].each do |child|
2185
+ commands << [Replace.new("#{indent} ├── "), indent]
2186
+ commands << [child, "#{indent} │ "]
2187
+ end
2188
+ commands << [Replace.new("#{indent} └── "), indent]
2189
+ commands << [body[-1], "#{indent} "]
2190
+ end
2191
+ end
2192
+
2193
+ # Inspect a StringNode node.
2194
+ def visit_string_node(node)
2195
+ commands << [inspect_node("StringNode", node), indent]
2196
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("frozen" if node.frozen?), ("mutable" if node.mutable?)].compact
2197
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2198
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
2199
+ commands << ["├── content_loc: #{inspect_location(node.content_loc)}\n", indent]
2200
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
2201
+ commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
2202
+ end
2203
+
2204
+ # Inspect a SuperNode node.
2205
+ def visit_super_node(node)
2206
+ commands << [inspect_node("SuperNode", node), indent]
2207
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2208
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2209
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2210
+ commands << ["├── lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent]
2211
+ if (arguments = node.arguments).nil?
2212
+ commands << ["├── arguments: ∅\n", indent]
2213
+ else
2214
+ commands << ["├── arguments:\n", indent]
2215
+ commands << [arguments, "#{indent}│ "]
2216
+ end
2217
+ commands << ["├── rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent]
2218
+ if (block = node.block).nil?
2219
+ commands << ["└── block: ∅\n", indent]
2220
+ else
2221
+ commands << ["└── block:\n", indent]
2222
+ commands << [block, "#{indent} "]
2223
+ end
2224
+ end
2225
+
2226
+ # Inspect a SymbolNode node.
2227
+ def visit_symbol_node(node)
2228
+ commands << [inspect_node("SymbolNode", node), indent]
2229
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
2230
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2231
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
2232
+ commands << ["├── value_loc: #{inspect_location(node.value_loc)}\n", indent]
2233
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
2234
+ commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
2235
+ end
2236
+
2237
+ # Inspect a TrueNode node.
2238
+ def visit_true_node(node)
2239
+ commands << [inspect_node("TrueNode", node), indent]
2240
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2241
+ commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2242
+ end
2243
+
2244
+ # Inspect a UndefNode node.
2245
+ def visit_undef_node(node)
2246
+ commands << [inspect_node("UndefNode", node), indent]
2247
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2248
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2249
+ commands << ["├── names: (length: #{(names = node.names).length})\n", indent]
2250
+ if names.any?
2251
+ names[0...-1].each do |child|
2252
+ commands << [Replace.new("#{indent}│ ├── "), indent]
2253
+ commands << [child, "#{indent}│ │ "]
2254
+ end
2255
+ commands << [Replace.new("#{indent}│ └── "), indent]
2256
+ commands << [names[-1], "#{indent}│ "]
2257
+ end
2258
+ commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2259
+ end
2260
+
2261
+ # Inspect a UnlessNode node.
2262
+ def visit_unless_node(node)
2263
+ commands << [inspect_node("UnlessNode", node), indent]
2264
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2265
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2266
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2267
+ commands << ["├── predicate:\n", indent]
2268
+ commands << [node.predicate, "#{indent}│ "]
2269
+ commands << ["├── then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent]
2270
+ if (statements = node.statements).nil?
2271
+ commands << ["├── statements: ∅\n", indent]
2272
+ else
2273
+ commands << ["├── statements:\n", indent]
2274
+ commands << [statements, "#{indent}│ "]
2275
+ end
2276
+ if (else_clause = node.else_clause).nil?
2277
+ commands << ["├── else_clause: ∅\n", indent]
2278
+ else
2279
+ commands << ["├── else_clause:\n", indent]
2280
+ commands << [else_clause, "#{indent}│ "]
2281
+ end
2282
+ commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
2283
+ end
2284
+
2285
+ # Inspect a UntilNode node.
2286
+ def visit_until_node(node)
2287
+ commands << [inspect_node("UntilNode", node), indent]
2288
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("begin_modifier" if node.begin_modifier?)].compact
2289
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2290
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2291
+ commands << ["├── do_keyword_loc: #{inspect_location(node.do_keyword_loc)}\n", indent]
2292
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
2293
+ commands << ["├── predicate:\n", indent]
2294
+ commands << [node.predicate, "#{indent}│ "]
2295
+ if (statements = node.statements).nil?
2296
+ commands << ["└── statements: ∅\n", indent]
2297
+ else
2298
+ commands << ["└── statements:\n", indent]
2299
+ commands << [statements, "#{indent} "]
2300
+ end
2301
+ end
2302
+
2303
+ # Inspect a WhenNode node.
2304
+ def visit_when_node(node)
2305
+ commands << [inspect_node("WhenNode", node), indent]
2306
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2307
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2308
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2309
+ commands << ["├── conditions: (length: #{(conditions = node.conditions).length})\n", indent]
2310
+ if conditions.any?
2311
+ conditions[0...-1].each do |child|
2312
+ commands << [Replace.new("#{indent}│ ├── "), indent]
2313
+ commands << [child, "#{indent}│ │ "]
2314
+ end
2315
+ commands << [Replace.new("#{indent}│ └── "), indent]
2316
+ commands << [conditions[-1], "#{indent}│ "]
2317
+ end
2318
+ commands << ["├── then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent]
2319
+ if (statements = node.statements).nil?
2320
+ commands << ["└── statements: ∅\n", indent]
2321
+ else
2322
+ commands << ["└── statements:\n", indent]
2323
+ commands << [statements, "#{indent} "]
2324
+ end
2325
+ end
2326
+
2327
+ # Inspect a WhileNode node.
2328
+ def visit_while_node(node)
2329
+ commands << [inspect_node("WhileNode", node), indent]
2330
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("begin_modifier" if node.begin_modifier?)].compact
2331
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2332
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2333
+ commands << ["├── do_keyword_loc: #{inspect_location(node.do_keyword_loc)}\n", indent]
2334
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
2335
+ commands << ["├── predicate:\n", indent]
2336
+ commands << [node.predicate, "#{indent}│ "]
2337
+ if (statements = node.statements).nil?
2338
+ commands << ["└── statements: ∅\n", indent]
2339
+ else
2340
+ commands << ["└── statements:\n", indent]
2341
+ commands << [statements, "#{indent} "]
2342
+ end
2343
+ end
2344
+
2345
+ # Inspect a XStringNode node.
2346
+ def visit_x_string_node(node)
2347
+ commands << [inspect_node("XStringNode", node), indent]
2348
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?)].compact
2349
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2350
+ commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
2351
+ commands << ["├── content_loc: #{inspect_location(node.content_loc)}\n", indent]
2352
+ commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
2353
+ commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
2354
+ end
2355
+
2356
+ # Inspect a YieldNode node.
2357
+ def visit_yield_node(node)
2358
+ commands << [inspect_node("YieldNode", node), indent]
2359
+ flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
2360
+ commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
2361
+ commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
2362
+ commands << ["├── lparen_loc: #{inspect_location(node.lparen_loc)}\n", indent]
2363
+ if (arguments = node.arguments).nil?
2364
+ commands << ["├── arguments: ∅\n", indent]
2365
+ else
2366
+ commands << ["├── arguments:\n", indent]
2367
+ commands << [arguments, "#{indent}│ "]
2368
+ end
2369
+ commands << ["└── rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent]
2370
+ end
2371
+
2372
+ private
2373
+
2374
+ # Compose a header for the given node.
2375
+ def inspect_node(name, node)
2376
+ location = node.location
2377
+ "@ #{name} (location: (#{location.start_line},#{location.start_column})-(#{location.end_line},#{location.end_column}))\n"
2378
+ end
2379
+
2380
+ # Compose a string representing the given inner location field.
2381
+ def inspect_location(location)
2382
+ if location
2383
+ "(#{location.start_line},#{location.start_column})-(#{location.end_line},#{location.end_column}) = #{location.slice.inspect}"
2384
+ else
2385
+ "∅"
2386
+ end
2387
+ end
2388
+ end
2389
+ end