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