brakeman 4.4.0 → 5.0.0

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