brakeman 5.4.1 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (428) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +10 -0
  3. data/README.md +2 -2
  4. data/bundle/load.rb +14 -15
  5. data/bundle/ruby/3.0.0/gems/parallel-1.23.0/lib/parallel/version.rb +4 -0
  6. data/bundle/ruby/{3.1.0/gems/parallel-1.22.1 → 3.0.0/gems/parallel-1.23.0}/lib/parallel.rb +43 -3
  7. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/History.rdoc +20 -0
  8. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/Manifest.txt +2 -0
  9. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/README.rdoc +2 -1
  10. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby20_parser.rb +171 -135
  11. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby20_parser.y +50 -16
  12. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby21_parser.rb +111 -75
  13. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby21_parser.y +50 -16
  14. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby22_parser.rb +239 -203
  15. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby22_parser.y +50 -16
  16. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby23_parser.rb +384 -348
  17. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2/lib/ruby24_parser.y → 3.0.0/gems/ruby_parser-3.20.1/lib/ruby23_parser.y} +51 -25
  18. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby24_parser.rb +97 -61
  19. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2/lib/ruby23_parser.y → 3.0.0/gems/ruby_parser-3.20.1/lib/ruby24_parser.y} +59 -17
  20. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby25_parser.rb +93 -57
  21. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby25_parser.y +50 -16
  22. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby26_parser.rb +93 -57
  23. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby26_parser.y +50 -16
  24. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby27_parser.rb +575 -539
  25. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby27_parser.y +50 -16
  26. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby30_parser.rb +358 -332
  27. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby30_parser.y +42 -16
  28. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby31_parser.rb +175 -149
  29. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby31_parser.y +42 -16
  30. data/bundle/ruby/3.0.0/gems/ruby_parser-3.20.1/lib/ruby32_parser.rb +13664 -0
  31. data/bundle/ruby/3.0.0/gems/ruby_parser-3.20.1/lib/ruby32_parser.y +3519 -0
  32. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby3_parser.yy +44 -16
  33. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby_parser.rb +2 -0
  34. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby_parser.yy +50 -16
  35. data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby_parser_extras.rb +19 -13
  36. data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/History.rdoc +13 -0
  37. data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/lib/pt_testcase.rb +3 -3
  38. data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/lib/sexp.rb +8 -2
  39. data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/lib/sexp_processor.rb +1 -1
  40. data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/lib/strict_sexp.rb +6 -5
  41. data/lib/brakeman/app_tree.rb +0 -1
  42. data/lib/brakeman/checks/check_content_tag.rb +8 -5
  43. data/lib/brakeman/checks/check_eol_ruby.rb +3 -1
  44. data/lib/brakeman/report/report_github.rb +1 -1
  45. data/lib/brakeman/scanner.rb +0 -1
  46. data/lib/brakeman/tracker/config.rb +1 -3
  47. data/lib/brakeman/version.rb +1 -1
  48. data/lib/brakeman.rb +6 -2
  49. metadata +404 -416
  50. data/bundle/ruby/3.1.0/gems/parallel-1.22.1/lib/parallel/processor_count.rb +0 -44
  51. data/bundle/ruby/3.1.0/gems/parallel-1.22.1/lib/parallel/version.rb +0 -4
  52. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -6
  53. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -19
  54. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -54
  55. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -5794
  56. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -1909
  57. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -6186
  58. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -2117
  59. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -1412
  60. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -179
  61. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -323
  62. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -30
  63. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -1388
  64. data/bundle/ruby/3.1.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -5
  65. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
  66. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
  67. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/README.txt +0 -0
  68. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
  69. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
  70. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
  71. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
  72. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
  73. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
  74. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
  75. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
  76. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
  77. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
  78. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
  79. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
  80. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
  81. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
  82. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
  83. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
  84. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
  85. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
  86. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
  87. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
  88. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
  89. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
  90. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
  91. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
  92. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
  93. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
  94. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
  95. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
  96. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
  97. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/erubis-2.7.0/setup.rb +0 -0
  98. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/CHANGELOG.md +0 -0
  99. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/FAQ.md +0 -0
  100. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/Gemfile +0 -0
  101. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/MIT-LICENSE +0 -0
  102. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/README.md +0 -0
  103. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/REFERENCE.md +0 -0
  104. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/TODO +0 -0
  105. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/haml.gemspec +0 -0
  106. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/attribute_builder.rb +0 -0
  107. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +0 -0
  108. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/attribute_parser.rb +0 -0
  109. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/buffer.rb +0 -0
  110. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/compiler.rb +0 -0
  111. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/engine.rb +0 -0
  112. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/error.rb +0 -0
  113. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/escapable.rb +0 -0
  114. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/exec.rb +0 -0
  115. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/filters.rb +0 -0
  116. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/generator.rb +0 -0
  117. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_extensions.rb +0 -0
  118. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_mods.rb +0 -0
  119. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/helpers/action_view_xss_mods.rb +0 -0
  120. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +0 -0
  121. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/helpers/safe_erubis_template.rb +0 -0
  122. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/helpers/xss_mods.rb +0 -0
  123. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/helpers.rb +0 -0
  124. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/options.rb +0 -0
  125. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/parser.rb +0 -0
  126. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/plugin.rb +0 -0
  127. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/railtie.rb +0 -0
  128. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/sass_rails_filter.rb +0 -0
  129. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/template/options.rb +0 -0
  130. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/template.rb +0 -0
  131. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/temple_engine.rb +0 -0
  132. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/temple_line_counter.rb +0 -0
  133. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/util.rb +0 -0
  134. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml/version.rb +0 -0
  135. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/lib/haml.rb +0 -0
  136. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +0 -0
  137. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/haml-5.2.2/yard/default/layout/html/footer.erb +0 -0
  138. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/AUTHORS +0 -0
  139. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/COPYING +0 -0
  140. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/Changelog.md +0 -0
  141. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/Gemfile +0 -0
  142. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/LICENSE +0 -0
  143. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/README.md +0 -0
  144. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/TODO +0 -0
  145. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/highline.gemspec +0 -0
  146. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/builtin_styles.rb +0 -0
  147. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/color_scheme.rb +0 -0
  148. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/compatibility.rb +0 -0
  149. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/custom_errors.rb +0 -0
  150. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/import.rb +0 -0
  151. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/io_console_compatible.rb +0 -0
  152. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/list.rb +0 -0
  153. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/list_renderer.rb +0 -0
  154. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/menu/item.rb +0 -0
  155. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/menu.rb +0 -0
  156. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/paginator.rb +0 -0
  157. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/question/answer_converter.rb +0 -0
  158. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/question.rb +0 -0
  159. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/question_asker.rb +0 -0
  160. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/simulate.rb +0 -0
  161. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/statement.rb +0 -0
  162. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/string.rb +0 -0
  163. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/string_extensions.rb +0 -0
  164. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/style.rb +0 -0
  165. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/template_renderer.rb +0 -0
  166. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/terminal/io_console.rb +0 -0
  167. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/terminal/ncurses.rb +0 -0
  168. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/terminal/unix_stty.rb +0 -0
  169. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/terminal.rb +0 -0
  170. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/version.rb +0 -0
  171. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline/wrapper.rb +0 -0
  172. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/highline-2.1.0/lib/highline.rb +0 -0
  173. /data/bundle/ruby/{3.1.0/gems/parallel-1.22.1 → 3.0.0/gems/parallel-1.23.0}/MIT-LICENSE.txt +0 -0
  174. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/LICENSE.txt +0 -0
  175. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/NEWS.md +0 -0
  176. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/README.md +0 -0
  177. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +0 -0
  178. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/attribute.rb +0 -0
  179. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/cdata.rb +0 -0
  180. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/child.rb +0 -0
  181. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/comment.rb +0 -0
  182. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/doctype.rb +0 -0
  183. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/document.rb +0 -0
  184. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +0 -0
  185. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +0 -0
  186. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +0 -0
  187. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +0 -0
  188. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +0 -0
  189. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/element.rb +0 -0
  190. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/encoding.rb +0 -0
  191. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/entity.rb +0 -0
  192. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +0 -0
  193. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +0 -0
  194. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +0 -0
  195. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/functions.rb +0 -0
  196. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/instruction.rb +0 -0
  197. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/light/node.rb +0 -0
  198. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/namespace.rb +0 -0
  199. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/node.rb +0 -0
  200. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/output.rb +0 -0
  201. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parent.rb +0 -0
  202. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parseexception.rb +0 -0
  203. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +0 -0
  204. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +0 -0
  205. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +0 -0
  206. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +0 -0
  207. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +0 -0
  208. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +0 -0
  209. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +0 -0
  210. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +0 -0
  211. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/quickpath.rb +0 -0
  212. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/rexml.rb +0 -0
  213. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +0 -0
  214. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/security.rb +0 -0
  215. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/source.rb +0 -0
  216. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +0 -0
  217. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/text.rb +0 -0
  218. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +0 -0
  219. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +0 -0
  220. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +0 -0
  221. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +0 -0
  222. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +0 -0
  223. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +0 -0
  224. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/xpath.rb +0 -0
  225. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +0 -0
  226. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/rexml-3.2.5/lib/rexml.rb +0 -0
  227. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/ruby2ruby-2.4.4/History.rdoc +0 -0
  228. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/ruby2ruby-2.4.4/Manifest.txt +0 -0
  229. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/ruby2ruby-2.4.4/README.rdoc +0 -0
  230. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb +0 -0
  231. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/compare/normalize.rb +0 -0
  232. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/debugging.md +0 -0
  233. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/gauntlet.md +0 -0
  234. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/rp_extensions.rb +0 -0
  235. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/rp_stringscanner.rb +0 -0
  236. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby_lexer.rb +0 -0
  237. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby_lexer.rex +0 -0
  238. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby_lexer.rex.rb +0 -0
  239. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/lib/ruby_lexer_strings.rb +0 -0
  240. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/tools/munge.rb +0 -0
  241. /data/bundle/ruby/{3.1.0/gems/ruby_parser-3.19.2 → 3.0.0/gems/ruby_parser-3.20.1}/tools/ripper.rb +0 -0
  242. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/CHANGES.md +0 -0
  243. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/Gemfile +0 -0
  244. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/LICENSE.txt +0 -0
  245. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/README.md +0 -0
  246. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -0
  247. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -0
  248. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -0
  249. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -0
  250. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -0
  251. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -0
  252. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -0
  253. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -0
  254. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -0
  255. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -0
  256. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -0
  257. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -0
  258. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -0
  259. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -0
  260. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -0
  261. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -0
  262. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -0
  263. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -0
  264. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -0
  265. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -0
  266. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -0
  267. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -0
  268. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -0
  269. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -0
  270. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -0
  271. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -0
  272. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -0
  273. /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/Manifest.txt +0 -0
  274. /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/README.rdoc +0 -0
  275. /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/lib/composite_sexp_processor.rb +0 -0
  276. /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/lib/sexp_matcher.rb +0 -0
  277. /data/bundle/ruby/{3.1.0/gems/sexp_processor-4.16.1 → 3.0.0/gems/sexp_processor-4.17.0}/lib/unique.rb +0 -0
  278. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/CHANGES +0 -0
  279. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/Gemfile +0 -0
  280. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/LICENSE +0 -0
  281. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/README.jp.md +0 -0
  282. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/README.md +0 -0
  283. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/code_attributes.rb +0 -0
  284. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/command.rb +0 -0
  285. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/controls.rb +0 -0
  286. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/do_inserter.rb +0 -0
  287. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/embedded.rb +0 -0
  288. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/end_inserter.rb +0 -0
  289. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/engine.rb +0 -0
  290. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/erb_converter.rb +0 -0
  291. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/filter.rb +0 -0
  292. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/grammar.rb +0 -0
  293. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/include.rb +0 -0
  294. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/interpolation.rb +0 -0
  295. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/logic_less/context.rb +0 -0
  296. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/logic_less/filter.rb +0 -0
  297. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/logic_less.rb +0 -0
  298. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/parser.rb +0 -0
  299. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/smart/escaper.rb +0 -0
  300. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/smart/filter.rb +0 -0
  301. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/smart/parser.rb +0 -0
  302. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/smart.rb +0 -0
  303. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/splat/builder.rb +0 -0
  304. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/splat/filter.rb +0 -0
  305. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/template.rb +0 -0
  306. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/translator.rb +0 -0
  307. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim/version.rb +0 -0
  308. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/lib/slim.rb +0 -0
  309. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/slim-4.1.0/slim.gemspec +0 -0
  310. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/CHANGES +0 -0
  311. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/EXPRESSIONS.md +0 -0
  312. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/Gemfile +0 -0
  313. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/LICENSE +0 -0
  314. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/README.md +0 -0
  315. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/engine.rb +0 -0
  316. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/erb/engine.rb +0 -0
  317. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/erb/parser.rb +0 -0
  318. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/erb/template.rb +0 -0
  319. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/erb/trimming.rb +0 -0
  320. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/exceptions.rb +0 -0
  321. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filter.rb +0 -0
  322. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/code_merger.rb +0 -0
  323. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/control_flow.rb +0 -0
  324. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/dynamic_inliner.rb +0 -0
  325. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/encoding.rb +0 -0
  326. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/eraser.rb +0 -0
  327. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/escapable.rb +0 -0
  328. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/multi_flattener.rb +0 -0
  329. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/remove_bom.rb +0 -0
  330. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/static_analyzer.rb +0 -0
  331. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/static_merger.rb +0 -0
  332. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/string_splitter.rb +0 -0
  333. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/filters/validator.rb +0 -0
  334. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/generator.rb +0 -0
  335. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/generators/array.rb +0 -0
  336. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/generators/array_buffer.rb +0 -0
  337. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/generators/erb.rb +0 -0
  338. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/generators/rails_output_buffer.rb +0 -0
  339. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/generators/string_buffer.rb +0 -0
  340. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/grammar.rb +0 -0
  341. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/html/attribute_merger.rb +0 -0
  342. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/html/attribute_remover.rb +0 -0
  343. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/html/attribute_sorter.rb +0 -0
  344. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/html/dispatcher.rb +0 -0
  345. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/html/fast.rb +0 -0
  346. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/html/filter.rb +0 -0
  347. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/html/pretty.rb +0 -0
  348. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/html/safe.rb +0 -0
  349. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/map.rb +0 -0
  350. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/mixins/dispatcher.rb +0 -0
  351. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/mixins/engine_dsl.rb +0 -0
  352. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/mixins/grammar_dsl.rb +0 -0
  353. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/mixins/options.rb +0 -0
  354. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/mixins/template.rb +0 -0
  355. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/parser.rb +0 -0
  356. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/static_analyzer.rb +0 -0
  357. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/templates/rails.rb +0 -0
  358. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/templates/tilt.rb +0 -0
  359. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/templates.rb +0 -0
  360. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/utils.rb +0 -0
  361. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple/version.rb +0 -0
  362. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/lib/temple.rb +0 -0
  363. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/temple-0.8.2/temple.gemspec +0 -0
  364. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/Gemfile +0 -0
  365. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/History.rdoc +0 -0
  366. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/LICENSE.txt +0 -0
  367. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/Manifest +0 -0
  368. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/README.rdoc +0 -0
  369. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/Todo.rdoc +0 -0
  370. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +0 -0
  371. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/lib/terminal-table/import.rb +0 -0
  372. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +0 -0
  373. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -0
  374. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -0
  375. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +0 -0
  376. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/lib/terminal-table/table_helper.rb +0 -0
  377. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +0 -0
  378. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/lib/terminal-table.rb +0 -0
  379. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/terminal-table-1.8.0/terminal-table.gemspec +0 -0
  380. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/COPYING +0 -0
  381. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/asciidoc.rb +0 -0
  382. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/babel.rb +0 -0
  383. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/bluecloth.rb +0 -0
  384. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/builder.rb +0 -0
  385. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/coffee.rb +0 -0
  386. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/commonmarker.rb +0 -0
  387. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/creole.rb +0 -0
  388. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/csv.rb +0 -0
  389. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/dummy.rb +0 -0
  390. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/erb.rb +0 -0
  391. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/erubi.rb +0 -0
  392. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/erubis.rb +0 -0
  393. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/etanni.rb +0 -0
  394. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/haml.rb +0 -0
  395. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/kramdown.rb +0 -0
  396. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/less.rb +0 -0
  397. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/liquid.rb +0 -0
  398. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/livescript.rb +0 -0
  399. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/mapping.rb +0 -0
  400. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/markaby.rb +0 -0
  401. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/maruku.rb +0 -0
  402. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/nokogiri.rb +0 -0
  403. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/pandoc.rb +0 -0
  404. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/plain.rb +0 -0
  405. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/prawn.rb +0 -0
  406. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/radius.rb +0 -0
  407. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/rdiscount.rb +0 -0
  408. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/rdoc.rb +0 -0
  409. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/redcarpet.rb +0 -0
  410. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/redcloth.rb +0 -0
  411. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb +0 -0
  412. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/sass.rb +0 -0
  413. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/sigil.rb +0 -0
  414. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/string.rb +0 -0
  415. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/template.rb +0 -0
  416. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/typescript.rb +0 -0
  417. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/wikicloth.rb +0 -0
  418. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt/yajl.rb +0 -0
  419. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/tilt-2.0.11/lib/tilt.rb +0 -0
  420. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/unicode-display_width-1.8.0/CHANGELOG.md +0 -0
  421. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/unicode-display_width-1.8.0/MIT-LICENSE.txt +0 -0
  422. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/unicode-display_width-1.8.0/README.md +0 -0
  423. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
  424. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -0
  425. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/unicode-display_width-1.8.0/lib/unicode/display_width/index.rb +0 -0
  426. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -0
  427. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -0
  428. /data/bundle/ruby/{3.1.0 → 3.0.0}/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -0
@@ -1,1412 +0,0 @@
1
- # frozen_string_literal: true
2
- # encoding: UTF-8
3
-
4
- $DEBUG = true if ENV["DEBUG"]
5
-
6
- class RubyParser::Legacy::RubyLexer
7
-
8
- # :stopdoc:
9
- HAS_ENC = "".respond_to? :encoding
10
-
11
- IDENT_CHAR = if HAS_ENC then
12
- /[\w\u0080-\u{10ffff}]/u
13
- else
14
- /[\w\x80-\xFF]/n
15
- end
16
-
17
- EOF = :eof_haha!
18
-
19
- # ruby constants for strings (should this be moved somewhere else?)
20
-
21
- STR_FUNC_BORING = 0x00
22
- STR_FUNC_ESCAPE = 0x01 # TODO: remove and replace with REGEXP
23
- STR_FUNC_EXPAND = 0x02
24
- STR_FUNC_REGEXP = 0x04
25
- STR_FUNC_QWORDS = 0x08
26
- STR_FUNC_SYMBOL = 0x10
27
- STR_FUNC_INDENT = 0x20 # <<-HEREDOC
28
- STR_FUNC_ICNTNT = 0x40 # <<~HEREDOC
29
-
30
- STR_SQUOTE = STR_FUNC_BORING
31
- STR_DQUOTE = STR_FUNC_BORING | STR_FUNC_EXPAND
32
- STR_XQUOTE = STR_FUNC_BORING | STR_FUNC_EXPAND
33
- STR_REGEXP = STR_FUNC_REGEXP | STR_FUNC_ESCAPE | STR_FUNC_EXPAND
34
- STR_SSYM = STR_FUNC_SYMBOL
35
- STR_DSYM = STR_FUNC_SYMBOL | STR_FUNC_EXPAND
36
-
37
- EXPR_BEG_ANY = [:expr_beg, :expr_mid, :expr_class ]
38
- EXPR_ARG_ANY = [:expr_arg, :expr_cmdarg, ]
39
- EXPR_END_ANY = [:expr_end, :expr_endarg, :expr_endfn]
40
-
41
- ESCAPES = {
42
- "a" => "\007",
43
- "b" => "\010",
44
- "e" => "\033",
45
- "f" => "\f",
46
- "n" => "\n",
47
- "r" => "\r",
48
- "s" => " ",
49
- "t" => "\t",
50
- "v" => "\13",
51
- "\\" => '\\',
52
- "\n" => "",
53
- "C-\?" => 127.chr,
54
- "c\?" => 127.chr,
55
- }
56
-
57
- TOKENS = {
58
- "!" => :tBANG,
59
- "!=" => :tNEQ,
60
- # "!@" => :tUBANG,
61
- "!~" => :tNMATCH,
62
- "," => :tCOMMA,
63
- ".." => :tDOT2,
64
- "..." => :tDOT3,
65
- "=" => :tEQL,
66
- "==" => :tEQ,
67
- "===" => :tEQQ,
68
- "=>" => :tASSOC,
69
- "=~" => :tMATCH,
70
- "->" => :tLAMBDA,
71
- }
72
-
73
- TAB_WIDTH = 8
74
-
75
- @@regexp_cache = Hash.new { |h,k| h[k] = Regexp.new(Regexp.escape(k)) }
76
- @@regexp_cache[nil] = nil
77
-
78
- # :startdoc:
79
-
80
- attr_accessor :lineno # we're bypassing oedipus' lineno handling.
81
- attr_accessor :brace_nest
82
- attr_accessor :cmdarg
83
- attr_accessor :command_start
84
- attr_accessor :cmd_state # temporary--ivar to avoid passing everywhere
85
- attr_accessor :last_state
86
- attr_accessor :cond
87
- attr_accessor :extra_lineno
88
-
89
- ##
90
- # Additional context surrounding tokens that both the lexer and
91
- # grammar use.
92
-
93
- attr_accessor :lex_state
94
- attr_accessor :lex_strterm
95
- attr_accessor :lpar_beg
96
- attr_accessor :paren_nest
97
- attr_accessor :parser # HACK for very end of lexer... *sigh*
98
- attr_accessor :space_seen
99
- attr_accessor :string_buffer
100
- attr_accessor :string_nest
101
-
102
- if $DEBUG then
103
- alias lex_state= lex_state=
104
- def lex_state=o
105
- return if @lex_state == o
106
- c = caller.first
107
- c = caller[1] if c =~ /\bresult\b/
108
- warn "lex_state: %p -> %p from %s" % [@lex_state, o, c.clean_caller]
109
- @lex_state = o
110
- end
111
- end
112
-
113
- # Last token read via next_token.
114
- attr_accessor :token
115
-
116
- ##
117
- # What version of ruby to parse. 18 and 19 are the only valid values
118
- # currently supported.
119
-
120
- attr_accessor :version
121
-
122
- attr_writer :comments
123
-
124
- def initialize v = 18
125
- self.version = v
126
- @lex_state = :expr_none
127
-
128
- self.cond = RubyParser::Legacy::RubyParserStuff::StackState.new(:cond, $DEBUG)
129
- self.cmdarg = RubyParser::Legacy::RubyParserStuff::StackState.new(:cmdarg, $DEBUG)
130
-
131
- reset
132
- end
133
-
134
- def arg_ambiguous
135
- self.warning("Ambiguous first argument. make sure.")
136
- end
137
-
138
- def arg_state
139
- in_arg_state? ? :expr_arg : :expr_beg
140
- end
141
-
142
- def beginning_of_line?
143
- ss.bol?
144
- end
145
- alias :bol? :beginning_of_line? # to make .rex file more readable
146
-
147
- def comments # TODO: remove this... maybe comment_string + attr_accessor
148
- c = @comments.join
149
- @comments.clear
150
- c
151
- end
152
-
153
- def end_of_stream?
154
- ss.eos?
155
- end
156
-
157
- def expr_dot?
158
- lex_state == :expr_dot
159
- end
160
-
161
- def expr_fname?
162
- lex_state == :expr_fname
163
- end
164
-
165
- def expr_result token, text
166
- cond.push false
167
- cmdarg.push false
168
- result :expr_beg, token, text
169
- end
170
-
171
- def heredoc here # TODO: rewrite / remove
172
- _, eos, func, last_line = here
173
-
174
- indent = (func & STR_FUNC_INDENT) != 0 ? "[ \t]*" : nil
175
- content_indent = (func & STR_FUNC_ICNTNT) != 0
176
- expand = (func & STR_FUNC_EXPAND) != 0
177
- eos_re = /#{indent}#{Regexp.escape eos}(\r*\n|\z)/
178
- err_msg = "can't match #{eos_re.inspect} anywhere in "
179
-
180
- rb_compile_error err_msg if end_of_stream?
181
-
182
- if beginning_of_line? && scan(eos_re) then
183
- self.lineno += 1
184
- ss.unread_many last_line # TODO: figure out how to remove this
185
- return :tSTRING_END, eos
186
- end
187
-
188
- self.string_buffer = []
189
-
190
- if expand then
191
- case
192
- when scan(/#[$@]/) then
193
- ss.pos -= 1 # FIX omg stupid
194
- return :tSTRING_DVAR, matched
195
- when scan(/#[{]/) then
196
- return :tSTRING_DBEG, matched
197
- when scan(/#/) then
198
- string_buffer << '#'
199
- end
200
-
201
- begin
202
- c = tokadd_string func, "\n", nil
203
-
204
- rb_compile_error err_msg if
205
- c == RubyLexer::EOF
206
-
207
- if c != "\n" then
208
- return :tSTRING_CONTENT, string_buffer.join.delete("\r")
209
- else
210
- string_buffer << scan(/\n/)
211
- end
212
-
213
- rb_compile_error err_msg if end_of_stream?
214
- end until check(eos_re)
215
- else
216
- until check(eos_re) do
217
- string_buffer << scan(/.*(\n|\z)/)
218
- rb_compile_error err_msg if end_of_stream?
219
- end
220
- end
221
-
222
- self.lex_strterm = [:heredoc, eos, func, last_line]
223
-
224
- string_content = string_buffer.join.delete("\r")
225
-
226
- string_content = heredoc_dedent(string_content) if content_indent && ruby23plus?
227
-
228
- return :tSTRING_CONTENT, string_content
229
- end
230
-
231
- def heredoc_dedent(string_content)
232
- width = string_content.scan(/^[ \t]*(?=\S)/).map do |whitespace|
233
- heredoc_whitespace_indent_size whitespace
234
- end.min || 0
235
-
236
- string_content.split("\n", -1).map do |line|
237
- dedent_string line, width
238
- end.join "\n"
239
- end
240
-
241
- def dedent_string(string, width)
242
- characters_skipped = 0
243
- indentation_skipped = 0
244
-
245
- string.chars.each do |char|
246
- break if indentation_skipped >= width
247
- if char == ' '
248
- characters_skipped += 1
249
- indentation_skipped += 1
250
- elsif char == "\t"
251
- proposed = TAB_WIDTH * (indentation_skipped / TAB_WIDTH + 1)
252
- break if (proposed > width)
253
- characters_skipped += 1
254
- indentation_skipped = proposed
255
- end
256
- end
257
- string[characters_skipped..-1]
258
- end
259
-
260
- def heredoc_whitespace_indent_size(whitespace)
261
- whitespace.chars.inject 0 do |size, char|
262
- if char == "\t"
263
- size + TAB_WIDTH
264
- else
265
- size + 1
266
- end
267
- end
268
- end
269
-
270
- def heredoc_identifier # TODO: remove / rewrite
271
- term, func = nil, STR_FUNC_BORING
272
- self.string_buffer = []
273
-
274
- heredoc_indent_mods = '-'
275
- heredoc_indent_mods += '\~' if ruby23plus?
276
-
277
- case
278
- when scan(/([#{heredoc_indent_mods}]?)([\'\"\`])(.*?)\2/) then
279
- term = ss[2]
280
- func |= STR_FUNC_INDENT unless ss[1].empty?
281
- func |= STR_FUNC_ICNTNT if ss[1] == '~'
282
- func |= case term
283
- when "\'" then
284
- STR_SQUOTE
285
- when '"' then
286
- STR_DQUOTE
287
- else
288
- STR_XQUOTE
289
- end
290
- string_buffer << ss[3]
291
- when scan(/[#{heredoc_indent_mods}]?([\'\"\`])(?!\1*\Z)/) then
292
- rb_compile_error "unterminated here document identifier"
293
- when scan(/([#{heredoc_indent_mods}]?)(#{IDENT_CHAR}+)/) then
294
- term = '"'
295
- func |= STR_DQUOTE
296
- unless ss[1].empty? then
297
- func |= STR_FUNC_INDENT
298
- func |= STR_FUNC_ICNTNT if ss[1] == '~'
299
- end
300
- string_buffer << ss[2]
301
- else
302
- return nil
303
- end
304
-
305
- if scan(/.*\n/) then
306
- # TODO: think about storing off the char range instead
307
- line = matched
308
- else
309
- line = nil
310
- end
311
-
312
- self.lex_strterm = [:heredoc, string_buffer.join, func, line]
313
-
314
- if term == '`' then
315
- result nil, :tXSTRING_BEG, "`"
316
- else
317
- result nil, :tSTRING_BEG, "\""
318
- end
319
- end
320
-
321
- def in_fname?
322
- in_lex_state? :expr_fname
323
- end
324
-
325
- def in_arg_state? # TODO: rename is_after_operator?
326
- in_lex_state? :expr_fname, :expr_dot
327
- end
328
-
329
- def in_lex_state?(*states)
330
- states.include? lex_state
331
- end
332
-
333
- def int_with_base base
334
- rb_compile_error "Invalid numeric format" if matched =~ /__/
335
-
336
- text = matched
337
- case
338
- when text.end_with?('ri')
339
- return result(:expr_end, :tIMAGINARY, Complex(0, Rational(text.chop.chop.to_i(base))))
340
- when text.end_with?('r')
341
- return result(:expr_end, :tRATIONAL, Rational(text.chop.to_i(base)))
342
- when text.end_with?('i')
343
- return result(:expr_end, :tIMAGINARY, Complex(0, text.chop.to_i(base)))
344
- else
345
- return result(:expr_end, :tINTEGER, text.to_i(base))
346
- end
347
- end
348
-
349
- def is_arg?
350
- in_lex_state?(*EXPR_ARG_ANY)
351
- end
352
-
353
- def is_beg?
354
- # TODO: in_lex_state?(*EXPR_BEG_ANY) || lex_state == [:expr_arg, :expr_labeled]
355
- in_lex_state?(*EXPR_BEG_ANY, :expr_value, :expr_labeled)
356
- end
357
-
358
- def is_end?
359
- in_lex_state?(*EXPR_END_ANY)
360
- end
361
-
362
- def lvar_defined? id
363
- # TODO: (dyna_in_block? && dvar_defined?(id)) || local_id?(id)
364
- self.parser.env[id.to_sym] == :lvar
365
- end
366
-
367
-
368
- def ruby22_label?
369
- ruby22plus? and is_label_possible?
370
- end
371
-
372
- def is_label_possible?
373
- (in_lex_state?(:expr_beg, :expr_endfn) && !cmd_state) || is_arg?
374
- end
375
-
376
- def is_label_suffix?
377
- check(/:(?!:)/)
378
- end
379
-
380
- def is_space_arg? c = "x"
381
- is_arg? and space_seen and c !~ /\s/
382
- end
383
-
384
- def lambda_beginning?
385
- lpar_beg && lpar_beg == paren_nest
386
- end
387
-
388
- def matched
389
- ss.matched
390
- end
391
-
392
- def not_end?
393
- not is_end?
394
- end
395
-
396
- def process_amper text
397
- token = if is_arg? && space_seen && !check(/\s/) then
398
- warning("`&' interpreted as argument prefix")
399
- :tAMPER
400
- elsif in_lex_state? :expr_beg, :expr_mid then
401
- :tAMPER
402
- else
403
- :tAMPER2
404
- end
405
-
406
- return result(:arg_state, token, "&")
407
- end
408
-
409
- def process_backref text
410
- token = ss[1].to_sym
411
- # TODO: can't do lineno hack w/ symbol
412
- result :expr_end, :tBACK_REF, token
413
- end
414
-
415
- def process_begin text
416
- @comments << matched
417
-
418
- unless scan(/.*?\n=end( |\t|\f)*[^\n]*(\n|\z)/m) then
419
- @comments.clear
420
- rb_compile_error("embedded document meets end of file")
421
- end
422
-
423
- @comments << matched
424
- self.lineno += matched.count("\n")
425
-
426
- nil # TODO
427
- end
428
-
429
- def process_brace_close text
430
- # matching compare/parse23.y:8561
431
- cond.lexpop
432
- cmdarg.lexpop
433
-
434
- case matched
435
- when "}" then
436
- self.brace_nest -= 1
437
- self.lex_state = :expr_endarg # TODO: :expr_end ? Look at 2.6
438
-
439
- return :tSTRING_DEND, matched if brace_nest < 0 unless ruby18 || ruby19
440
- return :tRCURLY, matched
441
- when "]" then
442
- self.paren_nest -= 1
443
- self.lex_state = :expr_endarg
444
- return :tRBRACK, matched
445
- when ")" then
446
- self.paren_nest -= 1
447
- self.lex_state = :expr_endfn
448
- return :tRPAREN, matched
449
- else
450
- raise "Unknown bracing: #{matched.inspect}"
451
- end
452
- end
453
-
454
- def process_colon1 text
455
- # ?: / then / when
456
- if is_end? || check(/\s/) then
457
- return result :expr_beg, :tCOLON, text
458
- end
459
-
460
- case
461
- when scan(/\'/) then
462
- string STR_SSYM
463
- when scan(/\"/) then
464
- string STR_DSYM
465
- end
466
-
467
- result :expr_fname, :tSYMBEG, text
468
- end
469
-
470
- def process_colon2 text
471
- if is_beg? || in_lex_state?(:expr_class) || is_space_arg? then
472
- result :expr_beg, :tCOLON3, text
473
- else
474
- result :expr_dot, :tCOLON2, text
475
- end
476
- end
477
-
478
- def process_brace_open text
479
- # matching compare/parse23.y:8694
480
- self.brace_nest += 1
481
-
482
- if lambda_beginning? then
483
- self.lpar_beg = nil
484
- self.paren_nest -= 1 # close arg list when lambda opens body
485
-
486
- return expr_result(:tLAMBEG, "{")
487
- end
488
-
489
- token = case lex_state
490
- when :expr_labeled then
491
- :tLBRACE # hash
492
- when *EXPR_ARG_ANY, :expr_end, :expr_endfn then
493
- :tLCURLY # block (primary)
494
- when :expr_endarg
495
- :tLBRACE_ARG # block (expr)
496
- else
497
- :tLBRACE # hash
498
- end
499
-
500
- # TODO: self.lex_state |= :expr_label if token != :tLBRACE_ARG
501
- self.command_start = true if token != :tLBRACE
502
-
503
- return expr_result(token, "{")
504
- end
505
-
506
- def process_float text
507
- rb_compile_error "Invalid numeric format" if text =~ /__/
508
-
509
- case
510
- when text.end_with?('ri')
511
- return result(:expr_end, :tIMAGINARY, Complex(0, Rational(text.chop.chop)))
512
- when text.end_with?('r')
513
- return result(:expr_end, :tRATIONAL, Rational(text.chop))
514
- when text.end_with?('i')
515
- return result(:expr_end, :tIMAGINARY, Complex(0, text.chop.to_f))
516
- else
517
- return result(:expr_end, :tFLOAT, text.to_f)
518
- end
519
- end
520
-
521
- def process_gvar text
522
- text.lineno = self.lineno
523
- result(:expr_end, :tGVAR, text)
524
- end
525
-
526
- def process_gvar_oddity text
527
- return result :expr_end, "$", "$" if text == "$" # TODO: wtf is this?
528
- rb_compile_error "#{text.inspect} is not allowed as a global variable name"
529
- end
530
-
531
- def process_ivar text
532
- tok_id = text =~ /^@@/ ? :tCVAR : :tIVAR
533
- text.lineno = self.lineno
534
- return result(:expr_end, tok_id, text)
535
- end
536
-
537
- def process_lchevron text
538
- if (!in_lex_state?(:expr_dot, :expr_class) &&
539
- !is_end? &&
540
- (!is_arg? || space_seen)) then # TODO: || in_state(:expr_labeled)
541
- tok = self.heredoc_identifier
542
- return tok if tok
543
- end
544
-
545
- if in_arg_state? then
546
- self.lex_state = :expr_arg
547
- else
548
- self.command_start = true if lex_state == :expr_class
549
- self.lex_state = :expr_beg
550
- end
551
-
552
- return result(lex_state, :tLSHFT, "\<\<")
553
- end
554
-
555
- def process_newline_or_comment text
556
- c = matched
557
- hit = false
558
-
559
- if c == '#' then
560
- ss.pos -= 1
561
-
562
- # TODO: handle magic comments
563
- while scan(/\s*\#.*(\n+|\z)/) do
564
- hit = true
565
- self.lineno += matched.lines.to_a.size
566
- @comments << matched.gsub(/^ +#/, '#').gsub(/^ +$/, '')
567
- end
568
-
569
- return nil if end_of_stream?
570
- end
571
-
572
- self.lineno += 1 unless hit
573
-
574
- # Replace a string of newlines with a single one
575
- self.lineno += matched.lines.to_a.size if scan(/\n+/)
576
-
577
- # TODO: remove :expr_value -- audit all uses of it
578
- c = in_lex_state?(:expr_beg, :expr_value, :expr_class,
579
- :expr_fname, :expr_dot) && !in_lex_state?(:expr_labeled)
580
-
581
- # TODO: figure out what token_seen is for
582
- # TODO: if c || self.lex_state == [:expr_beg, :expr_labeled] then
583
- if c || self.lex_state == :expr_labeled then
584
- # ignore if !fallthrough?
585
- if !c && parser.in_kwarg then
586
- # normal newline
587
- return result(:expr_beg, :tNL, nil)
588
- else
589
- return # skip
590
- end
591
- end
592
-
593
- if scan(/([\ \t\r\f\v]*)(\.|&)/) then
594
- self.space_seen = true unless ss[1].empty?
595
-
596
- ss.pos -= 1
597
- return unless check(/\.\./)
598
- end
599
-
600
- self.command_start = true
601
-
602
- return result(:expr_beg, :tNL, nil)
603
- end
604
-
605
- def process_nthref text
606
- # TODO: can't do lineno hack w/ number
607
- result :expr_end, :tNTH_REF, ss[1].to_i
608
- end
609
-
610
- def process_paren text
611
- token = if ruby18 then
612
- process_paren18
613
- else
614
- process_paren19
615
- end
616
-
617
- self.paren_nest += 1
618
-
619
- # TODO: add :expr_label to :expr_beg (set in expr_result below)
620
- return expr_result(token, "(")
621
- end
622
-
623
- def process_paren18
624
- self.command_start = true
625
- token = :tLPAREN2
626
-
627
- if in_lex_state? :expr_beg, :expr_mid then
628
- token = :tLPAREN
629
- elsif space_seen then
630
- if in_lex_state? :expr_cmdarg then
631
- token = :tLPAREN_ARG
632
- elsif in_lex_state? :expr_arg then
633
- warning "don't put space before argument parentheses"
634
- end
635
- else
636
- # not a ternary -- do nothing?
637
- end
638
-
639
- token
640
- end
641
-
642
- def process_paren19
643
- if is_beg? then
644
- :tLPAREN
645
- elsif is_space_arg? then
646
- :tLPAREN_ARG
647
- else
648
- :tLPAREN2 # plain '(' in parse.y
649
- end
650
- end
651
-
652
- def process_percent text
653
- return parse_quote if is_beg?
654
-
655
- return result(:expr_beg, :tOP_ASGN, "%") if scan(/\=/)
656
-
657
- return parse_quote if is_arg? && space_seen && ! check(/\s/)
658
-
659
- return result(:arg_state, :tPERCENT, "%")
660
- end
661
-
662
- def process_plus_minus text
663
- sign = matched
664
- utype, type = if sign == "+" then
665
- [:tUPLUS, :tPLUS]
666
- else
667
- [:tUMINUS, :tMINUS]
668
- end
669
-
670
- if in_arg_state? then
671
- if scan(/@/) then
672
- return result(:expr_arg, utype, "#{sign}@")
673
- else
674
- return result(:expr_arg, type, sign)
675
- end
676
- end
677
-
678
- return result(:expr_beg, :tOP_ASGN, sign) if scan(/\=/)
679
-
680
- if (is_beg? || (is_arg? && space_seen && !check(/\s/))) then
681
- arg_ambiguous if is_arg?
682
-
683
- if check(/\d/) then
684
- return nil if utype == :tUPLUS
685
- return result(:expr_beg, :tUMINUS_NUM, sign)
686
- end
687
-
688
- return result(:expr_beg, utype, sign)
689
- end
690
-
691
- return result(:expr_beg, type, sign)
692
- end
693
-
694
- def process_questionmark text
695
- if is_end? then
696
- state = ruby18 ? :expr_beg : :expr_value # HACK?
697
- return result(state, :tEH, "?")
698
- end
699
-
700
- if end_of_stream? then
701
- rb_compile_error "incomplete character syntax: parsed #{text.inspect}"
702
- end
703
-
704
- if check(/\s|\v/) then
705
- unless is_arg? then
706
- c2 = { " " => 's',
707
- "\n" => 'n',
708
- "\t" => 't',
709
- "\v" => 'v',
710
- "\r" => 'r',
711
- "\f" => 'f' }[matched]
712
-
713
- if c2 then
714
- warning("invalid character syntax; use ?\\" + c2)
715
- end
716
- end
717
-
718
- # ternary
719
- state = ruby18 ? :expr_beg : :expr_value # HACK?
720
- return result(state, :tEH, "?")
721
- elsif check(/\w(?=\w)/) then # ternary, also
722
- return result(:expr_beg, :tEH, "?")
723
- end
724
-
725
- c = if scan(/\\/) then
726
- self.read_escape
727
- else
728
- ss.getch
729
- end
730
-
731
- if version == 18 then
732
- return result(:expr_end, :tINTEGER, c[0].ord & 0xff)
733
- else
734
- return result(:expr_end, :tSTRING, c)
735
- end
736
- end
737
-
738
- def process_slash text
739
- if is_beg? then
740
- string STR_REGEXP
741
-
742
- return result(nil, :tREGEXP_BEG, "/")
743
- end
744
-
745
- if scan(/\=/) then
746
- return result(:expr_beg, :tOP_ASGN, "/")
747
- end
748
-
749
- if is_arg? && space_seen then
750
- unless scan(/\s/) then
751
- arg_ambiguous
752
- string STR_REGEXP, "/"
753
- return result(nil, :tREGEXP_BEG, "/")
754
- end
755
- end
756
-
757
- return result(:arg_state, :tDIVIDE, "/")
758
- end
759
-
760
- def process_square_bracket text
761
- self.paren_nest += 1
762
-
763
- token = nil
764
-
765
- if in_arg_state? then
766
- case
767
- when scan(/\]\=/) then
768
- self.paren_nest -= 1 # HACK? I dunno, or bug in MRI
769
- return result(:expr_arg, :tASET, "[]=")
770
- when scan(/\]/) then
771
- self.paren_nest -= 1 # HACK? I dunno, or bug in MRI
772
- return result(:expr_arg, :tAREF, "[]")
773
- else
774
- rb_compile_error "unexpected '['"
775
- end
776
- elsif is_beg? then
777
- token = :tLBRACK
778
- elsif is_arg? && space_seen then
779
- token = :tLBRACK
780
- else
781
- token = :tLBRACK2
782
- end
783
-
784
- # TODO: this is done by expr_result except "|EXPR_LABEL")
785
- # SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
786
- expr_result token, "["
787
- end
788
-
789
- def possibly_escape_string text, check
790
- content = match[1]
791
-
792
- if text =~ check then
793
- content.gsub(ESC) { unescape $1 }
794
- else
795
- content.gsub(/\\\\/, "\\").gsub(/\\'/, "'")
796
- end
797
- end
798
-
799
- def process_symbol text
800
- symbol = possibly_escape_string text, /^:"/
801
-
802
- rb_compile_error "symbol cannot contain '\\0'" if
803
- ruby18 && symbol =~ /\0/
804
-
805
- return result(:expr_end, :tSYMBOL, symbol)
806
- end
807
-
808
- def was_label?
809
- @was_label = ruby22_label?
810
- true
811
- end
812
-
813
- def process_label_or_string text
814
- if @was_label && text =~ /:\Z/ then
815
- @was_label = nil
816
- return process_label text
817
- elsif text =~ /:\Z/ then
818
- ss.pos -= 1 # put back ":"
819
- text = text[0..-2]
820
- end
821
-
822
- result :expr_end, :tSTRING, text[1..-2].gsub(/\\\\/, "\\").gsub(/\\'/, "'")
823
- end
824
-
825
- def process_label text
826
- symbol = possibly_escape_string text, /^"/
827
-
828
- result(:expr_labeled, :tLABEL, [symbol, self.lineno]) # TODO: expr_arg|expr_labeled
829
- end
830
-
831
- def process_token text
832
- # matching: parse_ident in compare/parse23.y:7989
833
- # TODO: make this always return [token, lineno]
834
- self.last_state = lex_state
835
-
836
- token = self.token = text
837
- token << matched if scan(/[\!\?](?!=)/)
838
-
839
- tok_id =
840
- case
841
- when token =~ /[!?]$/ then
842
- :tFID
843
- when in_lex_state?(:expr_fname) && scan(/=(?:(?![~>=])|(?==>))/) then
844
- # ident=, not =~ => == or followed by =>
845
- # TODO test lexing of a=>b vs a==>b
846
- token << matched
847
- :tIDENTIFIER
848
- when token =~ /^[A-Z]/ then
849
- :tCONSTANT
850
- else
851
- :tIDENTIFIER
852
- end
853
-
854
- if !ruby18 and is_label_possible? and is_label_suffix? then
855
- scan(/:/)
856
- # TODO: :expr_arg|:expr_labeled
857
- return result :expr_labeled, :tLABEL, [token, self.lineno]
858
- end
859
-
860
- # TODO: mb == ENC_CODERANGE_7BIT && !in_lex_state?(:expr_dot)
861
- unless in_lex_state? :expr_dot then
862
- # See if it is a reserved word.
863
- keyword = if ruby18 then # REFACTOR need 18/19 lexer subclasses
864
- RubyParser::Legacy::RubyParserStuff::Keyword.keyword18 token
865
- else
866
- RubyParser::Legacy::RubyParserStuff::Keyword.keyword19 token
867
- end
868
-
869
- return process_token_keyword keyword if keyword
870
- end # unless in_lex_state? :expr_dot
871
-
872
- # matching: compare/parse23.y:8079
873
- state = if is_beg? or is_arg? or in_lex_state? :expr_dot then
874
- cmd_state ? :expr_cmdarg : :expr_arg
875
- elsif not ruby18 and in_lex_state? :expr_fname then
876
- :expr_endfn
877
- else
878
- :expr_end
879
- end
880
-
881
- if not [:expr_dot, :expr_fname].include? last_state and
882
- (tok_id == :tIDENTIFIER) and # not :expr_fname, not attrasgn
883
- lvar_defined?(token) then
884
- state = :expr_end # TODO: EXPR_END|EXPR_LABEL
885
- end
886
-
887
- token.lineno = self.lineno # yes, on a string. I know... I know...
888
-
889
- return result(state, tok_id, token)
890
- end
891
-
892
- def process_token_keyword keyword
893
- # matching MIDDLE of parse_ident in compare/parse23.y:8046
894
- state = lex_state
895
- self.lex_state = keyword.state
896
-
897
- value = [token, self.lineno]
898
-
899
- return result(lex_state, keyword.id0, value) if state == :expr_fname
900
-
901
- self.command_start = true if lex_state == :expr_beg
902
-
903
- case
904
- when keyword.id0 == :kDO then
905
- case
906
- when lambda_beginning? then
907
- self.lpar_beg = nil # lambda_beginning? == FALSE in the body of "-> do ... end"
908
- self.paren_nest -= 1
909
- result(lex_state, :kDO_LAMBDA, value)
910
- when cond.is_in_state then
911
- result(lex_state, :kDO_COND, value)
912
- when cmdarg.is_in_state && state != :expr_cmdarg then
913
- result(lex_state, :kDO_BLOCK, value)
914
- when [:expr_beg, :expr_endarg].include?(state) then
915
- result(lex_state, :kDO_BLOCK, value)
916
- else
917
- result(lex_state, :kDO, value)
918
- end
919
- when [:expr_beg, :expr_labeled].include?(state) then
920
- result(lex_state, keyword.id0, value)
921
- when keyword.id0 != keyword.id1 then
922
- result(:expr_beg, keyword.id1, value) # TODO: :expr_beg|:expr_label
923
- else
924
- result(lex_state, keyword.id1, value)
925
- end
926
- end
927
-
928
- def process_underscore text
929
- ss.unscan # put back "_"
930
-
931
- if beginning_of_line? && scan(/\__END__(\r?\n|\Z)/) then
932
- return [RubyLexer::EOF, RubyLexer::EOF]
933
- elsif scan(/\_\w*/) then
934
- return process_token matched
935
- end
936
- end
937
-
938
- def rb_compile_error msg
939
- msg += ". near line #{self.lineno}: #{ss.rest[/^.*/].inspect}"
940
- raise RubyParser::SyntaxError, msg
941
- end
942
-
943
- def read_escape # TODO: remove / rewrite
944
- case
945
- when scan(/\\/) then # Backslash
946
- '\\'
947
- when scan(/n/) then # newline
948
- self.extra_lineno -= 1
949
- "\n"
950
- when scan(/t/) then # horizontal tab
951
- "\t"
952
- when scan(/r/) then # carriage-return
953
- "\r"
954
- when scan(/f/) then # form-feed
955
- "\f"
956
- when scan(/v/) then # vertical tab
957
- "\13"
958
- when scan(/a/) then # alarm(bell)
959
- "\007"
960
- when scan(/e/) then # escape
961
- "\033"
962
- when scan(/b/) then # backspace
963
- "\010"
964
- when scan(/s/) then # space
965
- " "
966
- when scan(/[0-7]{1,3}/) then # octal constant
967
- (matched.to_i(8) & 0xFF).chr
968
- when scan(/x([0-9a-fA-F]{1,2})/) then # hex constant
969
- ss[1].to_i(16).chr
970
- when check(/M-\\[\\MCc]/) then
971
- scan(/M-\\/) # eat it
972
- c = self.read_escape
973
- c[0] = (c[0].ord | 0x80).chr
974
- c
975
- when scan(/M-(.)/) then
976
- c = ss[1]
977
- c[0] = (c[0].ord | 0x80).chr
978
- c
979
- when check(/(C-|c)\\[\\MCc]/) then
980
- scan(/(C-|c)\\/) # eat it
981
- c = self.read_escape
982
- c[0] = (c[0].ord & 0x9f).chr
983
- c
984
- when scan(/C-\?|c\?/) then
985
- 127.chr
986
- when scan(/(C-|c)(.)/) then
987
- c = ss[2]
988
- c[0] = (c[0].ord & 0x9f).chr
989
- c
990
- when scan(/^[89]/i) then # bad octal or hex... MRI ignores them :(
991
- matched
992
- when scan(/u([0-9a-fA-F]{2,4}|\{[0-9a-fA-F]{2,6}\})/) then
993
- [ss[1].delete("{}").to_i(16)].pack("U")
994
- when scan(/[McCx0-9]/) || end_of_stream? then
995
- rb_compile_error("Invalid escape character syntax")
996
- else
997
- ss.getch
998
- end.dup
999
- end
1000
-
1001
- def regx_options # TODO: rewrite / remove
1002
- good, bad = [], []
1003
-
1004
- if scan(/[a-z]+/) then
1005
- good, bad = matched.split(//).partition { |s| s =~ /^[ixmonesu]$/ }
1006
- end
1007
-
1008
- unless bad.empty? then
1009
- rb_compile_error("unknown regexp option%s - %s" %
1010
- [(bad.size > 1 ? "s" : ""), bad.join.inspect])
1011
- end
1012
-
1013
- return good.join
1014
- end
1015
-
1016
- def reset
1017
- self.brace_nest = 0
1018
- self.command_start = true
1019
- self.comments = []
1020
- self.lex_state = :expr_none
1021
- self.lex_strterm = nil
1022
- self.lineno = 1
1023
- self.lpar_beg = nil
1024
- self.paren_nest = 0
1025
- self.space_seen = false
1026
- self.string_nest = 0
1027
- self.token = nil
1028
- self.extra_lineno = 0
1029
-
1030
- self.cond.reset
1031
- self.cmdarg.reset
1032
- end
1033
-
1034
- def result lex_state, token, text # :nodoc:
1035
- lex_state = self.arg_state if lex_state == :arg_state
1036
- self.lex_state = lex_state if lex_state
1037
- [token, text]
1038
- end
1039
-
1040
- def ruby18
1041
- RubyParser::V18 === parser
1042
- end
1043
-
1044
- def ruby19
1045
- RubyParser::V19 === parser
1046
- end
1047
-
1048
- def scan re
1049
- ss.scan re
1050
- end
1051
-
1052
- def check re
1053
- ss.check re
1054
- end
1055
-
1056
- def eat_whitespace
1057
- r = scan(/\s+/)
1058
- self.extra_lineno += r.count("\n") if r
1059
- r
1060
- end
1061
-
1062
- def fixup_lineno extra = 0
1063
- self.lineno += self.extra_lineno + extra
1064
- self.extra_lineno = 0
1065
- end
1066
-
1067
- def scanner_class # TODO: design this out of oedipus_lex. or something.
1068
- RPStringScanner
1069
- end
1070
-
1071
- def space_vs_beginning space_type, beg_type, fallback
1072
- if is_space_arg? check(/./m) then
1073
- warning "`**' interpreted as argument prefix"
1074
- space_type
1075
- elsif is_beg? then
1076
- beg_type
1077
- else
1078
- # TODO: warn_balanced("**", "argument prefix");
1079
- fallback
1080
- end
1081
- end
1082
-
1083
- def string type, beg = matched, nnd = "\0"
1084
- self.lex_strterm = [:strterm, type, beg, nnd]
1085
- end
1086
-
1087
- # TODO: consider
1088
- # def src= src
1089
- # raise "bad src: #{src.inspect}" unless String === src
1090
- # @src = RPStringScanner.new(src)
1091
- # end
1092
-
1093
- def tokadd_escape term # TODO: rewrite / remove
1094
- case
1095
- when scan(/\\\n/) then
1096
- # just ignore
1097
- when scan(/\\([0-7]{1,3}|x[0-9a-fA-F]{1,2})/) then
1098
- self.string_buffer << matched
1099
- when scan(/\\([MC]-|c)(?=\\)/) then
1100
- self.string_buffer << matched
1101
- self.tokadd_escape term
1102
- when scan(/\\([MC]-|c)(.)/) then
1103
- self.string_buffer << matched
1104
- when scan(/\\[McCx]/) then
1105
- rb_compile_error "Invalid escape character syntax"
1106
- when scan(/\\(.)/m) then
1107
- chr = ss[1]
1108
- prev = self.string_buffer.last
1109
- if term == chr && prev && prev.end_with?("(?") then
1110
- self.string_buffer << chr
1111
- else
1112
- self.string_buffer << matched
1113
- end
1114
- else
1115
- rb_compile_error "Invalid escape character syntax"
1116
- end
1117
- end
1118
-
1119
- def tokadd_string(func, term, paren) # TODO: rewrite / remove
1120
- qwords = (func & STR_FUNC_QWORDS) != 0
1121
- escape = (func & STR_FUNC_ESCAPE) != 0
1122
- expand = (func & STR_FUNC_EXPAND) != 0
1123
- regexp = (func & STR_FUNC_REGEXP) != 0
1124
- symbol = (func & STR_FUNC_SYMBOL) != 0
1125
-
1126
- paren_re = @@regexp_cache[paren]
1127
- term_re = @@regexp_cache[term]
1128
-
1129
- until end_of_stream? do
1130
- c = nil
1131
- handled = true
1132
-
1133
- case
1134
- when paren_re && scan(paren_re) then
1135
- self.string_nest += 1
1136
- when scan(term_re) then
1137
- if self.string_nest == 0 then
1138
- ss.pos -= 1
1139
- break
1140
- else
1141
- self.string_nest -= 1
1142
- end
1143
- when expand && scan(/#(?=[\$\@\{])/) then
1144
- ss.pos -= 1
1145
- break
1146
- when qwords && scan(/\s/) then
1147
- ss.pos -= 1
1148
- break
1149
- when expand && scan(/#(?!\n)/) then
1150
- # do nothing
1151
- when check(/\\/) then
1152
- case
1153
- when qwords && scan(/\\\n/) then
1154
- string_buffer << "\n"
1155
- next
1156
- when qwords && scan(/\\\s/) then
1157
- c = ' '
1158
- when expand && scan(/\\\n/) then
1159
- next
1160
- when regexp && check(/\\/) then
1161
- self.tokadd_escape term
1162
- next
1163
- when expand && scan(/\\/) then
1164
- c = self.read_escape
1165
- when scan(/\\\n/) then
1166
- # do nothing
1167
- when scan(/\\\\/) then
1168
- string_buffer << '\\' if escape
1169
- c = '\\'
1170
- when scan(/\\/) then
1171
- unless scan(term_re) || paren.nil? || scan(paren_re) then
1172
- string_buffer << "\\"
1173
- end
1174
- else
1175
- handled = false
1176
- end # inner /\\/ case
1177
- else
1178
- handled = false
1179
- end # top case
1180
-
1181
- unless handled then
1182
- t = Regexp.escape term
1183
- x = Regexp.escape(paren) if paren && paren != "\000"
1184
- re = if qwords then
1185
- if HAS_ENC then
1186
- /[^#{t}#{x}\#\0\\\s]+|./ # |. to pick up whatever
1187
- else
1188
- /[^#{t}#{x}\#\0\\\s\v]+|./ # argh. 1.8's \s doesn't pick up \v
1189
- end
1190
- else
1191
- /[^#{t}#{x}\#\0\\]+|./
1192
- end
1193
-
1194
- scan re
1195
- c = matched
1196
-
1197
- rb_compile_error "symbol cannot contain '\\0'" if symbol && c =~ /\0/
1198
- end # unless handled
1199
-
1200
- c ||= matched
1201
- string_buffer << c
1202
- end # until
1203
-
1204
- c ||= matched
1205
- c = RubyLexer::EOF if end_of_stream?
1206
-
1207
- return c
1208
- end
1209
-
1210
- def unescape s
1211
- r = ESCAPES[s]
1212
-
1213
- self.extra_lineno += 1 if s == "\n" # eg backslash newline strings
1214
- self.extra_lineno -= 1 if r && s == "n" # literal \n, not newline
1215
-
1216
- return r if r
1217
-
1218
- x = case s
1219
- when /^[0-7]{1,3}/ then
1220
- ($&.to_i(8) & 0xFF).chr
1221
- when /^x([0-9a-fA-F]{1,2})/ then
1222
- $1.to_i(16).chr
1223
- when /^M-(.)/ then
1224
- ($1[0].ord | 0x80).chr
1225
- when /^(C-|c)(.)/ then
1226
- ($2[0].ord & 0x9f).chr
1227
- when /^[89a-f]/i then # bad octal or hex... ignore? that's what MRI does :(
1228
- s
1229
- when /^[McCx0-9]/ then
1230
- rb_compile_error("Invalid escape character syntax")
1231
- when /u([0-9a-fA-F]{2,4}|\{[0-9a-fA-F]{2,6}\})/ then
1232
- [$1.delete("{}").to_i(16)].pack("U")
1233
- else
1234
- s
1235
- end
1236
- x.force_encoding "UTF-8" if HAS_ENC
1237
- x
1238
- end
1239
-
1240
- def warning s
1241
- # do nothing for now
1242
- end
1243
-
1244
- def ruby22plus?
1245
- parser.class.version >= 22
1246
- end
1247
-
1248
- def ruby23plus?
1249
- parser.class.version >= 23
1250
- end
1251
-
1252
- def process_string # TODO: rewrite / remove
1253
- # matches top of parser_yylex in compare/parse23.y:8113
1254
- token = if lex_strterm[0] == :heredoc then
1255
- self.heredoc lex_strterm
1256
- else
1257
- self.parse_string lex_strterm
1258
- end
1259
-
1260
- token_type, c = token
1261
-
1262
- # matches parser_string_term
1263
- if ruby22plus? && token_type == :tSTRING_END && ["'", '"'].include?(c) then
1264
- if (([:expr_beg, :expr_endfn].include?(lex_state) &&
1265
- !cond.is_in_state) || is_arg?) &&
1266
- is_label_suffix? then
1267
- scan(/:/)
1268
- token_type = token[0] = :tLABEL_END
1269
- end
1270
- end
1271
-
1272
- if [:tSTRING_END, :tREGEXP_END, :tLABEL_END].include? token_type then
1273
- self.lex_strterm = nil
1274
- # TODO: :expr_beg|:expr_label
1275
- self.lex_state = (token_type == :tLABEL_END) ? :expr_label : :expr_end
1276
- end
1277
-
1278
- return token
1279
- end
1280
-
1281
- def parse_quote # TODO: remove / rewrite
1282
- beg, nnd, short_hand, c = nil, nil, false, nil
1283
-
1284
- if scan(/[a-z0-9]{1,2}/i) then # Long-hand (e.g. %Q{}).
1285
- rb_compile_error "unknown type of %string" if ss.matched_size == 2
1286
- c, beg, short_hand = matched, ss.getch, false
1287
- else # Short-hand (e.g. %{, %., %!, etc)
1288
- c, beg, short_hand = 'Q', ss.getch, true
1289
- end
1290
-
1291
- if end_of_stream? or c == RubyLexer::EOF or beg == RubyLexer::EOF then
1292
- rb_compile_error "unterminated quoted string meets end of file"
1293
- end
1294
-
1295
- # Figure nnd-char. "\0" is special to indicate beg=nnd and that no nesting?
1296
- nnd = { "(" => ")", "[" => "]", "{" => "}", "<" => ">" }[beg]
1297
- nnd, beg = beg, "\0" if nnd.nil?
1298
-
1299
- token_type, text = nil, "%#{c}#{beg}"
1300
- token_type, string_type = case c
1301
- when 'Q' then
1302
- ch = short_hand ? nnd : c + beg
1303
- text = "%#{ch}"
1304
- [:tSTRING_BEG, STR_DQUOTE]
1305
- when 'q' then
1306
- [:tSTRING_BEG, STR_SQUOTE]
1307
- when 'W' then
1308
- eat_whitespace
1309
- [:tWORDS_BEG, STR_DQUOTE | STR_FUNC_QWORDS]
1310
- when 'w' then
1311
- eat_whitespace
1312
- [:tQWORDS_BEG, STR_SQUOTE | STR_FUNC_QWORDS]
1313
- when 'x' then
1314
- [:tXSTRING_BEG, STR_XQUOTE]
1315
- when 'r' then
1316
- [:tREGEXP_BEG, STR_REGEXP]
1317
- when 's' then
1318
- self.lex_state = :expr_fname
1319
- [:tSYMBEG, STR_SSYM]
1320
- when 'I' then
1321
- eat_whitespace
1322
- [:tSYMBOLS_BEG, STR_DQUOTE | STR_FUNC_QWORDS]
1323
- when 'i' then
1324
- eat_whitespace
1325
- [:tQSYMBOLS_BEG, STR_SQUOTE | STR_FUNC_QWORDS]
1326
- end
1327
-
1328
- rb_compile_error "Bad %string type. Expected [QqWwIixrs], found '#{c}'." if
1329
- token_type.nil?
1330
-
1331
- raise "huh" unless string_type
1332
-
1333
- string string_type, nnd, beg
1334
-
1335
- return token_type, text
1336
- end
1337
-
1338
- def parse_string quote # TODO: rewrite / remove
1339
- _, string_type, term, open = quote
1340
-
1341
- space = false # FIX: remove these
1342
- func = string_type
1343
- paren = open
1344
- term_re = @@regexp_cache[term]
1345
-
1346
- qwords = (func & STR_FUNC_QWORDS) != 0
1347
- regexp = (func & STR_FUNC_REGEXP) != 0
1348
- expand = (func & STR_FUNC_EXPAND) != 0
1349
-
1350
- unless func then # nil'ed from qwords below. *sigh*
1351
- return :tSTRING_END, nil
1352
- end
1353
-
1354
- space = true if qwords and eat_whitespace
1355
-
1356
- if self.string_nest == 0 && scan(/#{term_re}/) then
1357
- if qwords then
1358
- quote[1] = nil
1359
- return :tSPACE, nil
1360
- elsif regexp then
1361
- return :tREGEXP_END, self.regx_options
1362
- else
1363
- return :tSTRING_END, term
1364
- end
1365
- end
1366
-
1367
- return :tSPACE, nil if space
1368
-
1369
- self.string_buffer = []
1370
-
1371
- if expand
1372
- case
1373
- when scan(/#(?=\$(-.|[a-zA-Z_0-9~\*\$\?!@\/\\;,\.=:<>\"\&\`\'+]))/) then
1374
- # TODO: !ISASCII
1375
- # ?! see parser_peek_variable_name
1376
- return :tSTRING_DVAR, nil
1377
- when scan(/#(?=\@\@?[a-zA-Z_])/) then
1378
- # TODO: !ISASCII
1379
- return :tSTRING_DVAR, nil
1380
- when scan(/#[{]/) then
1381
- self.command_start = true
1382
- return :tSTRING_DBEG, nil
1383
- when scan(/#/) then
1384
- string_buffer << '#'
1385
- end
1386
- end
1387
-
1388
- if tokadd_string(func, term, paren) == RubyLexer::EOF then
1389
- rb_compile_error "unterminated string meets end of file"
1390
- end
1391
-
1392
- return :tSTRING_CONTENT, string_buffer.join
1393
- end
1394
- end
1395
-
1396
- require "ruby_parser/legacy/ruby_lexer.rex"
1397
-
1398
- if ENV["RP_LINENO_DEBUG"] then
1399
- class RubyParser::Legacy::RubyLexer
1400
- alias :old_lineno= :lineno=
1401
-
1402
- def d o
1403
- $stderr.puts o.inspect
1404
- end
1405
-
1406
- def lineno= n
1407
- self.old_lineno= n
1408
- where = caller.first.split(/:/).first(2).join(":")
1409
- d :lineno => [n, where, ss && ss.rest[0,40]]
1410
- end
1411
- end
1412
- end