brakeman 4.5.1 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (597) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +347 -110
  3. data/README.md +24 -8
  4. data/bundle/load.rb +15 -13
  5. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
  6. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
  7. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/README.txt +0 -0
  8. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
  9. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
  10. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
  11. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
  12. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
  13. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
  14. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
  15. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
  16. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
  17. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
  18. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
  19. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
  20. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
  21. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
  22. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
  23. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
  24. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
  25. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
  26. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
  27. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
  28. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
  29. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
  30. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
  31. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
  32. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
  33. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
  34. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
  35. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
  36. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
  37. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/setup.rb +0 -0
  38. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/CHANGELOG.md +146 -4
  39. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/FAQ.md +4 -14
  40. data/bundle/ruby/2.7.0/gems/haml-5.2.2/Gemfile +16 -0
  41. data/bundle/ruby/2.7.0/gems/haml-5.2.2/MIT-LICENSE +20 -0
  42. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/README.md +90 -47
  43. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/REFERENCE.md +160 -74
  44. data/bundle/ruby/2.7.0/gems/haml-5.2.2/TODO +24 -0
  45. data/bundle/ruby/2.7.0/gems/haml-5.2.2/haml.gemspec +45 -0
  46. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_builder.rb +219 -0
  47. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +237 -0
  48. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_parser.rb +150 -0
  49. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/buffer.rb +182 -0
  50. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/compiler.rb +330 -0
  51. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/engine.rb +34 -41
  52. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/error.rb +65 -0
  53. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/escapable.rb +77 -0
  54. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/exec.rb +38 -20
  55. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/filters.rb +22 -27
  56. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/generator.rb +42 -0
  57. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_extensions.rb +4 -2
  58. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_mods.rb +45 -60
  59. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_xss_mods.rb +2 -0
  60. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +20 -0
  61. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/safe_erubis_template.rb +5 -1
  62. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/xss_mods.rb +23 -13
  63. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers.rb +134 -89
  64. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/options.rb +63 -69
  65. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/parser.rb +319 -227
  66. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/plugin.rb +54 -0
  67. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/railtie.rb +53 -0
  68. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/sass_rails_filter.rb +18 -4
  69. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/template/options.rb +13 -2
  70. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml/template.rb +13 -6
  71. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/temple_engine.rb +124 -0
  72. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/temple_line_counter.rb +30 -0
  73. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/util.rb +258 -0
  74. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/version.rb +5 -0
  75. data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.2}/lib/haml.rb +2 -0
  76. data/bundle/ruby/2.7.0/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +15 -0
  77. data/bundle/ruby/2.7.0/gems/haml-5.2.2/yard/default/layout/html/footer.erb +12 -0
  78. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/AUTHORS +0 -0
  79. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/COPYING +0 -0
  80. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/Changelog.md +3 -0
  81. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/Gemfile +0 -0
  82. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/LICENSE +0 -0
  83. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/README.md +0 -0
  84. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/TODO +0 -0
  85. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/appveyor.yml +0 -0
  86. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/highline.gemspec +0 -0
  87. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/builtin_styles.rb +0 -0
  88. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/color_scheme.rb +0 -0
  89. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/compatibility.rb +0 -0
  90. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/custom_errors.rb +0 -0
  91. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/import.rb +0 -0
  92. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/io_console_compatible.rb +0 -0
  93. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/list.rb +0 -0
  94. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/list_renderer.rb +0 -0
  95. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/menu/item.rb +0 -0
  96. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/menu.rb +0 -0
  97. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/paginator.rb +0 -0
  98. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/question/answer_converter.rb +0 -0
  99. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/question.rb +0 -0
  100. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/question_asker.rb +0 -0
  101. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/simulate.rb +0 -0
  102. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/statement.rb +0 -0
  103. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/string.rb +0 -0
  104. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/string_extensions.rb +0 -0
  105. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/style.rb +0 -0
  106. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/template_renderer.rb +0 -0
  107. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/terminal/io_console.rb +0 -0
  108. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/terminal/ncurses.rb +0 -0
  109. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/terminal/unix_stty.rb +0 -0
  110. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/terminal.rb +0 -0
  111. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/version.rb +1 -1
  112. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/wrapper.rb +0 -0
  113. data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline.rb +0 -0
  114. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/MIT-LICENSE.txt +20 -0
  115. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/processor_count.rb +44 -0
  116. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/version.rb +4 -0
  117. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel.rb +612 -0
  118. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/LICENSE.txt +22 -0
  119. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +178 -0
  120. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/README.md +48 -0
  121. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attlistdecl.rb +63 -0
  122. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +205 -0
  123. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +68 -0
  124. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/child.rb +97 -0
  125. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/comment.rb +80 -0
  126. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +311 -0
  127. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/document.rb +451 -0
  128. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/attlistdecl.rb +11 -0
  129. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/dtd.rb +47 -0
  130. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/elementdecl.rb +18 -0
  131. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/entitydecl.rb +57 -0
  132. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/dtd/notationdecl.rb +40 -0
  133. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/element.rb +2599 -0
  134. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +51 -0
  135. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/entity.rb +171 -0
  136. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/default.rb +116 -0
  137. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +142 -0
  138. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/transitive.rb +58 -0
  139. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/functions.rb +447 -0
  140. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +79 -0
  141. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/light/node.rb +188 -0
  142. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +59 -0
  143. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/node.rb +76 -0
  144. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/output.rb +30 -0
  145. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parent.rb +166 -0
  146. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +52 -0
  147. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +694 -0
  148. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/lightparser.rb +59 -0
  149. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +197 -0
  150. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +273 -0
  151. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +61 -0
  152. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +101 -0
  153. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/ultralightparser.rb +57 -0
  154. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +689 -0
  155. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +266 -0
  156. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +37 -0
  157. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/sax2listener.rb +98 -0
  158. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/security.rb +28 -0
  159. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +298 -0
  160. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/streamlistener.rb +93 -0
  161. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/text.rb +424 -0
  162. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/undefinednamespaceexception.rb +9 -0
  163. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +539 -0
  164. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +144 -0
  165. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validationexception.rb +10 -0
  166. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmldecl.rb +130 -0
  167. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xmltokens.rb +85 -0
  168. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +81 -0
  169. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +974 -0
  170. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml.rb +3 -0
  171. data/bundle/ruby/{2.5.0/gems/ruby2ruby-2.4.2 → 2.7.0/gems/ruby2ruby-2.4.4}/History.rdoc +19 -5
  172. data/bundle/ruby/{2.5.0/gems/ruby2ruby-2.4.2 → 2.7.0/gems/ruby2ruby-2.4.4}/Manifest.txt +0 -0
  173. data/bundle/ruby/{2.5.0/gems/ruby2ruby-2.4.2 → 2.7.0/gems/ruby2ruby-2.4.4}/README.rdoc +0 -0
  174. data/bundle/ruby/{2.5.0/gems/ruby2ruby-2.4.2 → 2.7.0/gems/ruby2ruby-2.4.4}/lib/ruby2ruby.rb +122 -112
  175. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/History.rdoc +232 -0
  176. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/Manifest.txt +9 -0
  177. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/README.rdoc +12 -9
  178. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/compare/normalize.rb +51 -6
  179. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/debugging.md +190 -0
  180. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/gauntlet.md +107 -0
  181. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/lib/rp_extensions.rb +15 -36
  182. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/rp_stringscanner.rb +33 -0
  183. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.rb +10973 -0
  184. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1/lib/ruby_parser.yy → 2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.y} +710 -609
  185. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby21_parser.rb +10980 -0
  186. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/lib/ruby21_parser.y +718 -467
  187. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.rb +11123 -0
  188. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1/lib/ruby24_parser.y → 2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.y} +723 -478
  189. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.rb +11132 -0
  190. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1/lib/ruby26_parser.y → 2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.y} +722 -487
  191. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.rb +11231 -0
  192. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.y +2721 -0
  193. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby25_parser.rb +11231 -0
  194. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/lib/ruby25_parser.y +726 -471
  195. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.rb +11253 -0
  196. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.y +2736 -0
  197. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.rb +12980 -0
  198. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.y +3324 -0
  199. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.rb +13242 -0
  200. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.y +3447 -0
  201. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.rb +13622 -0
  202. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.y +3481 -0
  203. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby3_parser.yy +3536 -0
  204. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer.rb +1144 -0
  205. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/lib/ruby_lexer.rex +33 -27
  206. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/lib/ruby_lexer.rex.rb +65 -31
  207. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer_strings.rb +638 -0
  208. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/lib/ruby_parser.rb +33 -27
  209. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser.yy +3465 -0
  210. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/lib/ruby_parser_extras.rb +949 -465
  211. data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.19.1}/tools/munge.rb +44 -11
  212. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/tools/ripper.rb +44 -0
  213. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -0
  214. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -0
  215. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -0
  216. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -0
  217. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -0
  218. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -0
  219. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -0
  220. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -0
  221. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -0
  222. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -0
  223. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -0
  224. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -0
  225. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -0
  226. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/CHANGES.md +0 -0
  227. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/Gemfile +0 -0
  228. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/LICENSE.txt +0 -0
  229. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/README.md +0 -0
  230. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -0
  231. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -0
  232. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -0
  233. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -0
  234. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -0
  235. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -0
  236. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -0
  237. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -0
  238. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -0
  239. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -0
  240. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -0
  241. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -0
  242. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -0
  243. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -0
  244. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -0
  245. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -0
  246. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -0
  247. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -0
  248. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -0
  249. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -0
  250. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -0
  251. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -0
  252. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -0
  253. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -0
  254. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -0
  255. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -0
  256. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -0
  257. data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.16.1}/History.rdoc +86 -0
  258. data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.16.1}/Manifest.txt +1 -0
  259. data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.16.1}/README.rdoc +0 -0
  260. data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.16.1}/lib/composite_sexp_processor.rb +0 -0
  261. data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.16.1}/lib/pt_testcase.rb +27 -20
  262. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.1/lib/sexp.rb +391 -0
  263. data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0/lib/sexp.rb → 2.7.0/gems/sexp_processor-4.16.1/lib/sexp_matcher.rb} +67 -387
  264. data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.16.1}/lib/sexp_processor.rb +2 -2
  265. data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.16.1}/lib/strict_sexp.rb +25 -3
  266. data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.16.1}/lib/unique.rb +0 -0
  267. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/CHANGES +4 -0
  268. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/Gemfile +12 -13
  269. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/LICENSE +0 -0
  270. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.jp.md +0 -0
  271. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.md +0 -0
  272. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/code_attributes.rb +0 -0
  273. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/command.rb +13 -13
  274. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/controls.rb +0 -0
  275. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/do_inserter.rb +0 -0
  276. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/embedded.rb +0 -0
  277. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/end_inserter.rb +0 -0
  278. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/engine.rb +0 -0
  279. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/erb_converter.rb +0 -0
  280. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/filter.rb +0 -0
  281. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/grammar.rb +0 -0
  282. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/include.rb +0 -0
  283. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/interpolation.rb +0 -0
  284. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less/context.rb +0 -0
  285. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less/filter.rb +0 -0
  286. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less.rb +0 -0
  287. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/parser.rb +1 -1
  288. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/escaper.rb +0 -0
  289. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/filter.rb +0 -0
  290. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/parser.rb +0 -0
  291. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart.rb +0 -0
  292. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/splat/builder.rb +0 -0
  293. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/splat/filter.rb +0 -0
  294. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/template.rb +0 -0
  295. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/translator.rb +0 -0
  296. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/version.rb +1 -1
  297. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim.rb +0 -0
  298. data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/slim.gemspec +0 -0
  299. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/CHANGES +5 -0
  300. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/EXPRESSIONS.md +0 -0
  301. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/Gemfile +0 -0
  302. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/LICENSE +0 -0
  303. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/README.md +1 -1
  304. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/engine.rb +0 -0
  305. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/erb/engine.rb +0 -0
  306. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/erb/parser.rb +0 -0
  307. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/erb/template.rb +0 -0
  308. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/erb/trimming.rb +0 -0
  309. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/exceptions.rb +0 -0
  310. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filter.rb +0 -0
  311. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/code_merger.rb +0 -0
  312. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/control_flow.rb +0 -0
  313. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/dynamic_inliner.rb +0 -0
  314. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/encoding.rb +0 -0
  315. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/eraser.rb +0 -0
  316. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/escapable.rb +0 -0
  317. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/multi_flattener.rb +0 -0
  318. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/remove_bom.rb +0 -0
  319. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/static_analyzer.rb +0 -0
  320. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/static_merger.rb +0 -0
  321. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/string_splitter.rb +1 -1
  322. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/validator.rb +0 -0
  323. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generator.rb +0 -0
  324. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/array.rb +0 -0
  325. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/array_buffer.rb +0 -0
  326. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/erb.rb +0 -0
  327. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/rails_output_buffer.rb +0 -0
  328. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/string_buffer.rb +0 -0
  329. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/grammar.rb +0 -0
  330. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/attribute_merger.rb +0 -0
  331. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/attribute_remover.rb +0 -0
  332. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/attribute_sorter.rb +0 -0
  333. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/dispatcher.rb +0 -0
  334. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/fast.rb +0 -0
  335. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/filter.rb +0 -0
  336. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/pretty.rb +0 -0
  337. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/safe.rb +0 -0
  338. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/map.rb +0 -0
  339. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/dispatcher.rb +0 -0
  340. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/engine_dsl.rb +0 -0
  341. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/grammar_dsl.rb +0 -0
  342. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/options.rb +0 -0
  343. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/template.rb +0 -0
  344. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/parser.rb +0 -0
  345. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/static_analyzer.rb +1 -1
  346. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/templates/rails.rb +0 -0
  347. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/templates/tilt.rb +0 -0
  348. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/templates.rb +0 -0
  349. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/utils.rb +0 -0
  350. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/version.rb +3 -0
  351. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple.rb +0 -0
  352. data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/temple.gemspec +0 -0
  353. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/Gemfile +0 -0
  354. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/History.rdoc +0 -0
  355. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/LICENSE.txt +0 -0
  356. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/Manifest +0 -0
  357. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/README.rdoc +0 -0
  358. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/Todo.rdoc +0 -0
  359. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +0 -0
  360. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/import.rb +0 -0
  361. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +0 -0
  362. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -0
  363. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -0
  364. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +0 -0
  365. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table_helper.rb +0 -0
  366. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +0 -0
  367. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table.rb +0 -0
  368. data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/terminal-table.gemspec +0 -0
  369. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/COPYING +0 -0
  370. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/asciidoc.rb +0 -0
  371. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/babel.rb +0 -0
  372. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/bluecloth.rb +0 -0
  373. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/builder.rb +0 -0
  374. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/coffee.rb +0 -0
  375. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/commonmarker.rb +11 -1
  376. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/creole.rb +0 -0
  377. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/csv.rb +1 -1
  378. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/dummy.rb +0 -0
  379. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/erb.rb +0 -0
  380. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/erubi.rb +0 -0
  381. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/erubis.rb +0 -0
  382. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/etanni.rb +0 -0
  383. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/haml.rb +0 -0
  384. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/kramdown.rb +0 -0
  385. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/less.rb +0 -0
  386. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/liquid.rb +0 -0
  387. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/livescript.rb +0 -0
  388. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/mapping.rb +0 -0
  389. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/markaby.rb +0 -0
  390. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/maruku.rb +0 -0
  391. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/nokogiri.rb +0 -0
  392. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/pandoc.rb +23 -15
  393. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/plain.rb +0 -0
  394. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/prawn.rb +0 -0
  395. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/radius.rb +0 -0
  396. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/rdiscount.rb +0 -0
  397. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/rdoc.rb +0 -0
  398. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/redcarpet.rb +5 -2
  399. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/redcloth.rb +0 -0
  400. data/bundle/ruby/2.7.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb +23 -0
  401. data/bundle/ruby/2.7.0/gems/tilt-2.0.11/lib/tilt/sass.rb +78 -0
  402. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/sigil.rb +0 -0
  403. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/string.rb +0 -0
  404. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/template.rb +18 -12
  405. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/typescript.rb +0 -0
  406. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/wikicloth.rb +0 -0
  407. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt/yajl.rb +0 -0
  408. data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.11}/lib/tilt.rb +2 -1
  409. data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/CHANGELOG.md +12 -0
  410. data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/MIT-LICENSE.txt +1 -1
  411. data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/README.md +3 -3
  412. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
  413. data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/constants.rb +2 -2
  414. data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/index.rb +0 -0
  415. data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/no_string_ext.rb +0 -0
  416. data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width/string_ext.rb +0 -0
  417. data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.8.0}/lib/unicode/display_width.rb +1 -1
  418. data/lib/brakeman/app_tree.rb +45 -4
  419. data/lib/brakeman/call_index.rb +54 -15
  420. data/lib/brakeman/checks/base_check.rb +79 -57
  421. data/lib/brakeman/checks/check_basic_auth.rb +6 -2
  422. data/lib/brakeman/checks/check_basic_auth_timing_attack.rb +2 -1
  423. data/lib/brakeman/checks/check_content_tag.rb +9 -6
  424. data/lib/brakeman/checks/check_cookie_serialization.rb +23 -0
  425. data/lib/brakeman/checks/check_create_with.rb +4 -2
  426. data/lib/brakeman/checks/check_cross_site_scripting.rb +10 -7
  427. data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +29 -0
  428. data/lib/brakeman/checks/check_default_routes.rb +6 -3
  429. data/lib/brakeman/checks/check_deserialize.rb +26 -8
  430. data/lib/brakeman/checks/check_detailed_exceptions.rb +5 -3
  431. data/lib/brakeman/checks/check_digest_dos.rb +2 -1
  432. data/lib/brakeman/checks/check_divide_by_zero.rb +2 -1
  433. data/lib/brakeman/checks/check_dynamic_finders.rb +2 -1
  434. data/lib/brakeman/checks/check_eol_rails.rb +23 -0
  435. data/lib/brakeman/checks/check_eol_ruby.rb +26 -0
  436. data/lib/brakeman/checks/check_escape_function.rb +2 -1
  437. data/lib/brakeman/checks/check_evaluation.rb +3 -2
  438. data/lib/brakeman/checks/check_execute.rb +82 -8
  439. data/lib/brakeman/checks/check_file_access.rb +9 -2
  440. data/lib/brakeman/checks/check_file_disclosure.rb +2 -1
  441. data/lib/brakeman/checks/check_filter_skipping.rb +2 -1
  442. data/lib/brakeman/checks/check_force_ssl.rb +2 -1
  443. data/lib/brakeman/checks/check_forgery_setting.rb +4 -2
  444. data/lib/brakeman/checks/check_header_dos.rb +4 -3
  445. data/lib/brakeman/checks/check_i18n_xss.rb +4 -3
  446. data/lib/brakeman/checks/check_jruby_xml.rb +4 -3
  447. data/lib/brakeman/checks/check_json_encoding.rb +2 -1
  448. data/lib/brakeman/checks/check_json_entity_escape.rb +40 -0
  449. data/lib/brakeman/checks/check_json_parsing.rb +7 -5
  450. data/lib/brakeman/checks/check_link_to.rb +3 -2
  451. data/lib/brakeman/checks/check_link_to_href.rb +5 -5
  452. data/lib/brakeman/checks/check_mail_to.rb +2 -1
  453. data/lib/brakeman/checks/check_mass_assignment.rb +43 -12
  454. data/lib/brakeman/checks/check_mime_type_dos.rb +4 -3
  455. data/lib/brakeman/checks/check_model_attr_accessible.rb +3 -2
  456. data/lib/brakeman/checks/check_model_attributes.rb +5 -3
  457. data/lib/brakeman/checks/check_model_serialize.rb +2 -1
  458. data/lib/brakeman/checks/check_nested_attributes.rb +2 -1
  459. data/lib/brakeman/checks/check_nested_attributes_bypass.rb +3 -2
  460. data/lib/brakeman/checks/check_number_to_currency.rb +4 -2
  461. data/lib/brakeman/checks/check_page_caching_cve.rb +38 -0
  462. data/lib/brakeman/checks/check_pathname.rb +48 -0
  463. data/lib/brakeman/checks/check_permit_attributes.rb +3 -2
  464. data/lib/brakeman/checks/check_quote_table_name.rb +2 -1
  465. data/lib/brakeman/checks/check_redirect.rb +7 -2
  466. data/lib/brakeman/checks/check_regex_dos.rb +3 -2
  467. data/lib/brakeman/checks/check_render.rb +19 -3
  468. data/lib/brakeman/checks/check_render_dos.rb +2 -1
  469. data/lib/brakeman/checks/check_render_inline.rb +4 -2
  470. data/lib/brakeman/checks/check_response_splitting.rb +2 -1
  471. data/lib/brakeman/checks/check_reverse_tabnabbing.rb +59 -0
  472. data/lib/brakeman/checks/check_route_dos.rb +2 -1
  473. data/lib/brakeman/checks/check_safe_buffer_manipulation.rb +2 -1
  474. data/lib/brakeman/checks/check_sanitize_config_cve.rb +120 -0
  475. data/lib/brakeman/checks/check_sanitize_methods.rb +9 -5
  476. data/lib/brakeman/checks/check_secrets.rb +2 -1
  477. data/lib/brakeman/checks/check_select_tag.rb +2 -1
  478. data/lib/brakeman/checks/check_select_vulnerability.rb +2 -1
  479. data/lib/brakeman/checks/check_send.rb +2 -1
  480. data/lib/brakeman/checks/check_session_manipulation.rb +2 -1
  481. data/lib/brakeman/checks/check_session_settings.rb +11 -5
  482. data/lib/brakeman/checks/check_simple_format.rb +4 -2
  483. data/lib/brakeman/checks/check_single_quotes.rb +2 -1
  484. data/lib/brakeman/checks/check_skip_before_filter.rb +8 -6
  485. data/lib/brakeman/checks/check_sprockets_path_traversal.rb +2 -1
  486. data/lib/brakeman/checks/check_sql.rb +88 -43
  487. data/lib/brakeman/checks/check_sql_cves.rb +4 -2
  488. data/lib/brakeman/checks/check_ssl_verify.rb +2 -1
  489. data/lib/brakeman/checks/check_strip_tags.rb +6 -3
  490. data/lib/brakeman/checks/check_symbol_dos.rb +3 -2
  491. data/lib/brakeman/checks/check_symbol_dos_cve.rb +2 -1
  492. data/lib/brakeman/checks/check_template_injection.rb +33 -0
  493. data/lib/brakeman/checks/check_translate_bug.rb +2 -1
  494. data/lib/brakeman/checks/check_unsafe_reflection.rb +9 -3
  495. data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +69 -0
  496. data/lib/brakeman/checks/check_unscoped_find.rb +2 -1
  497. data/lib/brakeman/checks/check_validation_regex.rb +2 -1
  498. data/lib/brakeman/checks/check_verb_confusion.rb +76 -0
  499. data/lib/brakeman/checks/check_weak_hash.rb +6 -3
  500. data/lib/brakeman/checks/check_weak_rsa_key.rb +112 -0
  501. data/lib/brakeman/checks/check_without_protection.rb +2 -1
  502. data/lib/brakeman/checks/check_xml_dos.rb +4 -3
  503. data/lib/brakeman/checks/check_yaml_parsing.rb +14 -20
  504. data/lib/brakeman/checks/eol_check.rb +49 -0
  505. data/lib/brakeman/commandline.rb +25 -1
  506. data/lib/brakeman/differ.rb +16 -33
  507. data/lib/brakeman/file_parser.rb +60 -28
  508. data/lib/brakeman/file_path.rb +14 -0
  509. data/lib/brakeman/options.rb +39 -2
  510. data/lib/brakeman/parsers/haml_embedded.rb +1 -1
  511. data/lib/brakeman/parsers/template_parser.rb +29 -4
  512. data/lib/brakeman/processor.rb +2 -2
  513. data/lib/brakeman/processors/alias_processor.rb +216 -32
  514. data/lib/brakeman/processors/base_processor.rb +6 -4
  515. data/lib/brakeman/processors/controller_alias_processor.rb +6 -43
  516. data/lib/brakeman/processors/controller_processor.rb +5 -5
  517. data/lib/brakeman/processors/gem_processor.rb +13 -2
  518. data/lib/brakeman/processors/haml_template_processor.rb +103 -123
  519. data/lib/brakeman/processors/lib/call_conversion_helper.rb +18 -11
  520. data/lib/brakeman/processors/lib/file_type_detector.rb +64 -0
  521. data/lib/brakeman/processors/lib/find_all_calls.rb +58 -18
  522. data/lib/brakeman/processors/lib/find_call.rb +3 -64
  523. data/lib/brakeman/processors/lib/rails2_config_processor.rb +1 -1
  524. data/lib/brakeman/processors/lib/rails3_config_processor.rb +16 -16
  525. data/lib/brakeman/processors/lib/rails3_route_processor.rb +2 -0
  526. data/lib/brakeman/processors/lib/rails4_config_processor.rb +2 -1
  527. data/lib/brakeman/processors/lib/render_helper.rb +3 -1
  528. data/lib/brakeman/processors/library_processor.rb +9 -0
  529. data/lib/brakeman/processors/model_processor.rb +32 -0
  530. data/lib/brakeman/processors/output_processor.rb +1 -1
  531. data/lib/brakeman/processors/template_alias_processor.rb +33 -0
  532. data/lib/brakeman/processors/template_processor.rb +10 -6
  533. data/lib/brakeman/report/ignore/config.rb +10 -2
  534. data/lib/brakeman/report/ignore/interactive.rb +3 -3
  535. data/lib/brakeman/report/report_base.rb +0 -2
  536. data/lib/brakeman/report/report_codeclimate.rb +1 -1
  537. data/lib/brakeman/report/report_csv.rb +39 -60
  538. data/lib/brakeman/report/report_github.rb +31 -0
  539. data/lib/brakeman/report/report_junit.rb +104 -0
  540. data/lib/brakeman/report/report_markdown.rb +0 -1
  541. data/lib/brakeman/report/report_sarif.rb +133 -0
  542. data/lib/brakeman/report/report_sonar.rb +38 -0
  543. data/lib/brakeman/report/report_table.rb +5 -5
  544. data/lib/brakeman/report/report_tabs.rb +1 -1
  545. data/lib/brakeman/report/report_text.rb +43 -21
  546. data/lib/brakeman/report/templates/controller_warnings.html.erb +2 -0
  547. data/lib/brakeman/report/templates/ignored_warnings.html.erb +2 -0
  548. data/lib/brakeman/report/templates/model_warnings.html.erb +2 -0
  549. data/lib/brakeman/report/templates/security_warnings.html.erb +2 -0
  550. data/lib/brakeman/report/templates/view_warnings.html.erb +2 -0
  551. data/lib/brakeman/report.rb +22 -1
  552. data/lib/brakeman/rescanner.rb +11 -5
  553. data/lib/brakeman/scanner.rb +65 -31
  554. data/lib/brakeman/tracker/collection.rb +57 -7
  555. data/lib/brakeman/tracker/config.rb +116 -66
  556. data/lib/brakeman/tracker/constants.rb +10 -8
  557. data/lib/brakeman/tracker/controller.rb +1 -1
  558. data/lib/brakeman/tracker/method_info.rb +70 -0
  559. data/lib/brakeman/tracker.rb +68 -7
  560. data/lib/brakeman/util.rb +63 -24
  561. data/lib/brakeman/version.rb +1 -1
  562. data/lib/brakeman/warning.rb +18 -3
  563. data/lib/brakeman/warning_codes.rb +21 -0
  564. data/lib/brakeman.rb +49 -6
  565. data/lib/ruby_parser/bm_sexp.rb +40 -11
  566. metadata +445 -344
  567. data/bundle/ruby/2.5.0/gems/haml-4.0.7/MIT-LICENSE +0 -20
  568. data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/buffer.rb +0 -345
  569. data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/compiler.rb +0 -540
  570. data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/error.rb +0 -61
  571. data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/railtie.rb +0 -22
  572. data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/template/plugin.rb +0 -41
  573. data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/util.rb +0 -377
  574. data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/version.rb +0 -3
  575. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/debugging.md +0 -18
  576. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/rp_stringscanner.rb +0 -64
  577. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby20_parser.rb +0 -6869
  578. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby20_parser.y +0 -2431
  579. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby21_parser.rb +0 -6944
  580. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby22_parser.rb +0 -6968
  581. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby22_parser.y +0 -2458
  582. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby23_parser.rb +0 -6987
  583. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby23_parser.y +0 -2460
  584. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby24_parser.rb +0 -6994
  585. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby25_parser.rb +0 -6994
  586. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby26_parser.rb +0 -7012
  587. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby_lexer.rb +0 -1449
  588. data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/tools/ripper.rb +0 -28
  589. data/bundle/ruby/2.5.0/gems/temple-0.8.1/lib/temple/version.rb +0 -3
  590. data/bundle/ruby/2.5.0/gems/tilt-2.0.9/CHANGELOG.md +0 -132
  591. data/bundle/ruby/2.5.0/gems/tilt-2.0.9/Gemfile +0 -70
  592. data/bundle/ruby/2.5.0/gems/tilt-2.0.9/HACKING +0 -16
  593. data/bundle/ruby/2.5.0/gems/tilt-2.0.9/README.md +0 -233
  594. data/bundle/ruby/2.5.0/gems/tilt-2.0.9/lib/tilt/rst-pandoc.rb +0 -18
  595. data/bundle/ruby/2.5.0/gems/tilt-2.0.9/lib/tilt/sass.rb +0 -52
  596. data/bundle/ruby/2.5.0/gems/tilt-2.0.9/tilt.gemspec +0 -130
  597. data/bundle/ruby/2.5.0/gems/unicode-display_width-1.6.0/data/display_width.marshal.gz +0 -0
@@ -1,2460 +0,0 @@
1
- # -*- racc -*-
2
-
3
- class Ruby23Parser
4
-
5
- token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS
6
- kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT
7
- kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER
8
- kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD
9
- kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__
10
- k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT
11
- tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT
12
- tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ
13
- tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF
14
- tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN
15
- tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE
16
- tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE
17
- tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY
18
- tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG
19
- tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END
20
- tSTRING tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA
21
- tLAMBEG tDSTAR tCHAR tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DEND tUBANG
22
- tRATIONAL tIMAGINARY
23
- tLABEL_END
24
- tLONELY
25
-
26
- prechigh
27
- right tBANG tTILDE tUPLUS
28
- right tPOW
29
- right tUMINUS_NUM tUMINUS
30
- left tSTAR2 tDIVIDE tPERCENT
31
- left tPLUS tMINUS
32
- left tLSHFT tRSHFT
33
- left tAMPER2
34
- left tPIPE tCARET
35
- left tGT tGEQ tLT tLEQ
36
- nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
37
- left tANDOP
38
- left tOROP
39
- nonassoc tDOT2 tDOT3
40
- right tEH tCOLON
41
- left kRESCUE_MOD
42
- right tEQL tOP_ASGN
43
- nonassoc kDEFINED
44
- right kNOT
45
- left kOR kAND
46
- nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
47
- nonassoc tLBRACE_ARG
48
- nonassoc tLOWEST
49
- preclow
50
-
51
- rule
52
-
53
- program: {
54
- self.lexer.lex_state = EXPR_BEG
55
- }
56
- top_compstmt
57
- {
58
- result = new_compstmt val
59
- }
60
-
61
- top_compstmt: top_stmts opt_terms
62
- {
63
- result = val[0]
64
- }
65
-
66
- top_stmts: none
67
- | top_stmt
68
- | top_stmts terms top_stmt
69
- {
70
- result = self.block_append val[0], val[2]
71
- }
72
- | error top_stmt
73
-
74
- top_stmt: stmt
75
- {
76
- result = val[0]
77
-
78
- # TODO: remove once I have more confidence this is fixed
79
- # result.each_of_type :call_args do |s|
80
- # debug20 666, s, result
81
- # end
82
- }
83
- | klBEGIN
84
- {
85
- if (self.in_def || self.in_single > 0) then
86
- debug20 1
87
- yyerror "BEGIN in method"
88
- end
89
- self.env.extend
90
- }
91
- begin_block
92
- {
93
- _, _, block = val
94
- result = block
95
- }
96
-
97
- begin_block: tLCURLY top_compstmt tRCURLY
98
- {
99
- _, stmt, _ = val
100
- result = new_iter s(:preexe), 0, stmt
101
- }
102
-
103
- bodystmt: compstmt opt_rescue k_else
104
- {
105
- res = _values[-2]
106
- yyerror "else without rescue is useless" unless res
107
- }
108
- compstmt
109
- opt_ensure
110
- {
111
- body, resc, _, _, els, ens = val
112
-
113
- result = new_body [body, resc, els, ens]
114
- }
115
- | compstmt opt_rescue opt_ensure
116
- {
117
- body, resc, ens = val
118
-
119
- result = new_body [body, resc, nil, ens]
120
- }
121
-
122
- compstmt: stmts opt_terms
123
- {
124
- result = new_compstmt val
125
- }
126
-
127
- stmts: none
128
- | stmt_or_begin # TODO: newline_node ?
129
- | stmts terms stmt_or_begin
130
- {
131
- result = self.block_append val[0], val[2]
132
- }
133
- | error stmt
134
- {
135
- result = val[1]
136
- debug20 2, val, result
137
- }
138
-
139
- stmt_or_begin: stmt
140
- | klBEGIN
141
- {
142
- if (self.in_def || self.in_single > 0) then
143
- debug20 1
144
- yyerror "BEGIN in method"
145
- end
146
- self.env.extend
147
- }
148
- begin_block
149
- {
150
- _, _, stmt = val
151
- result = stmt
152
- }
153
-
154
- stmt: kALIAS fitem
155
- {
156
- lexer.lex_state = EXPR_FNAME
157
- result = self.lexer.lineno
158
- }
159
- fitem
160
- {
161
- result = s(:alias, val[1], val[3]).line(val[2])
162
- }
163
- | kALIAS tGVAR tGVAR
164
- {
165
- result = s(:valias, val[1].to_sym, val[2].to_sym)
166
- }
167
- | kALIAS tGVAR tBACK_REF
168
- {
169
- result = s(:valias, val[1].to_sym, :"$#{val[2]}")
170
- }
171
- | kALIAS tGVAR tNTH_REF
172
- {
173
- yyerror "can't make alias for the number variables"
174
- }
175
- | kUNDEF undef_list
176
- {
177
- result = val[1]
178
- }
179
- | stmt kIF_MOD expr_value
180
- {
181
- result = new_if val[2], val[0], nil
182
- }
183
- | stmt kUNLESS_MOD expr_value
184
- {
185
- result = new_if val[2], nil, val[0]
186
- }
187
- | stmt kWHILE_MOD expr_value
188
- {
189
- result = new_while val[0], val[2], true
190
- }
191
- | stmt kUNTIL_MOD expr_value
192
- {
193
- result = new_until val[0], val[2], true
194
- }
195
- | stmt kRESCUE_MOD stmt
196
- {
197
- body, _, resbody = val
198
- result = new_rescue body, new_resbody(s(:array), resbody)
199
- }
200
- | klEND tLCURLY compstmt tRCURLY
201
- {
202
- if (self.in_def || self.in_single > 0) then
203
- debug20 3
204
- yyerror "END in method; use at_exit"
205
- end
206
- result = new_iter s(:postexe), 0, val[2]
207
- }
208
- | command_asgn
209
- | mlhs tEQL command_call
210
- {
211
- result = new_masgn val[0], val[2], :wrap
212
- }
213
- | lhs tEQL mrhs
214
- {
215
- result = new_assign val[0], s(:svalue, val[2])
216
- }
217
- | mlhs tEQL mrhs_arg
218
- {
219
- result = new_masgn val[0], val[2]
220
- }
221
- | expr
222
-
223
- command_asgn: lhs tEQL command_rhs
224
- {
225
- result = new_assign val[0], val[2]
226
- }
227
- # | lhs tEQL command_asgn
228
- # {
229
- # result = new_assign val[0], val[2]
230
- # }
231
- | var_lhs tOP_ASGN command_rhs
232
- {
233
- result = new_op_asgn val
234
- }
235
- | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_rhs
236
- {
237
- result = s(:op_asgn1, val[0], val[2], val[4].to_sym, val[5])
238
- }
239
- | primary_value call_op tIDENTIFIER tOP_ASGN command_rhs
240
- {
241
- result = s(:op_asgn, val[0], val[4], val[2].to_sym, val[3].to_sym)
242
- if val[1] == '&.'
243
- result.sexp_type = :safe_op_asgn
244
- end
245
- result.line = val[0].line
246
- }
247
- | primary_value call_op tCONSTANT tOP_ASGN command_rhs
248
- {
249
- result = s(:op_asgn, val[0], val[4], val[2].to_sym, val[3].to_sym)
250
- if val[1] == '&.'
251
- result.sexp_type = :safe_op_asgn
252
- end
253
- result.line = val[0].line
254
- }
255
- | primary_value tCOLON2 tCONSTANT tOP_ASGN command_rhs
256
- {
257
- result = s(:op_asgn, val[0], val[4], val[2], val[3])
258
- debug20 4, val, result
259
- }
260
- | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_rhs
261
- {
262
- result = s(:op_asgn, val[0], val[4], val[2], val[3])
263
- debug20 5, val, result
264
- }
265
- | backref tOP_ASGN command_rhs
266
- {
267
- self.backref_assign_error val[0]
268
- }
269
-
270
- command_rhs: command_call =tOP_ASGN
271
- {
272
- expr, = val
273
- result = value_expr expr
274
- }
275
- | command_asgn
276
-
277
- expr: command_call
278
- | expr kAND expr
279
- {
280
- result = logical_op :and, val[0], val[2]
281
- }
282
- | expr kOR expr
283
- {
284
- result = logical_op :or, val[0], val[2]
285
- }
286
- | kNOT opt_nl expr
287
- {
288
- result = s(:call, val[2], :"!")
289
- }
290
- | tBANG command_call
291
- {
292
- result = s(:call, val[1], :"!")
293
- }
294
- | arg
295
-
296
- expr_value: expr
297
- {
298
- result = value_expr(val[0])
299
- }
300
-
301
- expr_value_do: {
302
- lexer.cond.push true
303
- }
304
- expr_value do
305
- {
306
- lexer.cond.pop
307
- }
308
- {
309
- _, expr, _, _ = val
310
- result = expr
311
- }
312
-
313
- command_call: command
314
- | block_command
315
-
316
- block_command: block_call
317
- | block_call call_op2 operation2 command_args
318
- {
319
- result = new_call val[0], val[2].to_sym, val[3]
320
- }
321
-
322
- cmd_brace_block: tLBRACE_ARG
323
- {
324
- # self.env.extend(:dynamic)
325
- result = self.lexer.lineno
326
- }
327
- brace_body tRCURLY
328
- {
329
- _, line, body, _ = val
330
-
331
- result = body
332
- result.line = line
333
-
334
- # self.env.unextend
335
- }
336
-
337
- fcall: operation
338
- {
339
- result = new_call nil, val[0].to_sym
340
- }
341
-
342
- command: fcall command_args =tLOWEST
343
- {
344
- result = val[0].concat val[1].sexp_body # REFACTOR pattern
345
- }
346
- | fcall command_args cmd_brace_block
347
- {
348
- result = val[0].concat val[1].sexp_body
349
- if val[2] then
350
- block_dup_check result, val[2]
351
-
352
- result, operation = val[2], result
353
- result.insert 1, operation
354
- end
355
- }
356
- | primary_value call_op operation2 command_args =tLOWEST
357
- {
358
- result = new_call val[0], val[2].to_sym, val[3], val[1]
359
- }
360
- | primary_value call_op operation2 command_args cmd_brace_block
361
- {
362
- recv, _, msg, args, block = val
363
- call = new_call recv, msg.to_sym, args, val[1]
364
-
365
- block_dup_check call, block
366
-
367
- block.insert 1, call
368
- result = block
369
- }
370
- | primary_value tCOLON2 operation2 command_args =tLOWEST
371
- {
372
- result = new_call val[0], val[2].to_sym, val[3]
373
- }
374
- | primary_value tCOLON2 operation2 command_args cmd_brace_block
375
- {
376
- recv, _, msg, args, block = val
377
- call = new_call recv, msg.to_sym, args
378
-
379
- block_dup_check call, block
380
-
381
- block.insert 1, call
382
- result = block
383
- }
384
- | kSUPER command_args
385
- {
386
- result = new_super val[1]
387
- }
388
- | kYIELD command_args
389
- {
390
- result = new_yield val[1]
391
- }
392
- | k_return call_args
393
- {
394
- line = val[0].last
395
- result = s(:return, ret_args(val[1])).line(line)
396
- }
397
- | kBREAK call_args
398
- {
399
- line = val[0].last
400
- result = s(:break, ret_args(val[1])).line(line)
401
- }
402
- | kNEXT call_args
403
- {
404
- line = val[0].last
405
- result = s(:next, ret_args(val[1])).line(line)
406
- }
407
-
408
- mlhs: mlhs_basic
409
- | tLPAREN mlhs_inner rparen
410
- {
411
- result = val[1]
412
- }
413
-
414
- mlhs_inner: mlhs_basic
415
- | tLPAREN mlhs_inner rparen
416
- {
417
- result = s(:masgn, s(:array, val[1]))
418
- }
419
-
420
- mlhs_basic: mlhs_head
421
- {
422
- result = s(:masgn, val[0])
423
- }
424
- | mlhs_head mlhs_item
425
- {
426
- result = s(:masgn, val[0] << val[1].compact)
427
- }
428
- | mlhs_head tSTAR mlhs_node
429
- {
430
- result = s(:masgn, val[0] << s(:splat, val[2]))
431
- }
432
- | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post
433
- {
434
- ary1, _, splat, _, ary2 = val
435
-
436
- result = list_append ary1, s(:splat, splat)
437
- result.concat ary2.sexp_body
438
- result = s(:masgn, result)
439
- }
440
- | mlhs_head tSTAR
441
- {
442
- result = s(:masgn, val[0] << s(:splat))
443
- }
444
- | mlhs_head tSTAR tCOMMA mlhs_post
445
- {
446
- ary = list_append val[0], s(:splat)
447
- ary.concat val[3].sexp_body
448
- result = s(:masgn, ary)
449
- }
450
- | tSTAR mlhs_node
451
- {
452
- result = s(:masgn, s(:array, s(:splat, val[1])))
453
- }
454
- | tSTAR mlhs_node tCOMMA mlhs_post
455
- {
456
- ary = s(:array, s(:splat, val[1]))
457
- ary.concat val[3].sexp_body
458
- result = s(:masgn, ary)
459
- }
460
- | tSTAR
461
- {
462
- result = s(:masgn, s(:array, s(:splat)))
463
- }
464
- | tSTAR tCOMMA mlhs_post
465
- {
466
- result = s(:masgn, s(:array, s(:splat), *val[2].sexp_body))
467
- }
468
-
469
- mlhs_item: mlhs_node
470
- | tLPAREN mlhs_inner rparen
471
- {
472
- result = val[1]
473
- }
474
-
475
- mlhs_head: mlhs_item tCOMMA
476
- {
477
- result = s(:array, val[0])
478
- }
479
- | mlhs_head mlhs_item tCOMMA
480
- {
481
- result = val[0] << val[1].compact
482
- }
483
-
484
- mlhs_post: mlhs_item
485
- {
486
- result = s(:array, val[0])
487
- }
488
- | mlhs_post tCOMMA mlhs_item
489
- {
490
- result = list_append val[0], val[2]
491
- }
492
-
493
- mlhs_node: user_variable
494
- {
495
- result = self.assignable val[0]
496
- }
497
- | keyword_variable
498
- {
499
- result = self.assignable val[0]
500
- }
501
- | primary_value tLBRACK2 opt_call_args rbracket
502
- {
503
- result = self.aryset val[0], val[2]
504
- }
505
- | primary_value call_op tIDENTIFIER
506
- {
507
- result = new_attrasgn val[0], val[2], val[1]
508
- }
509
- | primary_value tCOLON2 tIDENTIFIER
510
- {
511
- result = s(:attrasgn, val[0], :"#{val[2]}=")
512
- }
513
- | primary_value call_op tCONSTANT
514
- {
515
- result = new_attrasgn val[0], val[2], val[1]
516
- }
517
- | primary_value tCOLON2 tCONSTANT
518
- {
519
- if (self.in_def || self.in_single > 0) then
520
- debug20 7
521
- yyerror "dynamic constant assignment"
522
- end
523
-
524
- result = s(:const, s(:colon2, val[0], val[2].to_sym), nil)
525
- }
526
- | tCOLON3 tCONSTANT
527
- {
528
- if (self.in_def || self.in_single > 0) then
529
- debug20 8
530
- yyerror "dynamic constant assignment"
531
- end
532
-
533
- result = s(:const, nil, s(:colon3, val[1].to_sym))
534
- }
535
- | backref
536
- {
537
- self.backref_assign_error val[0]
538
- }
539
-
540
- lhs: user_variable
541
- {
542
- result = self.assignable val[0]
543
- }
544
- | keyword_variable
545
- {
546
- result = self.assignable val[0]
547
- debug20 9, val, result
548
- }
549
- | primary_value tLBRACK2 opt_call_args rbracket
550
- {
551
- result = self.aryset val[0], val[2]
552
- }
553
- | primary_value call_op tIDENTIFIER # REFACTOR
554
- {
555
- result = new_attrasgn val[0], val[2], val[1]
556
- }
557
- | primary_value tCOLON2 tIDENTIFIER
558
- {
559
- result = s(:attrasgn, val[0], :"#{val[2]}=")
560
- }
561
- | primary_value call_op tCONSTANT # REFACTOR?
562
- {
563
- result = new_attrasgn val[0], val[2], val[1]
564
- }
565
- | primary_value tCOLON2 tCONSTANT
566
- {
567
- if (self.in_def || self.in_single > 0) then
568
- debug20 10
569
- yyerror "dynamic constant assignment"
570
- end
571
-
572
- result = s(:const, s(:colon2, val[0], val[2].to_sym))
573
- }
574
- | tCOLON3 tCONSTANT
575
- {
576
- if (self.in_def || self.in_single > 0) then
577
- debug20 11
578
- yyerror "dynamic constant assignment"
579
- end
580
-
581
- result = s(:const, s(:colon3, val[1].to_sym))
582
- }
583
- | backref
584
- {
585
- self.backref_assign_error val[0]
586
- }
587
-
588
- cname: tIDENTIFIER
589
- {
590
- yyerror "class/module name must be CONSTANT"
591
- }
592
- | tCONSTANT
593
-
594
- cpath: tCOLON3 cname
595
- {
596
- result = s(:colon3, val[1].to_sym)
597
- }
598
- | cname
599
- {
600
- result = val[0].to_sym
601
- }
602
- | primary_value tCOLON2 cname
603
- {
604
- result = s(:colon2, val[0], val[2].to_sym)
605
- }
606
-
607
- fname: tIDENTIFIER | tCONSTANT | tFID
608
- | op
609
- {
610
- lexer.lex_state = EXPR_END
611
- result = val[0]
612
- }
613
-
614
- | reswords
615
- {
616
- (sym, _line), = val
617
- lexer.lex_state = EXPR_END
618
- result = sym
619
- }
620
-
621
- fsym: fname | symbol
622
-
623
- fitem: fsym
624
- {
625
- result = s(:lit, val[0].to_sym)
626
- }
627
- | dsym
628
-
629
- undef_list: fitem
630
- {
631
- result = new_undef val[0]
632
- }
633
- |
634
- undef_list tCOMMA
635
- {
636
- lexer.lex_state = EXPR_FNAME
637
- }
638
- fitem
639
- {
640
- result = new_undef val[0], val[3]
641
- }
642
-
643
- op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ
644
- | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ
645
- | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2
646
- | tSTAR | tDIVIDE | tPERCENT | tPOW | tDSTAR | tBANG | tTILDE
647
- | tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2
648
- | tUBANG
649
-
650
- reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND
651
- | kALIAS | kAND | kBEGIN | kBREAK | kCASE
652
- | kCLASS | kDEF | kDEFINED | kDO | kELSE
653
- | kELSIF | kEND | kENSURE | kFALSE | kFOR
654
- | kIN | kMODULE | kNEXT | kNIL | kNOT
655
- | kOR | kREDO | kRESCUE | kRETRY | kRETURN
656
- | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF
657
- | kWHEN | kYIELD | kIF | kUNLESS | kWHILE
658
- | kUNTIL
659
-
660
- arg: lhs tEQL arg_rhs
661
- {
662
- result = new_assign val[0], val[2]
663
- }
664
- | var_lhs tOP_ASGN arg_rhs
665
- {
666
- result = new_op_asgn val
667
- }
668
- | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg_rhs
669
- {
670
- val[2].sexp_type = :arglist if val[2]
671
- result = s(:op_asgn1, val[0], val[2], val[4].to_sym, val[5])
672
- }
673
- | primary_value call_op tIDENTIFIER tOP_ASGN arg_rhs
674
- {
675
- result = new_op_asgn2 val
676
- }
677
- | primary_value call_op tCONSTANT tOP_ASGN arg_rhs
678
- {
679
- result = new_op_asgn2 val
680
- }
681
- | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg_rhs
682
- {
683
- result = s(:op_asgn, val[0], val[4], val[2].to_sym, val[3].to_sym)
684
- }
685
- | primary_value tCOLON2 tCONSTANT tOP_ASGN arg_rhs
686
- {
687
- lhs1, _, lhs2, op, rhs = val
688
-
689
- lhs = s(:colon2, lhs1, lhs2.to_sym).line lhs1.line
690
- result = new_const_op_asgn [lhs, op, rhs]
691
- }
692
- | tCOLON3 tCONSTANT
693
- {
694
- result = self.lexer.lineno
695
- }
696
- tOP_ASGN arg_rhs
697
- {
698
- _, lhs, line, op, rhs = val
699
-
700
- lhs = s(:colon3, lhs.to_sym).line line
701
- result = new_const_op_asgn [lhs, op, rhs]
702
- }
703
- | backref tOP_ASGN arg_rhs
704
- {
705
- # TODO: lhs = var_field val[0]
706
- asgn = new_op_asgn val
707
- result = self.backref_assign_error asgn
708
- }
709
- | arg tDOT2 arg
710
- {
711
- v1, v2 = val[0], val[2]
712
- if v1.node_type == :lit and v2.node_type == :lit and Integer === v1.last and Integer === v2.last then
713
- result = s(:lit, (v1.last)..(v2.last))
714
- else
715
- result = s(:dot2, v1, v2)
716
- end
717
- }
718
- | arg tDOT3 arg
719
- {
720
- v1, v2 = val[0], val[2]
721
- if v1.node_type == :lit and v2.node_type == :lit and Integer === v1.last and Integer === v2.last then
722
- result = s(:lit, (v1.last)...(v2.last))
723
- else
724
- result = s(:dot3, v1, v2)
725
- end
726
- }
727
- | arg tPLUS arg
728
- {
729
- result = new_call val[0], :+, argl(val[2])
730
- }
731
- | arg tMINUS arg
732
- {
733
- result = new_call val[0], :-, argl(val[2])
734
- }
735
- | arg tSTAR2 arg # TODO: rename
736
- {
737
- result = new_call val[0], :*, argl(val[2])
738
- }
739
- | arg tDIVIDE arg
740
- {
741
- result = new_call val[0], :"/", argl(val[2])
742
- }
743
- | arg tPERCENT arg
744
- {
745
- result = new_call val[0], :"%", argl(val[2])
746
- }
747
- | arg tPOW arg
748
- {
749
- result = new_call val[0], :**, argl(val[2])
750
- }
751
- | tUMINUS_NUM simple_numeric tPOW arg
752
- {
753
- result = new_call(new_call(s(:lit, val[1]), :"**", argl(val[3])), :"-@")
754
- }
755
- | tUPLUS arg
756
- {
757
- result = new_call val[1], :"+@"
758
- }
759
- | tUMINUS arg
760
- {
761
- result = new_call val[1], :"-@"
762
- }
763
- | arg tPIPE arg
764
- {
765
- result = new_call val[0], :"|", argl(val[2])
766
- }
767
- | arg tCARET arg
768
- {
769
- result = new_call val[0], :"^", argl(val[2])
770
- }
771
- | arg tAMPER2 arg
772
- {
773
- result = new_call val[0], :"&", argl(val[2])
774
- }
775
- | arg tCMP arg
776
- {
777
- result = new_call val[0], :"<=>", argl(val[2])
778
- }
779
- | rel_expr =tCMP
780
- | arg tEQ arg
781
- {
782
- result = new_call val[0], :"==", argl(val[2])
783
- }
784
- | arg tEQQ arg
785
- {
786
- result = new_call val[0], :"===", argl(val[2])
787
- }
788
- | arg tNEQ arg
789
- {
790
- result = new_call val[0], :"!=", argl(val[2])
791
- }
792
- | arg tMATCH arg
793
- {
794
- result = new_match val[0], val[2]
795
- }
796
- | arg tNMATCH arg
797
- {
798
- result = s(:not, new_match(val[0], val[2]))
799
- }
800
- | tBANG arg
801
- {
802
- result = new_call val[1], :"!"
803
- }
804
- | tTILDE arg
805
- {
806
- result = new_call value_expr(val[1]), :"~"
807
- }
808
- | arg tLSHFT arg
809
- {
810
- val[0] = value_expr val[0]
811
- val[2] = value_expr val[2]
812
- result = new_call val[0], :"\<\<", argl(val[2])
813
- }
814
- | arg tRSHFT arg
815
- {
816
- val[0] = value_expr val[0]
817
- val[2] = value_expr val[2]
818
- result = new_call val[0], :">>", argl(val[2])
819
- }
820
- | arg tANDOP arg
821
- {
822
- result = logical_op :and, val[0], val[2]
823
- }
824
- | arg tOROP arg
825
- {
826
- result = logical_op :or, val[0], val[2]
827
- }
828
- | kDEFINED opt_nl arg
829
- {
830
- result = s(:defined, val[2])
831
- }
832
- | arg tEH arg opt_nl tCOLON arg
833
- {
834
- result = s(:if, val[0], val[2], val[5])
835
- }
836
- | primary
837
-
838
- relop: tGT
839
- | tLT
840
- | tGEQ
841
- | tLEQ
842
-
843
- rel_expr: arg relop arg =tGT
844
- {
845
- lhs, op, rhs = val
846
- result = new_call lhs, op.to_sym, argl(rhs)
847
- }
848
- | rel_expr relop arg =tGT
849
- {
850
- lhs, op, rhs = val
851
- warn "comparison '%s' after comparison", op
852
- result = new_call lhs, op.to_sym, argl(rhs)
853
- }
854
-
855
- arg_value: arg
856
- {
857
- result = value_expr(val[0])
858
- }
859
-
860
- aref_args: none
861
- | args trailer
862
- {
863
- result = args [val[0]]
864
- }
865
- | args tCOMMA assocs trailer
866
- {
867
- result = args [val[0], array_to_hash(val[2])]
868
- }
869
- | assocs trailer
870
- {
871
- result = args [array_to_hash(val[0])]
872
- }
873
-
874
- arg_rhs: arg =tOP_ASGN
875
- | arg kRESCUE_MOD arg
876
- {
877
- body, _, resbody = val
878
- body = value_expr body
879
- resbody = remove_begin resbody
880
- result = new_rescue(body, new_resbody(s(:array), resbody))
881
- }
882
-
883
- paren_args: tLPAREN2 opt_call_args rparen
884
- {
885
- result = val[1]
886
- }
887
-
888
- opt_paren_args: none
889
- | paren_args
890
-
891
- opt_call_args: none
892
- {
893
- result = val[0]
894
- }
895
- | call_args
896
- {
897
- result = val[0]
898
- }
899
- | args tCOMMA
900
- {
901
- result = args val
902
- }
903
- | args tCOMMA assocs tCOMMA
904
- {
905
- result = args [val[0], array_to_hash(val[2])]
906
- }
907
- | assocs tCOMMA
908
- {
909
- result = args [array_to_hash(val[0])]
910
- }
911
-
912
- call_args: command
913
- {
914
- warning "parenthesize argument(s) for future version"
915
- result = call_args val
916
- }
917
- | args opt_block_arg
918
- {
919
- result = call_args val
920
- result = self.arg_blk_pass val[0], val[1]
921
- }
922
- | assocs opt_block_arg
923
- {
924
- result = call_args [array_to_hash(val[0])]
925
- result = self.arg_blk_pass result, val[1]
926
- }
927
- | args tCOMMA assocs opt_block_arg
928
- {
929
- result = call_args [val[0], array_to_hash(val[2])]
930
- result = self.arg_blk_pass result, val[3]
931
- }
932
- | block_arg
933
- {
934
- result = call_args val
935
- }
936
-
937
- command_args: {
938
- result = lexer.cmdarg.store true
939
- }
940
- call_args
941
- {
942
- lexer.cmdarg.restore val[0]
943
- result = val[1]
944
- }
945
-
946
- block_arg: tAMPER arg_value
947
- {
948
- result = s(:block_pass, val[1])
949
- }
950
-
951
- opt_block_arg: tCOMMA block_arg
952
- {
953
- result = val[1]
954
- }
955
- | none
956
-
957
- args: arg_value
958
- {
959
- result = s(:array, val[0])
960
- }
961
- | tSTAR arg_value
962
- {
963
- result = s(:array, s(:splat, val[1]))
964
- }
965
- | args tCOMMA arg_value
966
- {
967
- result = self.list_append val[0], val[2]
968
- }
969
- | args tCOMMA tSTAR arg_value
970
- {
971
- result = self.list_append val[0], s(:splat, val[3])
972
- }
973
-
974
- mrhs_arg: mrhs
975
- {
976
- result = new_masgn_arg val[0]
977
- }
978
- | arg_value
979
- {
980
- result = new_masgn_arg val[0], :wrap
981
- }
982
-
983
- mrhs: args tCOMMA arg_value
984
- {
985
- result = val[0] << val[2]
986
- }
987
- | args tCOMMA tSTAR arg_value
988
- {
989
- result = self.arg_concat val[0], val[3]
990
- }
991
- | tSTAR arg_value
992
- {
993
- result = s(:splat, val[1])
994
- }
995
-
996
- primary: literal
997
- | strings
998
- | xstring
999
- | regexp
1000
- | words
1001
- | qwords
1002
- | symbols
1003
- | qsymbols
1004
- | var_ref
1005
- | backref
1006
- | tFID
1007
- {
1008
- result = new_call nil, val[0].to_sym
1009
- }
1010
- | k_begin
1011
- {
1012
- result = self.lexer.lineno
1013
- # TODO:
1014
- # $<val>1 = cmdarg_stack;
1015
- # CMDARG_SET(0);
1016
- }
1017
- bodystmt k_end
1018
- {
1019
- # TODO: CMDARG_SET($<val>1);
1020
- unless val[2] then
1021
- result = s(:nil)
1022
- else
1023
- result = s(:begin, val[2])
1024
- end
1025
-
1026
- result.line = val[1]
1027
- }
1028
- | tLPAREN_ARG rparen
1029
- {
1030
- # TODO: lex_state = EXPR_ENDARG in between
1031
- debug20 13, val, result
1032
- }
1033
- | tLPAREN_ARG
1034
- {
1035
- result = lexer.cmdarg.store false
1036
- # result = self.lexer.cmdarg.stack.dup
1037
- # lexer.cmdarg.stack.replace [false] # TODO add api for these
1038
- }
1039
- stmt
1040
- {
1041
- lexer.lex_state = EXPR_ENDARG
1042
- }
1043
- rparen
1044
- {
1045
- _, cmdarg, stmt, _, _, = val
1046
- warning "(...) interpreted as grouped expression"
1047
- lexer.cmdarg.restore cmdarg
1048
- result = stmt
1049
- }
1050
- | tLPAREN compstmt tRPAREN
1051
- {
1052
- result = val[1] || s(:nil)
1053
- result.paren = true
1054
- }
1055
- | primary_value tCOLON2 tCONSTANT
1056
- {
1057
- result = s(:colon2, val[0], val[2].to_sym)
1058
- }
1059
- | tCOLON3 tCONSTANT
1060
- {
1061
- result = s(:colon3, val[1].to_sym)
1062
- }
1063
- | tLBRACK aref_args tRBRACK
1064
- {
1065
- result = val[1] || s(:array)
1066
- result.sexp_type = :array # aref_args is :args
1067
- }
1068
- | tLBRACE
1069
- {
1070
- result = self.lexer.lineno
1071
- }
1072
- assoc_list tRCURLY
1073
- {
1074
- result = new_hash val
1075
- }
1076
- | k_return
1077
- {
1078
- result = s(:return)
1079
- }
1080
- | kYIELD tLPAREN2 call_args rparen
1081
- {
1082
- result = new_yield val[2]
1083
- }
1084
- | kYIELD tLPAREN2 rparen
1085
- {
1086
- result = new_yield
1087
- }
1088
- | kYIELD
1089
- {
1090
- result = new_yield
1091
- }
1092
- | kDEFINED opt_nl tLPAREN2 expr rparen
1093
- {
1094
- result = s(:defined, val[3])
1095
- }
1096
- | kNOT tLPAREN2 expr rparen
1097
- {
1098
- result = s(:call, val[2], :"!")
1099
- }
1100
- | kNOT tLPAREN2 rparen
1101
- {
1102
- debug20 14, val, result
1103
- }
1104
- | fcall brace_block
1105
- {
1106
- oper, iter = val[0], val[1]
1107
- call = oper # FIX
1108
- iter.insert 1, call
1109
- result = iter
1110
- call.line = iter.line
1111
- }
1112
- | method_call
1113
- | method_call brace_block
1114
- {
1115
- call, iter = val[0], val[1]
1116
- block_dup_check call, iter
1117
- iter.insert 1, call # FIX
1118
- result = iter
1119
- }
1120
- | tLAMBDA lambda
1121
- {
1122
- result = val[1] # TODO: fix lineno
1123
- }
1124
- | k_if expr_value then compstmt if_tail k_end
1125
- {
1126
- _, c, _, t, f, _ = val
1127
- result = new_if c, t, f
1128
- }
1129
- | k_unless expr_value then compstmt opt_else k_end
1130
- {
1131
- _, c, _, t, f, _ = val
1132
- result = new_if c, f, t
1133
- }
1134
- | k_while expr_value_do compstmt k_end
1135
- {
1136
- _, cond, body, _ = val
1137
- result = new_while body, cond, true
1138
- }
1139
- | k_until expr_value_do compstmt k_end
1140
- {
1141
- _, cond, body, _ = val
1142
- result = new_until body, cond, true
1143
- }
1144
- | k_case expr_value opt_terms case_body k_end
1145
- {
1146
- (_, line), expr, _, body, _ = val
1147
- result = new_case expr, body, line
1148
- }
1149
- | k_case opt_terms case_body k_end
1150
- {
1151
- (_, line), _, body, _ = val
1152
- result = new_case nil, body, line
1153
- }
1154
- | k_for for_var kIN expr_value_do compstmt k_end
1155
- {
1156
- _, var, _, iter, body, _ = val
1157
- result = new_for iter, var, body
1158
- }
1159
- | k_class
1160
- {
1161
- result = self.lexer.lineno
1162
- }
1163
- cpath superclass
1164
- {
1165
- self.comments.push self.lexer.comments
1166
- if (self.in_def || self.in_single > 0) then
1167
- yyerror "class definition in method body"
1168
- end
1169
- self.env.extend
1170
- }
1171
- bodystmt k_end
1172
- {
1173
- result = new_class val
1174
- self.env.unextend
1175
- self.lexer.comments # we don't care about comments in the body
1176
- }
1177
- | k_class tLSHFT
1178
- {
1179
- result = self.lexer.lineno
1180
- }
1181
- expr
1182
- {
1183
- result = self.in_def
1184
- self.in_def = false
1185
- }
1186
- term
1187
- {
1188
- result = self.in_single
1189
- self.in_single = 0
1190
- self.env.extend
1191
- }
1192
- bodystmt k_end
1193
- {
1194
- result = new_sclass val
1195
- self.env.unextend
1196
- self.lexer.comments # we don't care about comments in the body
1197
- }
1198
- | k_module
1199
- {
1200
- result = self.lexer.lineno
1201
- }
1202
- cpath
1203
- {
1204
- self.comments.push self.lexer.comments
1205
- yyerror "module definition in method body" if
1206
- self.in_def or self.in_single > 0
1207
-
1208
- self.env.extend
1209
- }
1210
- bodystmt k_end
1211
- {
1212
- result = new_module val
1213
- self.env.unextend
1214
- self.lexer.comments # we don't care about comments in the body
1215
- }
1216
- | k_def fname
1217
- {
1218
- result = [self.in_def, self.lexer.cmdarg.stack.dup]
1219
-
1220
- self.comments.push self.lexer.comments
1221
- self.in_def = true
1222
- self.env.extend
1223
- # TODO: local->cmdargs = cmdarg_stack;
1224
- # TODO: port local_push_gen and local_pop_gen
1225
- lexer.cmdarg.stack.replace [false]
1226
- }
1227
- f_arglist bodystmt k_end
1228
- {
1229
- in_def, cmdarg = val[2]
1230
-
1231
- result = new_defn val
1232
-
1233
- lexer.cmdarg.stack.replace cmdarg
1234
- self.env.unextend
1235
- self.in_def = in_def
1236
- self.lexer.comments # we don't care about comments in the body
1237
- }
1238
- | k_def singleton dot_or_colon
1239
- {
1240
- self.comments.push self.lexer.comments
1241
- lexer.lex_state = EXPR_FNAME
1242
- }
1243
- fname
1244
- {
1245
- self.in_single += 1
1246
- self.env.extend
1247
- lexer.lex_state = EXPR_ENDFN # force for args
1248
- result = [lexer.lineno, self.lexer.cmdarg.stack.dup]
1249
- lexer.cmdarg.stack.replace [false]
1250
- }
1251
- f_arglist bodystmt k_end
1252
- {
1253
- line, cmdarg = val[5]
1254
- result = new_defs val
1255
- result[3].line line
1256
-
1257
- lexer.cmdarg.stack.replace cmdarg
1258
-
1259
- self.env.unextend
1260
- self.in_single -= 1
1261
- self.lexer.comments # we don't care about comments in the body
1262
- }
1263
- | kBREAK
1264
- {
1265
- result = s(:break)
1266
- }
1267
- | kNEXT
1268
- {
1269
- result = s(:next)
1270
- }
1271
- | kREDO
1272
- {
1273
- result = s(:redo)
1274
- }
1275
- | kRETRY
1276
- {
1277
- result = s(:retry)
1278
- }
1279
-
1280
- primary_value: primary
1281
- {
1282
- result = value_expr(val[0])
1283
- }
1284
-
1285
- # These are really stupid
1286
- k_begin: kBEGIN
1287
- k_if: kIF
1288
- k_unless: kUNLESS
1289
- k_while: kWHILE
1290
- k_until: kUNTIL
1291
- k_case: kCASE
1292
- k_for: kFOR
1293
- k_class: kCLASS
1294
- k_module: kMODULE
1295
- k_def: kDEF
1296
- k_do: kDO
1297
- k_do_block: kDO_BLOCK
1298
- k_rescue: kRESCUE
1299
- k_ensure: kENSURE
1300
- k_when: kWHEN
1301
- k_else: kELSE
1302
- k_elsif: kELSIF
1303
- k_end: kEND
1304
- k_return: kRETURN
1305
-
1306
- then: term
1307
- | kTHEN
1308
- | term kTHEN
1309
-
1310
- do: term
1311
- | kDO_COND
1312
-
1313
- if_tail: opt_else
1314
- | k_elsif expr_value then compstmt if_tail
1315
- {
1316
- result = s(:if, val[1], val[3], val[4])
1317
- }
1318
-
1319
- opt_else: none
1320
- | kELSE compstmt
1321
- {
1322
- result = val[1]
1323
- }
1324
-
1325
- for_var: lhs
1326
- | mlhs
1327
- {
1328
- val[0].delete_at 1 if val[0][1].nil? # HACK
1329
- }
1330
-
1331
- f_marg: f_norm_arg
1332
- | tLPAREN f_margs rparen
1333
- {
1334
- result = val[1]
1335
- }
1336
-
1337
- f_marg_list: f_marg
1338
- {
1339
- result = s(:array, val[0])
1340
- }
1341
- | f_marg_list tCOMMA f_marg
1342
- {
1343
- result = list_append val[0], val[2]
1344
- }
1345
-
1346
- f_margs: f_marg_list
1347
- {
1348
- args, = val
1349
-
1350
- result = block_var args
1351
- }
1352
- | f_marg_list tCOMMA tSTAR f_norm_arg
1353
- {
1354
- args, _, _, splat = val
1355
-
1356
- result = block_var args, "*#{splat}".to_sym
1357
- }
1358
- | f_marg_list tCOMMA tSTAR f_norm_arg tCOMMA f_marg_list
1359
- {
1360
- args, _, _, splat, _, args2 = val
1361
-
1362
- result = block_var args, "*#{splat}".to_sym, args2
1363
- }
1364
- | f_marg_list tCOMMA tSTAR
1365
- {
1366
- args, _, _ = val
1367
-
1368
- result = block_var args, :*
1369
- }
1370
- | f_marg_list tCOMMA tSTAR tCOMMA f_marg_list
1371
- {
1372
- args, _, _, _, args2 = val
1373
-
1374
- result = block_var args, :*, args2
1375
- }
1376
- | tSTAR f_norm_arg
1377
- {
1378
- _, splat = val
1379
-
1380
- result = block_var :"*#{splat}"
1381
- }
1382
- | tSTAR f_norm_arg tCOMMA f_marg_list
1383
- {
1384
- _, splat, _, args = val
1385
-
1386
- result = block_var :"*#{splat}", args
1387
- }
1388
- | tSTAR
1389
- {
1390
- result = block_var :*
1391
- }
1392
- | tSTAR tCOMMA f_marg_list
1393
- {
1394
- _, _, args = val
1395
-
1396
- result = block_var :*, args
1397
- }
1398
-
1399
- block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg
1400
- {
1401
- result = call_args val
1402
- }
1403
- | f_block_kwarg opt_f_block_arg
1404
- {
1405
- result = call_args val
1406
- }
1407
- | f_kwrest opt_f_block_arg
1408
- {
1409
- result = call_args val
1410
- }
1411
- | f_block_arg
1412
- {
1413
- result = call_args val
1414
- }
1415
-
1416
- opt_block_args_tail: tCOMMA block_args_tail
1417
- {
1418
- result = args val
1419
- }
1420
- | none
1421
-
1422
- block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail
1423
- {
1424
- result = args val
1425
- }
1426
- | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail
1427
- {
1428
- result = args val
1429
- }
1430
- | f_arg tCOMMA f_block_optarg opt_block_args_tail
1431
- {
1432
- result = args val
1433
- }
1434
- | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_block_args_tail
1435
- {
1436
- result = args val
1437
- }
1438
- | f_arg tCOMMA f_rest_arg opt_block_args_tail
1439
- {
1440
- result = args val
1441
- }
1442
- | f_arg tCOMMA
1443
- {
1444
- result = args val
1445
- }
1446
- | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail
1447
- {
1448
- result = args val
1449
- }
1450
- | f_arg opt_block_args_tail
1451
- {
1452
- result = args val
1453
- }
1454
- | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail
1455
- {
1456
- result = args val
1457
- }
1458
- | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail
1459
- {
1460
- result = args val
1461
- }
1462
- | f_block_optarg opt_block_args_tail
1463
- {
1464
- result = args val
1465
- }
1466
- | f_block_optarg tCOMMA f_arg opt_block_args_tail
1467
- {
1468
- result = args val
1469
- }
1470
- | f_rest_arg opt_block_args_tail
1471
- {
1472
- result = args val
1473
- }
1474
- | f_rest_arg tCOMMA f_arg opt_block_args_tail
1475
- {
1476
- result = args val
1477
- }
1478
- | block_args_tail
1479
- {
1480
- result = args val
1481
- }
1482
-
1483
- opt_block_param: none { result = 0 }
1484
- | block_param_def
1485
- {
1486
- self.lexer.command_start = true
1487
- }
1488
-
1489
- block_param_def: tPIPE opt_bv_decl tPIPE
1490
- {
1491
- # TODO: current_arg = 0
1492
- result = args val
1493
- }
1494
- | tOROP
1495
- {
1496
- result = s(:args)
1497
- }
1498
- | tPIPE block_param opt_bv_decl tPIPE
1499
- {
1500
- # TODO: current_arg = 0
1501
- result = args val
1502
- }
1503
-
1504
- opt_bv_decl: opt_nl
1505
- | opt_nl tSEMI bv_decls opt_nl
1506
- {
1507
- result = args val
1508
- }
1509
-
1510
- bv_decls: bvar
1511
- {
1512
- result = args val
1513
- }
1514
- | bv_decls tCOMMA bvar
1515
- {
1516
- result = args val
1517
- }
1518
-
1519
- bvar: tIDENTIFIER
1520
- {
1521
- result = s(:shadow, val[0].to_sym)
1522
- }
1523
- | f_bad_arg
1524
-
1525
- lambda: {
1526
- self.env.extend :dynamic
1527
- result = self.lexer.lineno
1528
-
1529
- result = lexer.lpar_beg
1530
- lexer.paren_nest += 1
1531
- lexer.lpar_beg = lexer.paren_nest
1532
- }
1533
- f_larglist
1534
- {
1535
- result = [lexer.cmdarg.store(false), self.lexer.lineno]
1536
- }
1537
- lambda_body
1538
- {
1539
- lpar, args, (cmdarg, lineno), body = val
1540
- lexer.lpar_beg = lpar
1541
-
1542
- lexer.cmdarg.restore cmdarg
1543
- lexer.cmdarg.lexpop
1544
-
1545
- call = new_call nil, :lambda
1546
- result = new_iter call, args, body
1547
- result.line = lineno
1548
- self.env.unextend
1549
- }
1550
-
1551
- f_larglist: tLPAREN2 f_args opt_bv_decl rparen
1552
- {
1553
- result = args val
1554
- }
1555
- | f_args
1556
- {
1557
- result = val[0]
1558
- result = 0 if result == s(:args)
1559
- }
1560
-
1561
- lambda_body: tLAMBEG compstmt tRCURLY
1562
- {
1563
- result = val[1]
1564
- }
1565
- | kDO_LAMBDA bodystmt kEND
1566
- {
1567
- result = val[1]
1568
- }
1569
-
1570
- do_block: k_do_block do_body kEND
1571
- {
1572
- # TODO: maybe fix lineno to kDO's lineno?
1573
- result = val[1]
1574
- }
1575
-
1576
- block_call: command do_block
1577
- {
1578
- # TODO:
1579
- ## if (nd_type($1) == NODE_YIELD) {
1580
- ## compile_error(PARSER_ARG "block given to yield");
1581
-
1582
- syntax_error "Both block arg and actual block given." if
1583
- val[0].block_pass?
1584
-
1585
- val = invert_block_call val if inverted? val
1586
-
1587
- result = val[1]
1588
- result.insert 1, val[0]
1589
- }
1590
- | block_call call_op2 operation2 opt_paren_args
1591
- {
1592
- result = new_call val[0], val[2].to_sym, val[3]
1593
- }
1594
- | block_call call_op2 operation2 opt_paren_args brace_block
1595
- {
1596
- iter1, _, name, args, iter2 = val
1597
-
1598
- call = new_call iter1, name.to_sym, args
1599
- iter2.insert 1, call
1600
-
1601
- result = iter2
1602
- }
1603
- | block_call call_op2 operation2 command_args do_block
1604
- {
1605
- iter1, _, name, args, iter2 = val
1606
-
1607
- call = new_call iter1, name.to_sym, args
1608
- iter2.insert 1, call
1609
-
1610
- result = iter2
1611
- }
1612
-
1613
- method_call: fcall
1614
- {
1615
- result = self.lexer.lineno
1616
- }
1617
- paren_args
1618
- {
1619
- args = self.call_args val[2..-1]
1620
- result = val[0].concat args.sexp_body
1621
- }
1622
- | primary_value call_op operation2 opt_paren_args
1623
- {
1624
- result = new_call val[0], val[2].to_sym, val[3], val[1]
1625
- }
1626
- | primary_value tCOLON2 operation2 paren_args
1627
- {
1628
- result = new_call val[0], val[2].to_sym, val[3]
1629
- }
1630
- | primary_value tCOLON2 operation3
1631
- {
1632
- result = new_call val[0], val[2].to_sym
1633
- }
1634
- | primary_value call_op paren_args
1635
- {
1636
- result = new_call val[0], :call, val[2], val[1]
1637
- }
1638
- | primary_value tCOLON2 paren_args
1639
- {
1640
- result = new_call val[0], :call, val[2]
1641
- }
1642
- | kSUPER paren_args
1643
- {
1644
- result = new_super val[1]
1645
- }
1646
- | kSUPER
1647
- {
1648
- result = s(:zsuper)
1649
- }
1650
- | primary_value tLBRACK2 opt_call_args rbracket
1651
- {
1652
- result = new_aref val
1653
- }
1654
-
1655
- brace_block: tLCURLY
1656
- {
1657
- self.env.extend :dynamic
1658
- result = self.lexer.lineno
1659
- }
1660
- brace_body tRCURLY
1661
- {
1662
- _, line, body, _ = val
1663
-
1664
- result = body
1665
- result.line = line
1666
-
1667
- self.env.unextend
1668
- }
1669
- | k_do
1670
- {
1671
- self.env.extend :dynamic
1672
- result = self.lexer.lineno
1673
- }
1674
- do_body kEND
1675
- {
1676
- _, line, body, _ = val
1677
-
1678
- result = body
1679
- result.line = line
1680
-
1681
- self.env.unextend
1682
- }
1683
-
1684
- brace_body: { self.env.extend :dynamic; result = self.lexer.lineno }
1685
- { result = lexer.cmdarg.store(false) }
1686
- opt_block_param compstmt
1687
- {
1688
- line, cmdarg, param, cmpstmt = val
1689
-
1690
- result = new_brace_body param, cmpstmt, line
1691
- self.env.unextend
1692
- lexer.cmdarg.restore cmdarg
1693
- lexer.cmdarg.pop # because of: cmdarg_stack >> 1 ?
1694
- }
1695
-
1696
- do_body: { self.env.extend :dynamic; result = self.lexer.lineno }
1697
- { result = lexer.cmdarg.store(false) }
1698
- opt_block_param
1699
- compstmt
1700
- {
1701
- line, cmdarg, param, cmpstmt = val
1702
-
1703
- result = new_do_body param, cmpstmt, line
1704
- self.env.unextend
1705
- lexer.cmdarg.restore cmdarg
1706
- }
1707
-
1708
- case_body: k_when
1709
- {
1710
- result = self.lexer.lineno
1711
- }
1712
- args then compstmt cases
1713
- {
1714
- result = new_when(val[2], val[4])
1715
- result.line = val[1]
1716
- result << val[5] if val[5]
1717
- }
1718
-
1719
- cases: opt_else | case_body
1720
-
1721
- opt_rescue: k_rescue exc_list exc_var then compstmt opt_rescue
1722
- {
1723
- (_, line), klasses, var, _, body, rest = val
1724
-
1725
- klasses ||= s(:array)
1726
- klasses << new_assign(var, s(:gvar, :"$!")) if var
1727
- klasses.line line
1728
-
1729
- result = new_resbody(klasses, body)
1730
- result << rest if rest # UGH, rewritten above
1731
- }
1732
- |
1733
- {
1734
- result = nil
1735
- }
1736
-
1737
- exc_list: arg_value
1738
- {
1739
- result = s(:array, val[0])
1740
- }
1741
- | mrhs
1742
- | none
1743
-
1744
- exc_var: tASSOC lhs
1745
- {
1746
- result = val[1]
1747
- }
1748
- | none
1749
-
1750
- opt_ensure: k_ensure compstmt
1751
- {
1752
- _, body = val
1753
-
1754
- result = body || s(:nil)
1755
- }
1756
- | none
1757
-
1758
- literal: numeric
1759
- {
1760
- result = s(:lit, val[0])
1761
- }
1762
- | symbol
1763
- {
1764
- result = s(:lit, val[0])
1765
- }
1766
- | dsym
1767
-
1768
- strings: string
1769
- {
1770
- val[0] = s(:dstr, val[0].value) if val[0].sexp_type == :evstr
1771
- result = val[0]
1772
- }
1773
-
1774
- string: tCHAR
1775
- {
1776
- debug20 23, val, result
1777
- }
1778
- | string1
1779
- | string string1
1780
- {
1781
- result = self.literal_concat val[0], val[1]
1782
- }
1783
-
1784
- string1: tSTRING_BEG string_contents tSTRING_END
1785
- {
1786
- result = val[1]
1787
- }
1788
- | tSTRING
1789
- {
1790
- result = new_string val
1791
- }
1792
-
1793
- xstring: tXSTRING_BEG xstring_contents tSTRING_END
1794
- {
1795
- result = new_xstring val[1]
1796
- }
1797
-
1798
- regexp: tREGEXP_BEG regexp_contents tREGEXP_END
1799
- {
1800
- result = new_regexp val
1801
- }
1802
-
1803
- words: tWORDS_BEG tSPACE tSTRING_END
1804
- {
1805
- result = s(:array)
1806
- }
1807
- | tWORDS_BEG word_list tSTRING_END
1808
- {
1809
- result = val[1]
1810
- }
1811
-
1812
- word_list: none
1813
- {
1814
- result = new_word_list
1815
- }
1816
- | word_list word tSPACE
1817
- {
1818
- result = val[0].dup << new_word_list_entry(val)
1819
- }
1820
-
1821
- word: string_content
1822
- | word string_content
1823
- {
1824
- result = self.literal_concat val[0], val[1]
1825
- }
1826
-
1827
- symbols: tSYMBOLS_BEG tSPACE tSTRING_END
1828
- {
1829
- result = s(:array)
1830
- }
1831
- | tSYMBOLS_BEG symbol_list tSTRING_END
1832
- {
1833
- result = val[1]
1834
- }
1835
-
1836
- symbol_list: none
1837
- {
1838
- result = new_symbol_list
1839
- }
1840
- | symbol_list word tSPACE
1841
- {
1842
- result = val[0].dup << new_symbol_list_entry(val)
1843
- }
1844
-
1845
- qwords: tQWORDS_BEG tSPACE tSTRING_END
1846
- {
1847
- result = s(:array)
1848
- }
1849
- | tQWORDS_BEG qword_list tSTRING_END
1850
- {
1851
- result = val[1]
1852
- }
1853
-
1854
- qsymbols: tQSYMBOLS_BEG tSPACE tSTRING_END
1855
- {
1856
- result = s(:array)
1857
- }
1858
- | tQSYMBOLS_BEG qsym_list tSTRING_END
1859
- {
1860
- result = val[1]
1861
- }
1862
-
1863
- qword_list: none
1864
- {
1865
- result = new_qword_list
1866
- }
1867
- | qword_list tSTRING_CONTENT tSPACE
1868
- {
1869
- result = val[0].dup << new_qword_list_entry(val)
1870
- }
1871
-
1872
- qsym_list: none
1873
- {
1874
- result = new_qsym_list
1875
- }
1876
- | qsym_list tSTRING_CONTENT tSPACE
1877
- {
1878
- result = val[0].dup << new_qsym_list_entry(val)
1879
- }
1880
-
1881
- string_contents: none
1882
- {
1883
- result = s(:str, "")
1884
- }
1885
- | string_contents string_content
1886
- {
1887
- result = literal_concat(val[0], val[1])
1888
- }
1889
-
1890
- xstring_contents: none
1891
- {
1892
- result = nil
1893
- }
1894
- | xstring_contents string_content
1895
- {
1896
- result = literal_concat(val[0], val[1])
1897
- }
1898
-
1899
- regexp_contents: none
1900
- {
1901
- result = nil
1902
- }
1903
- | regexp_contents string_content
1904
- {
1905
- result = literal_concat(val[0], val[1])
1906
- }
1907
-
1908
- string_content: tSTRING_CONTENT
1909
- {
1910
- result = new_string val
1911
- }
1912
- | tSTRING_DVAR
1913
- {
1914
- result = lexer.lex_strterm
1915
-
1916
- lexer.lex_strterm = nil
1917
- lexer.lex_state = EXPR_BEG
1918
- }
1919
- string_dvar
1920
- {
1921
- lexer.lex_strterm = val[1]
1922
- result = s(:evstr, val[2])
1923
- }
1924
- | tSTRING_DBEG
1925
- {
1926
- result = [lexer.lex_strterm,
1927
- lexer.brace_nest,
1928
- lexer.string_nest, # TODO: remove
1929
- lexer.cond.store,
1930
- lexer.cmdarg.store,
1931
- lexer.lex_state,
1932
- ]
1933
-
1934
- lexer.lex_strterm = nil
1935
- lexer.brace_nest = 0
1936
- lexer.string_nest = 0
1937
-
1938
- lexer.lex_state = EXPR_BEG
1939
- }
1940
- compstmt
1941
- tSTRING_DEND
1942
- {
1943
- _, memo, stmt, _ = val
1944
-
1945
- lex_strterm, brace_nest, string_nest, oldcond, oldcmdarg, oldlex_state = memo
1946
-
1947
- lexer.lex_strterm = lex_strterm
1948
- lexer.brace_nest = brace_nest
1949
- lexer.string_nest = string_nest
1950
-
1951
- lexer.cond.restore oldcond
1952
- lexer.cmdarg.restore oldcmdarg
1953
-
1954
- lexer.lex_state = oldlex_state
1955
-
1956
- case stmt
1957
- when Sexp then
1958
- case stmt.sexp_type
1959
- when :str, :dstr, :evstr then
1960
- result = stmt
1961
- else
1962
- result = s(:evstr, stmt)
1963
- end
1964
- when nil then
1965
- result = s(:evstr)
1966
- else
1967
- debug20 25
1968
- raise "unknown string body: #{stmt.inspect}"
1969
- end
1970
- }
1971
-
1972
- string_dvar: tGVAR { result = s(:gvar, val[0].to_sym) }
1973
- | tIVAR { result = s(:ivar, val[0].to_sym) }
1974
- | tCVAR { result = s(:cvar, val[0].to_sym) }
1975
- | backref
1976
-
1977
- symbol: tSYMBEG sym
1978
- {
1979
- lexer.lex_state = EXPR_END
1980
- result = val[1].to_sym
1981
- }
1982
- | tSYMBOL
1983
- {
1984
- result = val[0].to_sym
1985
- }
1986
-
1987
- sym: fname | tIVAR | tGVAR | tCVAR
1988
-
1989
- dsym: tSYMBEG xstring_contents tSTRING_END
1990
- {
1991
- lexer.lex_state = EXPR_END
1992
- result = val[1]
1993
-
1994
- result ||= s(:str, "")
1995
-
1996
- case result.sexp_type
1997
- when :dstr then
1998
- result.sexp_type = :dsym
1999
- when :str then
2000
- result = s(:lit, result.last.to_sym)
2001
- when :evstr then
2002
- result = s(:dsym, "", result)
2003
- else
2004
- debug20 26, val, result
2005
- end
2006
- }
2007
-
2008
- numeric: simple_numeric
2009
- | tUMINUS_NUM simple_numeric
2010
- {
2011
- result = -val[1] # TODO: pt_testcase
2012
- }
2013
-
2014
- simple_numeric: tINTEGER
2015
- | tFLOAT
2016
- | tRATIONAL
2017
- | tIMAGINARY
2018
-
2019
- user_variable: tIDENTIFIER
2020
- | tIVAR
2021
- | tGVAR
2022
- | tCONSTANT
2023
- | tCVAR
2024
-
2025
- keyword_variable: kNIL { result = s(:nil) }
2026
- | kSELF { result = s(:self) }
2027
- | kTRUE { result = s(:true) }
2028
- | kFALSE { result = s(:false) }
2029
- | k__FILE__ { result = s(:str, self.file) }
2030
- | k__LINE__ { result = s(:lit, lexer.lineno) }
2031
- | k__ENCODING__
2032
- {
2033
- result =
2034
- if defined? Encoding then
2035
- s(:colon2, s(:const, :Encoding), :UTF_8)
2036
- else
2037
- s(:str, "Unsupported!")
2038
- end
2039
- }
2040
-
2041
- var_ref: user_variable
2042
- {
2043
- var = val[0]
2044
- result = Sexp === var ? var : self.gettable(var)
2045
- }
2046
- | keyword_variable
2047
- {
2048
- var = val[0]
2049
- result = Sexp === var ? var : self.gettable(var)
2050
- }
2051
-
2052
- var_lhs: user_variable
2053
- {
2054
- result = self.assignable val[0]
2055
- }
2056
- | keyword_variable
2057
- {
2058
- result = self.assignable val[0]
2059
- debug20 29, val, result
2060
- }
2061
-
2062
- backref: tNTH_REF { result = s(:nth_ref, val[0]) }
2063
- | tBACK_REF { result = s(:back_ref, val[0]) }
2064
-
2065
- superclass: tLT
2066
- {
2067
- lexer.lex_state = EXPR_BEG
2068
- lexer.command_start = true
2069
- }
2070
- expr_value term
2071
- {
2072
- result = val[2]
2073
- }
2074
- | none
2075
- {
2076
- result = nil
2077
- }
2078
-
2079
- f_arglist: tLPAREN2 f_args rparen
2080
- {
2081
- result = val[1]
2082
- self.lexer.lex_state = EXPR_BEG
2083
- self.lexer.command_start = true
2084
- }
2085
- | {
2086
- result = self.in_kwarg
2087
- self.in_kwarg = true
2088
- self.lexer.lex_state |= EXPR_LABEL
2089
- }
2090
- f_args term
2091
- {
2092
- kwarg, args, _ = val
2093
-
2094
- self.in_kwarg = kwarg
2095
- result = args
2096
- lexer.lex_state = EXPR_BEG
2097
- lexer.command_start = true
2098
- }
2099
-
2100
- args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg
2101
- {
2102
- result = args val
2103
- }
2104
- | f_kwarg opt_f_block_arg
2105
- {
2106
- result = args val
2107
- }
2108
- | f_kwrest opt_f_block_arg
2109
- {
2110
- result = args val
2111
- }
2112
- | f_block_arg
2113
-
2114
- opt_args_tail: tCOMMA args_tail
2115
- {
2116
- result = val[1]
2117
- }
2118
- |
2119
- {
2120
- result = nil
2121
- }
2122
-
2123
- f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail
2124
- {
2125
- result = args val
2126
- }
2127
- | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail
2128
- {
2129
- result = args val
2130
- }
2131
- | f_arg tCOMMA f_optarg opt_args_tail
2132
- {
2133
- result = args val
2134
- }
2135
- | f_arg tCOMMA f_optarg tCOMMA f_arg opt_args_tail
2136
- {
2137
- result = args val
2138
- }
2139
- | f_arg tCOMMA f_rest_arg opt_args_tail
2140
- {
2141
- result = args val
2142
- }
2143
- | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail
2144
- {
2145
- result = args val
2146
- }
2147
- | f_arg opt_args_tail
2148
- {
2149
- result = args val
2150
- }
2151
- | f_optarg tCOMMA f_rest_arg opt_args_tail
2152
- {
2153
- result = args val
2154
- }
2155
- | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail
2156
- {
2157
- result = args val
2158
- }
2159
- | f_optarg opt_args_tail
2160
- {
2161
- result = args val
2162
- }
2163
- | f_optarg tCOMMA f_arg opt_args_tail
2164
- {
2165
- result = args val
2166
- }
2167
- | f_rest_arg opt_args_tail
2168
- {
2169
- result = args val
2170
- }
2171
- | f_rest_arg tCOMMA f_arg opt_args_tail
2172
- {
2173
- result = args val
2174
- }
2175
- | args_tail
2176
- {
2177
- result = args val
2178
- }
2179
- |
2180
- {
2181
- result = args val
2182
- }
2183
-
2184
- f_bad_arg: tCONSTANT
2185
- {
2186
- yyerror "formal argument cannot be a constant"
2187
- }
2188
- | tIVAR
2189
- {
2190
- yyerror "formal argument cannot be an instance variable"
2191
- }
2192
- | tGVAR
2193
- {
2194
- yyerror "formal argument cannot be a global variable"
2195
- }
2196
- | tCVAR
2197
- {
2198
- yyerror "formal argument cannot be a class variable"
2199
- }
2200
-
2201
- f_norm_arg: f_bad_arg
2202
- | tIDENTIFIER
2203
- {
2204
- identifier = val[0].to_sym
2205
- self.env[identifier] = :lvar
2206
-
2207
- result = identifier
2208
- }
2209
-
2210
- f_arg_asgn: f_norm_arg
2211
-
2212
- f_arg_item: f_arg_asgn
2213
- | tLPAREN f_margs rparen
2214
- {
2215
- result = val[1]
2216
- }
2217
-
2218
- f_arg: f_arg_item
2219
- {
2220
- case val[0]
2221
- when Symbol then
2222
- result = s(:args)
2223
- result << val[0]
2224
- when Sexp then
2225
- result = val[0]
2226
- else
2227
- debug20 32
2228
- raise "Unknown f_arg type: #{val.inspect}"
2229
- end
2230
- }
2231
- | f_arg tCOMMA f_arg_item
2232
- {
2233
- list, _, item = val
2234
-
2235
- if list.sexp_type == :args then
2236
- result = list
2237
- else
2238
- result = s(:args, list)
2239
- end
2240
-
2241
- result << item
2242
- }
2243
-
2244
- f_label: tLABEL
2245
-
2246
- f_kw: f_label arg_value
2247
- {
2248
- # TODO: call_args
2249
- label, _ = val[0] # TODO: fix lineno?
2250
- identifier = label.to_sym
2251
- self.env[identifier] = :lvar
2252
-
2253
- result = s(:array, s(:kwarg, identifier, val[1]))
2254
- }
2255
- | f_label
2256
- {
2257
- label, _ = val[0] # TODO: fix lineno?
2258
- identifier = label.to_sym
2259
- self.env[identifier] = :lvar
2260
-
2261
- result = s(:array, s(:kwarg, identifier))
2262
- }
2263
-
2264
- f_block_kw: f_label primary_value
2265
- {
2266
- # TODO: call_args
2267
- label, _ = val[0] # TODO: fix lineno?
2268
- identifier = label.to_sym
2269
- self.env[identifier] = :lvar
2270
-
2271
- result = s(:array, s(:kwarg, identifier, val[1]))
2272
- }
2273
- | f_label
2274
- {
2275
- label, _ = val[0] # TODO: fix lineno?
2276
- identifier = label.to_sym
2277
- self.env[identifier] = :lvar
2278
-
2279
- result = s(:array, s(:kwarg, identifier))
2280
- }
2281
-
2282
- f_block_kwarg: f_block_kw
2283
- | f_block_kwarg tCOMMA f_block_kw
2284
- {
2285
- list, _, item = val
2286
- result = list << item.last
2287
- }
2288
-
2289
- f_kwarg: f_kw
2290
- | f_kwarg tCOMMA f_kw
2291
- {
2292
- result = args val
2293
- }
2294
-
2295
- kwrest_mark: tPOW
2296
- | tDSTAR
2297
-
2298
- f_kwrest: kwrest_mark tIDENTIFIER
2299
- {
2300
- name = val[1].to_sym
2301
- self.assignable name
2302
- result = :"**#{name}"
2303
- }
2304
- | kwrest_mark
2305
- {
2306
- result = :"**"
2307
- }
2308
-
2309
- f_opt: f_arg_asgn tEQL arg_value
2310
- {
2311
- result = self.assignable val[0], val[2]
2312
- # TODO: detect duplicate names
2313
- }
2314
-
2315
- f_block_opt: f_arg_asgn tEQL primary_value
2316
- {
2317
- result = self.assignable val[0], val[2]
2318
- }
2319
-
2320
- f_block_optarg: f_block_opt
2321
- {
2322
- result = s(:block, val[0])
2323
- }
2324
- | f_block_optarg tCOMMA f_block_opt
2325
- {
2326
- result = val[0]
2327
- result << val[2]
2328
- }
2329
-
2330
- f_optarg: f_opt
2331
- {
2332
- result = s(:block, val[0])
2333
- }
2334
- | f_optarg tCOMMA f_opt
2335
- {
2336
- result = self.block_append val[0], val[2]
2337
- }
2338
-
2339
- restarg_mark: tSTAR2 | tSTAR
2340
-
2341
- f_rest_arg: restarg_mark tIDENTIFIER
2342
- {
2343
- # TODO: differs from parse.y - needs tests
2344
- name = val[1].to_sym
2345
- self.assignable name
2346
- result = :"*#{name}"
2347
- }
2348
- | restarg_mark
2349
- {
2350
- name = :"*"
2351
- self.env[name] = :lvar
2352
- result = name
2353
- }
2354
-
2355
- blkarg_mark: tAMPER2 | tAMPER
2356
-
2357
- f_block_arg: blkarg_mark tIDENTIFIER
2358
- {
2359
- identifier = val[1].to_sym
2360
-
2361
- self.env[identifier] = :lvar
2362
- result = "&#{identifier}".to_sym
2363
- }
2364
-
2365
- opt_f_block_arg: tCOMMA f_block_arg
2366
- {
2367
- result = val[1]
2368
- }
2369
- |
2370
- {
2371
- result = nil
2372
- }
2373
-
2374
- singleton: var_ref
2375
- | tLPAREN2
2376
- {
2377
- lexer.lex_state = EXPR_BEG
2378
- }
2379
- expr rparen
2380
- {
2381
- result = val[2]
2382
- yyerror "Can't define single method for literals." if
2383
- result.sexp_type == :lit
2384
- }
2385
-
2386
- assoc_list: none # [!nil]
2387
- {
2388
- result = s(:array)
2389
- }
2390
- | assocs trailer # [!nil]
2391
- {
2392
- result = val[0]
2393
- }
2394
-
2395
- assocs: assoc
2396
- | assocs tCOMMA assoc
2397
- {
2398
- list = val[0].dup
2399
- more = val[2].sexp_body
2400
- list.push(*more) unless more.empty?
2401
- result = list
2402
- result.sexp_type = :hash
2403
- }
2404
-
2405
- assoc: arg_value tASSOC arg_value
2406
- {
2407
- result = s(:array, val[0], val[2])
2408
- }
2409
- | tLABEL arg_value
2410
- {
2411
- (label, _), arg = val
2412
- result = s(:array, s(:lit, label.to_sym), arg)
2413
- }
2414
- | tSTRING_BEG string_contents tLABEL_END arg_value
2415
- {
2416
- _, sym, _, value = val
2417
- sym.sexp_type = :dsym
2418
- result = s(:array, sym, value)
2419
- }
2420
- | tDSTAR arg_value
2421
- {
2422
- result = s(:array, s(:kwsplat, val[1]))
2423
- }
2424
-
2425
- operation: tIDENTIFIER | tCONSTANT | tFID
2426
- operation2: tIDENTIFIER | tCONSTANT | tFID | op
2427
- operation3: tIDENTIFIER | tFID | op
2428
- dot_or_colon: tDOT | tCOLON2
2429
- call_op: tDOT
2430
- | tLONELY # TODO: rename tANDDOT?
2431
-
2432
- call_op2: call_op
2433
- | tCOLON2
2434
-
2435
- opt_terms: | terms
2436
- opt_nl: | tNL
2437
- rparen: opt_nl tRPAREN
2438
- rbracket: opt_nl tRBRACK
2439
- trailer: | tNL | tCOMMA
2440
-
2441
- term: tSEMI { yyerrok }
2442
- | tNL
2443
-
2444
- terms: term
2445
- | terms tSEMI { yyerrok }
2446
-
2447
- none: { result = nil; }
2448
- end
2449
-
2450
- ---- inner
2451
-
2452
- require "ruby_lexer"
2453
- require "ruby_parser_extras"
2454
- include RubyLexer::State::Values
2455
-
2456
- # :stopdoc:
2457
-
2458
- # Local Variables: **
2459
- # racc-token-length-max:14 **
2460
- # End: **