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