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