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