brakeman 4.7.2 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +155 -1
- data/README.md +23 -6
- data/bundle/load.rb +15 -13
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/README.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/erubis-2.7.0/setup.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/CHANGELOG.md +24 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/FAQ.md +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/Gemfile +1 -4
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/MIT-LICENSE +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/README.md +21 -16
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/REFERENCE.md +39 -10
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/TODO +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/haml.gemspec +2 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/attribute_builder.rb +58 -3
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/attribute_compiler.rb +45 -32
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/attribute_parser.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/buffer.rb +0 -56
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/compiler.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/engine.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/error.rb +0 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/escapable.rb +77 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/exec.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/filters.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/generator.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_extensions.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_mods.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/action_view_xss_mods.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/safe_erubi_template.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/safe_erubis_template.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers/xss_mods.rb +6 -3
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/helpers.rb +7 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/options.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/parser.rb +32 -4
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/plugin.rb +18 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/railtie.rb +5 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/sass_rails_filter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/template/options.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/template.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/temple_engine.rb +2 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/temple_line_counter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/util.rb +1 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml/version.rb +1 -1
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/lib/haml.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/yard/default/fulldoc/html/css/common.sass +0 -0
- data/bundle/ruby/{2.6.0/gems/haml-5.1.2 → 2.7.0/gems/haml-5.2.2}/yard/default/layout/html/footer.erb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/AUTHORS +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/COPYING +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/Changelog.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/Gemfile +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/LICENSE +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/README.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/TODO +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/appveyor.yml +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/highline.gemspec +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/builtin_styles.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/color_scheme.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/compatibility.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/custom_errors.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/import.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/io_console_compatible.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/list.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/list_renderer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/menu/item.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/menu.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/paginator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/question/answer_converter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/question.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/question_asker.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/simulate.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/statement.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/string.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/string_extensions.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/style.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/template_renderer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal/io_console.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal/ncurses.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal/unix_stty.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/terminal.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/version.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline/wrapper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/highline-2.0.3/lib/highline.rb +0 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/MIT-LICENSE.txt +20 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/processor_count.rb +45 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel/version.rb +4 -0
- data/bundle/ruby/2.7.0/gems/parallel-1.21.0/lib/parallel.rb +532 -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.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/History.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/Manifest.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/README.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/History.rdoc +154 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/Manifest.txt +7 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/README.rdoc +1 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/compare/normalize.rb +51 -6
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/debugging.md +190 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/gauntlet.md +106 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/rp_extensions.rb +15 -36
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/rp_stringscanner.rb +33 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby20_parser.rb +7128 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby20_parser.y +422 -301
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby21_parser.rb +7182 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby21_parser.y +417 -298
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby22_parser.rb +7228 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby22_parser.y +421 -300
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby23_parser.rb +7237 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby23_parser.y +421 -300
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby24_parser.rb +7268 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby24_parser.y +421 -300
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby25_parser.rb +7268 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1/lib/ruby26_parser.y → 2.7.0/gems/ruby_parser-3.18.1/lib/ruby25_parser.y} +420 -313
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby26_parser.rb +7287 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1/lib/ruby_parser.yy → 2.7.0/gems/ruby_parser-3.18.1/lib/ruby26_parser.y} +421 -404
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby27_parser.rb +8517 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1/lib/ruby25_parser.y → 2.7.0/gems/ruby_parser-3.18.1/lib/ruby27_parser.y} +1032 -299
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.rb +8751 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby30_parser.y +3472 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby3_parser.yy +3476 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_lexer.rb +308 -605
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_lexer.rex +33 -27
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_lexer.rex.rb +65 -31
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby_lexer_strings.rb +638 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_parser.rb +4 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.18.1/lib/ruby_parser.yy +3487 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_parser_extras.rb +341 -133
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/tools/munge.rb +43 -10
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/tools/ripper.rb +15 -10
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -0
- data/bundle/ruby/{2.6.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.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -0
- data/bundle/ruby/{2.6.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.6.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/CHANGES.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/Gemfile +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/LICENSE.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/README.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/History.rdoc +55 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/Manifest.txt +0 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/README.rdoc +0 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/composite_sexp_processor.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/pt_testcase.rb +9 -4
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/sexp.rb +19 -9
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/sexp_matcher.rb +44 -7
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/strict_sexp.rb +25 -3
- data/bundle/ruby/{2.6.0/gems/sexp_processor-4.13.0 → 2.7.0/gems/sexp_processor-4.16.0}/lib/unique.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/CHANGES +4 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/Gemfile +12 -13
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/LICENSE +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.jp.md +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.md +0 -0
- data/bundle/ruby/{2.6.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.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/command.rb +13 -13
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/controls.rb +0 -0
- data/bundle/ruby/{2.6.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.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/embedded.rb +0 -0
- data/bundle/ruby/{2.6.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.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/engine.rb +0 -0
- data/bundle/ruby/{2.6.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.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/filter.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/grammar.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/include.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/interpolation.rb +0 -0
- data/bundle/ruby/{2.6.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.6.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.6.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.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/parser.rb +1 -1
- data/bundle/ruby/{2.6.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.6.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.6.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.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart.rb +0 -0
- data/bundle/ruby/{2.6.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.6.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.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/template.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/translator.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/version.rb +1 -1
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim.rb +0 -0
- data/bundle/ruby/{2.6.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/slim.gemspec +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/CHANGES +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/EXPRESSIONS.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/Gemfile +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/LICENSE +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/README.md +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/engine.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/engine.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/parser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/template.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/erb/trimming.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/exceptions.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/code_merger.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/control_flow.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/dynamic_inliner.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/encoding.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/eraser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/escapable.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/multi_flattener.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/remove_bom.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/static_analyzer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/static_merger.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/string_splitter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/filters/validator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/array.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/array_buffer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/erb.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/rails_output_buffer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/generators/string_buffer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/grammar.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/attribute_merger.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/attribute_remover.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/attribute_sorter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/dispatcher.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/fast.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/filter.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/pretty.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/html/safe.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/map.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/dispatcher.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/engine_dsl.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/grammar_dsl.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/options.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/mixins/template.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/parser.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/static_analyzer.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/templates/rails.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/templates/tilt.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/templates.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/utils.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple/version.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/lib/temple.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/temple-0.8.2/temple.gemspec +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/Gemfile +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/History.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/LICENSE.txt +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/Manifest +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/README.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/Todo.rdoc +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/import.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table_helper.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/terminal-table-1.8.0/terminal-table.gemspec +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/COPYING +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/babel.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/builder.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/coffee.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/creole.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/csv.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/dummy.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/erb.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/erubi.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/erubis.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/etanni.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/haml.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/kramdown.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/less.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/liquid.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/livescript.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/mapping.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/markaby.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/maruku.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/nokogiri.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/pandoc.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/plain.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/prawn.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/radius.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/rdoc.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/redcloth.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/sass.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/sigil.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/string.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/template.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/typescript.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt/yajl.rb +0 -0
- data/bundle/ruby/{2.6.0 → 2.7.0}/gems/tilt-2.0.10/lib/tilt.rb +0 -0
- data/bundle/ruby/{2.6.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.6.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.6.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.6.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.6.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.6.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.6.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.6.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 +37 -4
- data/lib/brakeman/checks/base_check.rb +30 -11
- data/lib/brakeman/checks/check_basic_auth.rb +2 -0
- data/lib/brakeman/checks/check_content_tag.rb +1 -2
- data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +28 -0
- data/lib/brakeman/checks/check_deserialize.rb +21 -1
- data/lib/brakeman/checks/check_detailed_exceptions.rb +1 -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_evaluation.rb +1 -1
- data/lib/brakeman/checks/check_execute.rb +52 -6
- data/lib/brakeman/checks/check_json_entity_escape.rb +38 -0
- data/lib/brakeman/checks/check_json_parsing.rb +1 -1
- data/lib/brakeman/checks/check_link_to.rb +1 -1
- data/lib/brakeman/checks/check_link_to_href.rb +1 -3
- data/lib/brakeman/checks/check_mass_assignment.rb +37 -9
- data/lib/brakeman/checks/check_model_attr_accessible.rb +1 -1
- data/lib/brakeman/checks/check_model_attributes.rb +1 -1
- data/lib/brakeman/checks/check_page_caching_cve.rb +37 -0
- data/lib/brakeman/checks/check_permit_attributes.rb +1 -1
- data/lib/brakeman/checks/check_regex_dos.rb +1 -1
- data/lib/brakeman/checks/check_render.rb +15 -1
- data/lib/brakeman/checks/check_sanitize_methods.rb +2 -1
- data/lib/brakeman/checks/check_skip_before_filter.rb +4 -4
- data/lib/brakeman/checks/check_sql.rb +60 -20
- data/lib/brakeman/checks/check_symbol_dos.rb +1 -1
- data/lib/brakeman/checks/check_template_injection.rb +32 -0
- data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +68 -0
- data/lib/brakeman/checks/check_verb_confusion.rb +75 -0
- data/lib/brakeman/checks/eol_check.rb +47 -0
- data/lib/brakeman/commandline.rb +25 -1
- data/lib/brakeman/differ.rb +0 -5
- data/lib/brakeman/file_parser.rb +58 -22
- data/lib/brakeman/options.rb +39 -2
- data/lib/brakeman/parsers/template_parser.rb +26 -3
- data/lib/brakeman/processors/alias_processor.rb +132 -24
- data/lib/brakeman/processors/base_processor.rb +4 -4
- data/lib/brakeman/processors/controller_alias_processor.rb +6 -43
- data/lib/brakeman/processors/controller_processor.rb +1 -1
- data/lib/brakeman/processors/gem_processor.rb +3 -0
- data/lib/brakeman/processors/haml_template_processor.rb +17 -1
- data/lib/brakeman/processors/lib/call_conversion_helper.rb +13 -7
- data/lib/brakeman/processors/lib/file_type_detector.rb +64 -0
- data/lib/brakeman/processors/lib/find_all_calls.rb +30 -14
- 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 +5 -0
- data/lib/brakeman/report/ignore/config.rb +10 -2
- data/lib/brakeman/report/ignore/interactive.rb +1 -1
- data/lib/brakeman/report/report_base.rb +0 -2
- data/lib/brakeman/report/report_csv.rb +37 -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_tabs.rb +1 -1
- data/lib/brakeman/report/report_text.rb +38 -17
- data/lib/brakeman/report.rb +22 -1
- data/lib/brakeman/rescanner.rb +7 -5
- data/lib/brakeman/scanner.rb +65 -31
- data/lib/brakeman/tracker/collection.rb +57 -7
- data/lib/brakeman/tracker/config.rb +88 -5
- data/lib/brakeman/tracker/constants.rb +8 -7
- data/lib/brakeman/tracker/controller.rb +1 -1
- data/lib/brakeman/tracker/method_info.rb +70 -0
- data/lib/brakeman/tracker.rb +42 -5
- data/lib/brakeman/util.rb +58 -21
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman/warning.rb +10 -2
- data/lib/brakeman/warning_codes.rb +13 -0
- data/lib/brakeman.rb +49 -6
- data/lib/ruby_parser/bm_sexp.rb +33 -9
- metadata +430 -351
- data/bundle/ruby/2.6.0/gems/haml-5.1.2/lib/haml/escapable.rb +0 -50
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/debugging.md +0 -18
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/rp_stringscanner.rb +0 -64
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby20_parser.rb +0 -7045
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby21_parser.rb +0 -7116
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby22_parser.rb +0 -7149
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby23_parser.rb +0 -7166
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby24_parser.rb +0 -7178
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby25_parser.rb +0 -7178
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.1/lib/ruby26_parser.rb +0 -7198
- data/bundle/ruby/2.6.0/gems/unicode-display_width-1.6.0/data/display_width.marshal.gz +0 -0
data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.1 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby23_parser.y
RENAMED
@@ -18,7 +18,7 @@ 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
|
tLABEL_END
|
24
24
|
tLONELY
|
@@ -33,7 +33,7 @@ preclow
|
|
33
33
|
right tEQL tOP_ASGN
|
34
34
|
left kRESCUE_MOD
|
35
35
|
right tEH tCOLON
|
36
|
-
nonassoc tDOT2 tDOT3
|
36
|
+
nonassoc tDOT2 tDOT3 tBDOT2 tBDOT3
|
37
37
|
left tOROP
|
38
38
|
left tANDOP
|
39
39
|
nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
|
@@ -56,6 +56,9 @@ rule
|
|
56
56
|
top_compstmt
|
57
57
|
{
|
58
58
|
result = new_compstmt val
|
59
|
+
|
60
|
+
lexer.cond.pop # local_pop
|
61
|
+
lexer.cmdarg.pop
|
59
62
|
}
|
60
63
|
|
61
64
|
top_compstmt: top_stmts opt_terms
|
@@ -76,7 +79,7 @@ rule
|
|
76
79
|
| klBEGIN
|
77
80
|
{
|
78
81
|
if (self.in_def || self.in_single > 0) then
|
79
|
-
|
82
|
+
debug 11
|
80
83
|
yyerror "BEGIN in method"
|
81
84
|
end
|
82
85
|
self.env.extend
|
@@ -101,7 +104,9 @@ rule
|
|
101
104
|
bodystmt: compstmt opt_rescue k_else
|
102
105
|
{
|
103
106
|
res = _values[-2]
|
104
|
-
|
107
|
+
# TODO: move down to main match so I can just use val
|
108
|
+
|
109
|
+
warn "else without rescue is useless" unless res
|
105
110
|
}
|
106
111
|
compstmt
|
107
112
|
opt_ensure
|
@@ -131,7 +136,7 @@ rule
|
|
131
136
|
| error stmt
|
132
137
|
{
|
133
138
|
result = val[1]
|
134
|
-
|
139
|
+
debug 12
|
135
140
|
}
|
136
141
|
|
137
142
|
stmt_or_begin: stmt
|
@@ -139,6 +144,10 @@ rule
|
|
139
144
|
{
|
140
145
|
yyerror "BEGIN is permitted only at toplevel"
|
141
146
|
}
|
147
|
+
begin_block
|
148
|
+
{
|
149
|
+
result = val[2] # wtf?
|
150
|
+
}
|
142
151
|
|
143
152
|
stmt: kALIAS fitem
|
144
153
|
{
|
@@ -151,12 +160,12 @@ rule
|
|
151
160
|
}
|
152
161
|
| kALIAS tGVAR tGVAR
|
153
162
|
{
|
154
|
-
(_, line), lhs, rhs = val
|
163
|
+
(_, line), (lhs, _), (rhs, _) = val
|
155
164
|
result = s(:valias, lhs.to_sym, rhs.to_sym).line line
|
156
165
|
}
|
157
166
|
| kALIAS tGVAR tBACK_REF
|
158
167
|
{
|
159
|
-
(_, line), lhs, rhs = val
|
168
|
+
(_, line), (lhs, _), (rhs, _) = val
|
160
169
|
result = s(:valias, lhs.to_sym, :"$#{rhs}").line line
|
161
170
|
}
|
162
171
|
| kALIAS tGVAR tNTH_REF
|
@@ -199,7 +208,7 @@ rule
|
|
199
208
|
(_, line), _, stmt, _ = val
|
200
209
|
|
201
210
|
if (self.in_def || self.in_single > 0) then
|
202
|
-
|
211
|
+
debug 13
|
203
212
|
yyerror "END in method; use at_exit"
|
204
213
|
end
|
205
214
|
|
@@ -239,30 +248,31 @@ rule
|
|
239
248
|
}
|
240
249
|
| primary_value call_op tIDENTIFIER tOP_ASGN command_rhs
|
241
250
|
{
|
242
|
-
prim, _, id,
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
result.line = val[0].line
|
251
|
+
prim, (call_op, _), (id, _), (op_asgn, _), rhs = val
|
252
|
+
|
253
|
+
result = s(:op_asgn, prim, rhs, id.to_sym, op_asgn.to_sym)
|
254
|
+
result.sexp_type = :safe_op_asgn if call_op == '&.'
|
255
|
+
result.line prim.line
|
248
256
|
}
|
249
257
|
| primary_value call_op tCONSTANT tOP_ASGN command_rhs
|
250
258
|
{
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
result.line
|
259
|
+
prim, (call_op, _), (id, _), (op_asgn, _), rhs = val
|
260
|
+
|
261
|
+
result = s(:op_asgn, prim, rhs, id.to_sym, op_asgn.to_sym)
|
262
|
+
result.sexp_type = :safe_op_asgn if call_op == '&.'
|
263
|
+
result.line prim.line
|
256
264
|
}
|
257
265
|
| primary_value tCOLON2 tCONSTANT tOP_ASGN command_rhs
|
258
266
|
{
|
259
|
-
|
260
|
-
|
267
|
+
lhs1, _, (lhs2, line), (id, _), rhs = val
|
268
|
+
|
269
|
+
result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, id.to_sym).line line
|
261
270
|
}
|
262
271
|
| primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_rhs
|
263
272
|
{
|
264
|
-
|
265
|
-
|
273
|
+
lhs1, _, (lhs2, line), (id, _), rhs = val
|
274
|
+
|
275
|
+
result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, id.to_sym).line line
|
266
276
|
}
|
267
277
|
| backref tOP_ASGN command_rhs
|
268
278
|
{
|
@@ -300,7 +310,7 @@ rule
|
|
300
310
|
# TODO: fix line number to tBANG... but causes BAD shift/reduce conflict
|
301
311
|
# REFACTOR: call_uni_op -- see parse26.y
|
302
312
|
}
|
303
|
-
| arg
|
313
|
+
| arg =tLBRACE_ARG
|
304
314
|
|
305
315
|
expr_value: expr
|
306
316
|
{
|
@@ -325,7 +335,7 @@ rule
|
|
325
335
|
block_command: block_call
|
326
336
|
| block_call call_op2 operation2 command_args
|
327
337
|
{
|
328
|
-
blk, _, msg, args = val
|
338
|
+
blk, _, (msg, _line), args = val
|
329
339
|
result = new_call(blk, msg.to_sym, args).line blk.line
|
330
340
|
}
|
331
341
|
|
@@ -339,15 +349,15 @@ rule
|
|
339
349
|
_, line, body, _ = val
|
340
350
|
|
341
351
|
result = body
|
342
|
-
result.line
|
352
|
+
result.line line
|
343
353
|
|
344
354
|
# self.env.unextend
|
345
355
|
}
|
346
356
|
|
347
357
|
fcall: operation
|
348
358
|
{
|
349
|
-
msg, = val
|
350
|
-
result = new_call(nil, msg.to_sym).line
|
359
|
+
(msg, line), = val
|
360
|
+
result = new_call(nil, msg.to_sym).line line
|
351
361
|
}
|
352
362
|
|
353
363
|
command: fcall command_args =tLOWEST
|
@@ -370,12 +380,14 @@ rule
|
|
370
380
|
}
|
371
381
|
| primary_value call_op operation2 command_args =tLOWEST
|
372
382
|
{
|
373
|
-
lhs, callop, op, args = val
|
383
|
+
lhs, callop, (op, _), args = val
|
384
|
+
|
374
385
|
result = new_call lhs, op.to_sym, args, callop
|
386
|
+
result.line lhs.line
|
375
387
|
}
|
376
388
|
| primary_value call_op operation2 command_args cmd_brace_block
|
377
389
|
{
|
378
|
-
recv, _, msg, args, block = val
|
390
|
+
recv, _, (msg, _line), args, block = val
|
379
391
|
call = new_call recv, msg.to_sym, args, val[1]
|
380
392
|
|
381
393
|
block_dup_check call, block
|
@@ -385,11 +397,14 @@ rule
|
|
385
397
|
}
|
386
398
|
| primary_value tCOLON2 operation2 command_args =tLOWEST
|
387
399
|
{
|
388
|
-
|
400
|
+
lhs, _, (id, line), args = val
|
401
|
+
|
402
|
+
result = new_call lhs, id.to_sym, args
|
403
|
+
result.line line
|
389
404
|
}
|
390
405
|
| primary_value tCOLON2 operation2 command_args cmd_brace_block
|
391
406
|
{
|
392
|
-
recv, _, msg, args, block = val
|
407
|
+
recv, _, (msg, _line), args, block = val
|
393
408
|
call = new_call recv, msg.to_sym, args
|
394
409
|
|
395
410
|
block_dup_check call, block
|
@@ -547,25 +562,29 @@ rule
|
|
547
562
|
}
|
548
563
|
| primary_value call_op tIDENTIFIER
|
549
564
|
{
|
550
|
-
|
565
|
+
lhs, call_op, (id, _line) = val
|
566
|
+
|
567
|
+
result = new_attrasgn lhs, id, call_op
|
551
568
|
}
|
552
569
|
| primary_value tCOLON2 tIDENTIFIER
|
553
570
|
{
|
554
|
-
recv, _, id = val
|
571
|
+
recv, _, (id, _line) = val
|
555
572
|
result = new_attrasgn recv, id
|
556
573
|
}
|
557
574
|
| primary_value call_op tCONSTANT
|
558
575
|
{
|
559
|
-
|
576
|
+
lhs, call_op, (id, _line) = val
|
577
|
+
|
578
|
+
result = new_attrasgn lhs, id, call_op
|
560
579
|
}
|
561
580
|
| primary_value tCOLON2 tCONSTANT
|
562
581
|
{
|
563
582
|
if (self.in_def || self.in_single > 0) then
|
564
|
-
|
583
|
+
debug 14
|
565
584
|
yyerror "dynamic constant assignment"
|
566
585
|
end
|
567
586
|
|
568
|
-
expr, _, id = val
|
587
|
+
expr, _, (id, _line) = val
|
569
588
|
l = expr.line
|
570
589
|
|
571
590
|
result = s(:const, s(:colon2, expr, id.to_sym).line(l), nil).line l
|
@@ -573,58 +592,65 @@ rule
|
|
573
592
|
| tCOLON3 tCONSTANT
|
574
593
|
{
|
575
594
|
if (self.in_def || self.in_single > 0) then
|
576
|
-
|
595
|
+
debug 15
|
577
596
|
yyerror "dynamic constant assignment"
|
578
597
|
end
|
579
598
|
|
580
|
-
_, id = val
|
581
|
-
l = lexer.lineno
|
599
|
+
_, (id, l) = val
|
582
600
|
|
583
601
|
result = s(:const, nil, s(:colon3, id.to_sym).line(l)).line l
|
584
602
|
}
|
585
603
|
| backref
|
586
604
|
{
|
587
|
-
|
605
|
+
ref, = val
|
606
|
+
|
607
|
+
self.backref_assign_error ref
|
588
608
|
}
|
589
609
|
|
590
610
|
lhs: user_variable
|
591
611
|
{
|
592
|
-
|
593
|
-
|
594
|
-
result
|
612
|
+
var, = val
|
613
|
+
|
614
|
+
result = self.assignable var
|
595
615
|
}
|
596
616
|
| keyword_variable
|
597
617
|
{
|
598
|
-
|
599
|
-
|
600
|
-
result
|
601
|
-
|
618
|
+
var, = val
|
619
|
+
|
620
|
+
result = self.assignable var
|
621
|
+
|
622
|
+
debug 16
|
602
623
|
}
|
603
624
|
| primary_value tLBRACK2 opt_call_args rbracket
|
604
625
|
{
|
605
626
|
lhs, _, args, _ = val
|
627
|
+
|
606
628
|
result = self.aryset lhs, args
|
607
629
|
}
|
608
630
|
| primary_value call_op tIDENTIFIER # REFACTOR
|
609
631
|
{
|
610
|
-
lhs, op, id = val
|
632
|
+
lhs, op, (id, _line) = val
|
633
|
+
|
611
634
|
result = new_attrasgn lhs, id, op
|
612
635
|
}
|
613
636
|
| primary_value tCOLON2 tIDENTIFIER
|
614
637
|
{
|
615
|
-
lhs, _, id = val
|
638
|
+
lhs, _, (id, _line) = val
|
639
|
+
|
616
640
|
result = new_attrasgn lhs, id
|
617
641
|
}
|
618
642
|
| primary_value call_op tCONSTANT # REFACTOR?
|
619
643
|
{
|
620
|
-
|
644
|
+
lhs, call_op, (id, _line) = val
|
645
|
+
|
646
|
+
result = new_attrasgn lhs, id, call_op
|
621
647
|
}
|
622
648
|
| primary_value tCOLON2 tCONSTANT
|
623
649
|
{
|
624
|
-
expr, _, id = val
|
650
|
+
expr, _, (id, _line) = val
|
625
651
|
|
626
652
|
if (self.in_def || self.in_single > 0) then
|
627
|
-
|
653
|
+
debug 17
|
628
654
|
yyerror "dynamic constant assignment"
|
629
655
|
end
|
630
656
|
|
@@ -633,14 +659,13 @@ rule
|
|
633
659
|
}
|
634
660
|
| tCOLON3 tCONSTANT
|
635
661
|
{
|
636
|
-
_, id = val
|
662
|
+
_, (id, l) = val
|
637
663
|
|
638
664
|
if (self.in_def || self.in_single > 0) then
|
639
|
-
|
665
|
+
debug 18
|
640
666
|
yyerror "dynamic constant assignment"
|
641
667
|
end
|
642
668
|
|
643
|
-
l = lexer.lineno
|
644
669
|
result = s(:const, s(:colon3, id.to_sym).line(l)).line l
|
645
670
|
}
|
646
671
|
| backref
|
@@ -656,16 +681,17 @@ rule
|
|
656
681
|
|
657
682
|
cpath: tCOLON3 cname
|
658
683
|
{
|
659
|
-
_, name = val
|
660
|
-
result = s(:colon3, name.to_sym).line
|
684
|
+
_, (name, line) = val
|
685
|
+
result = s(:colon3, name.to_sym).line line
|
661
686
|
}
|
662
687
|
| cname
|
663
688
|
{
|
664
|
-
|
689
|
+
(id, line), = val
|
690
|
+
result = [id.to_sym, line] # TODO: sexp?
|
665
691
|
}
|
666
692
|
| primary_value tCOLON2 cname
|
667
693
|
{
|
668
|
-
pval, _, name = val
|
694
|
+
pval, _, (name, _line) = val
|
669
695
|
|
670
696
|
result = s(:colon2, pval, name.to_sym)
|
671
697
|
result.line pval.line
|
@@ -675,24 +701,17 @@ rule
|
|
675
701
|
| op
|
676
702
|
{
|
677
703
|
lexer.lex_state = EXPR_END
|
678
|
-
result = val[0]
|
679
704
|
}
|
680
705
|
|
681
706
|
| reswords
|
682
|
-
{
|
683
|
-
(sym, _line), = val
|
684
|
-
lexer.lex_state = EXPR_END
|
685
|
-
result = sym
|
686
|
-
}
|
687
|
-
|
688
|
-
fsym: fname | symbol
|
689
707
|
|
690
|
-
fitem:
|
708
|
+
fitem: fname
|
691
709
|
{
|
692
|
-
id, = val
|
693
|
-
|
710
|
+
(id, line), = val
|
711
|
+
|
712
|
+
result = s(:lit, id.to_sym).line line
|
694
713
|
}
|
695
|
-
|
|
714
|
+
| symbol
|
696
715
|
|
697
716
|
undef_list: fitem
|
698
717
|
{
|
@@ -713,8 +732,6 @@ rule
|
|
713
732
|
| tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2
|
714
733
|
| tSTAR | tDIVIDE | tPERCENT | tPOW | tDSTAR | tBANG | tTILDE
|
715
734
|
| tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2
|
716
|
-
# TODO: tUBANG dead?
|
717
|
-
| tUBANG
|
718
735
|
|
719
736
|
reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND
|
720
737
|
| kALIAS | kAND | kBEGIN | kBREAK | kCASE
|
@@ -748,24 +765,20 @@ rule
|
|
748
765
|
}
|
749
766
|
| primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg_rhs
|
750
767
|
{
|
751
|
-
lhs, _, id, op, rhs = val
|
768
|
+
lhs, _, (id, _line), (op, _), rhs = val
|
752
769
|
|
753
770
|
result = s(:op_asgn, lhs, rhs, id.to_sym, op.to_sym).line lhs.line
|
754
771
|
}
|
755
772
|
| primary_value tCOLON2 tCONSTANT tOP_ASGN arg_rhs
|
756
773
|
{
|
757
|
-
lhs1, _, lhs2, op, rhs = val
|
774
|
+
lhs1, _, (lhs2, _line), op, rhs = val
|
758
775
|
|
759
776
|
lhs = s(:colon2, lhs1, lhs2.to_sym).line lhs1.line
|
760
777
|
result = new_const_op_asgn [lhs, op, rhs]
|
761
778
|
}
|
762
|
-
| tCOLON3 tCONSTANT
|
763
|
-
{
|
764
|
-
result = self.lexer.lineno
|
765
|
-
}
|
766
|
-
tOP_ASGN arg_rhs
|
779
|
+
| tCOLON3 tCONSTANT tOP_ASGN arg_rhs
|
767
780
|
{
|
768
|
-
_, lhs, line, op, rhs = val
|
781
|
+
_, (lhs, line), op, rhs = val
|
769
782
|
|
770
783
|
lhs = s(:colon3, lhs.to_sym).line line
|
771
784
|
result = new_const_op_asgn [lhs, op, rhs]
|
@@ -779,7 +792,7 @@ rule
|
|
779
792
|
| arg tDOT2 arg
|
780
793
|
{
|
781
794
|
v1, v2 = val[0], val[2]
|
782
|
-
if v1.
|
795
|
+
if v1.sexp_type == :lit and v2.sexp_type == :lit and Integer === v1.last and Integer === v2.last then
|
783
796
|
result = s(:lit, (v1.last)..(v2.last)).line v1.line
|
784
797
|
else
|
785
798
|
result = s(:dot2, v1, v2).line v1.line
|
@@ -788,12 +801,14 @@ rule
|
|
788
801
|
| arg tDOT3 arg
|
789
802
|
{
|
790
803
|
v1, v2 = val[0], val[2]
|
791
|
-
if v1.
|
804
|
+
if v1.sexp_type == :lit and v2.sexp_type == :lit and Integer === v1.last and Integer === v2.last then
|
792
805
|
result = s(:lit, (v1.last)...(v2.last)).line v1.line
|
793
806
|
else
|
794
807
|
result = s(:dot3, v1, v2).line v1.line
|
795
808
|
end
|
796
809
|
}
|
810
|
+
|
811
|
+
|
797
812
|
| arg tPLUS arg
|
798
813
|
{
|
799
814
|
result = new_call val[0], :+, argl(val[2])
|
@@ -820,8 +835,9 @@ rule
|
|
820
835
|
}
|
821
836
|
| tUMINUS_NUM simple_numeric tPOW arg
|
822
837
|
{
|
823
|
-
|
824
|
-
|
838
|
+
_, (num, line), _, arg = val
|
839
|
+
lit = s(:lit, num).line line
|
840
|
+
result = new_call(new_call(lit, :"**", argl(arg)), :"-@")
|
825
841
|
|
826
842
|
}
|
827
843
|
| tUPLUS arg
|
@@ -920,12 +936,12 @@ rule
|
|
920
936
|
|
921
937
|
rel_expr: arg relop arg =tGT
|
922
938
|
{
|
923
|
-
lhs, op, rhs = val
|
939
|
+
lhs, (op, _), rhs = val
|
924
940
|
result = new_call lhs, op.to_sym, argl(rhs)
|
925
941
|
}
|
926
942
|
| rel_expr relop arg =tGT
|
927
943
|
{
|
928
|
-
lhs, op, rhs = val
|
944
|
+
lhs, (op, _), rhs = val
|
929
945
|
warn "comparison '%s' after comparison", op
|
930
946
|
result = new_call lhs, op.to_sym, argl(rhs)
|
931
947
|
}
|
@@ -992,17 +1008,14 @@ rule
|
|
992
1008
|
| args opt_block_arg
|
993
1009
|
{
|
994
1010
|
result = call_args val
|
995
|
-
result = self.arg_blk_pass val[0], val[1]
|
996
1011
|
}
|
997
1012
|
| assocs opt_block_arg
|
998
1013
|
{
|
999
|
-
result = call_args [array_to_hash(val[0])]
|
1000
|
-
result = self.arg_blk_pass result, val[1]
|
1014
|
+
result = call_args [array_to_hash(val[0]), val[1]]
|
1001
1015
|
}
|
1002
1016
|
| args tCOMMA assocs opt_block_arg
|
1003
1017
|
{
|
1004
|
-
result = call_args [val[0], array_to_hash(val[2])]
|
1005
|
-
result = self.arg_blk_pass result, val[3]
|
1018
|
+
result = call_args [val[0], array_to_hash(val[2]), val[3]]
|
1006
1019
|
}
|
1007
1020
|
| block_arg
|
1008
1021
|
{
|
@@ -1010,12 +1023,39 @@ rule
|
|
1010
1023
|
}
|
1011
1024
|
|
1012
1025
|
command_args: {
|
1013
|
-
|
1026
|
+
# parse26.y line 2200
|
1027
|
+
|
1028
|
+
# If call_args starts with a open paren '(' or
|
1029
|
+
# '[', look-ahead reading of the letters calls
|
1030
|
+
# CMDARG_PUSH(0), but the push must be done
|
1031
|
+
# after CMDARG_PUSH(1). So this code makes them
|
1032
|
+
# consistent by first cancelling the premature
|
1033
|
+
# CMDARG_PUSH(0), doing CMDARG_PUSH(1), and
|
1034
|
+
# finally redoing CMDARG_PUSH(0).
|
1035
|
+
|
1036
|
+
result = yychar = self.last_token_type.first
|
1037
|
+
lookahead = [:tLPAREN, :tLPAREN_ARG, :tLPAREN2, :tLBRACK, :tLBRACK2].include?(yychar)
|
1038
|
+
lexer.cmdarg.pop if lookahead
|
1039
|
+
lexer.cmdarg.push true
|
1040
|
+
lexer.cmdarg.push false if lookahead
|
1014
1041
|
}
|
1015
1042
|
call_args
|
1016
1043
|
{
|
1017
|
-
|
1018
|
-
|
1044
|
+
yychar, args = val
|
1045
|
+
|
1046
|
+
# call_args can be followed by tLBRACE_ARG (that
|
1047
|
+
# does CMDARG_PUSH(0) in the lexer) but the push
|
1048
|
+
# must be done after CMDARG_POP() in the parser.
|
1049
|
+
# So this code does CMDARG_POP() to pop 0 pushed
|
1050
|
+
# by tLBRACE_ARG, CMDARG_POP() to pop 1 pushed
|
1051
|
+
# by command_args, and CMDARG_PUSH(0) to restore
|
1052
|
+
# back the flag set by tLBRACE_ARG.
|
1053
|
+
|
1054
|
+
lookahead = [:tLBRACE_ARG].include?(yychar)
|
1055
|
+
lexer.cmdarg.pop if lookahead
|
1056
|
+
lexer.cmdarg.pop
|
1057
|
+
lexer.cmdarg.push false if lookahead
|
1058
|
+
result = args
|
1019
1059
|
}
|
1020
1060
|
|
1021
1061
|
block_arg: tAMPER arg_value
|
@@ -1033,8 +1073,9 @@ rule
|
|
1033
1073
|
args: arg_value
|
1034
1074
|
{
|
1035
1075
|
arg, = val
|
1076
|
+
lineno = arg.line || lexer.lineno # HACK
|
1036
1077
|
|
1037
|
-
result = s(:array, arg).line
|
1078
|
+
result = s(:array, arg).line lineno
|
1038
1079
|
}
|
1039
1080
|
| tSTAR arg_value
|
1040
1081
|
{
|
@@ -1046,9 +1087,11 @@ rule
|
|
1046
1087
|
args, _, id = val
|
1047
1088
|
result = self.list_append args, id
|
1048
1089
|
}
|
1049
|
-
| args tCOMMA tSTAR
|
1090
|
+
| args tCOMMA tSTAR arg_value
|
1050
1091
|
{
|
1051
|
-
|
1092
|
+
# TODO: the line number from tSTAR has been dropped
|
1093
|
+
args, _, _, id = val
|
1094
|
+
line = lexer.lineno
|
1052
1095
|
result = self.list_append args, s(:splat, id).line(line)
|
1053
1096
|
}
|
1054
1097
|
|
@@ -1067,7 +1110,6 @@ rule
|
|
1067
1110
|
}
|
1068
1111
|
| args tCOMMA tSTAR arg_value
|
1069
1112
|
{
|
1070
|
-
# FIX: bad shift/reduce conflict with rhs' comma star prod
|
1071
1113
|
# TODO: make all tXXXX terminals include lexer.lineno
|
1072
1114
|
arg, _, _, splat = val
|
1073
1115
|
result = self.arg_concat arg, splat
|
@@ -1090,26 +1132,19 @@ rule
|
|
1090
1132
|
| backref
|
1091
1133
|
| tFID
|
1092
1134
|
{
|
1093
|
-
msg, = val
|
1135
|
+
(msg, line), = val
|
1094
1136
|
result = new_call nil, msg.to_sym
|
1137
|
+
result.line line
|
1095
1138
|
}
|
1096
1139
|
| k_begin
|
1097
1140
|
{
|
1141
|
+
lexer.cmdarg.push false
|
1098
1142
|
result = self.lexer.lineno
|
1099
|
-
# TODO:
|
1100
|
-
# $<val>1 = cmdarg_stack;
|
1101
|
-
# CMDARG_SET(0);
|
1102
1143
|
}
|
1103
1144
|
bodystmt k_end
|
1104
1145
|
{
|
1105
|
-
|
1106
|
-
|
1107
|
-
result = s(:nil)
|
1108
|
-
else
|
1109
|
-
result = s(:begin, val[2])
|
1110
|
-
end
|
1111
|
-
|
1112
|
-
result.line = val[1]
|
1146
|
+
lexer.cmdarg.pop
|
1147
|
+
result = new_begin val
|
1113
1148
|
}
|
1114
1149
|
| tLPAREN_ARG
|
1115
1150
|
{
|
@@ -1122,18 +1157,14 @@ rule
|
|
1122
1157
|
result = s(:begin).line line
|
1123
1158
|
}
|
1124
1159
|
| tLPAREN_ARG
|
1125
|
-
{
|
1126
|
-
result = lexer.cmdarg.store false
|
1127
|
-
}
|
1128
1160
|
stmt
|
1129
1161
|
{
|
1130
1162
|
lexer.lex_state = EXPR_ENDARG
|
1131
1163
|
}
|
1132
1164
|
rparen
|
1133
1165
|
{
|
1134
|
-
_,
|
1135
|
-
warning "(...) interpreted as grouped expression"
|
1136
|
-
lexer.cmdarg.restore cmdarg
|
1166
|
+
_, stmt, _, _, = val
|
1167
|
+
# warning "(...) interpreted as grouped expression"
|
1137
1168
|
result = stmt
|
1138
1169
|
}
|
1139
1170
|
| tLPAREN compstmt tRPAREN
|
@@ -1145,15 +1176,15 @@ rule
|
|
1145
1176
|
}
|
1146
1177
|
| primary_value tCOLON2 tCONSTANT
|
1147
1178
|
{
|
1148
|
-
expr, _, id = val
|
1179
|
+
expr, _, (id, _line) = val
|
1149
1180
|
|
1150
1181
|
result = s(:colon2, expr, id.to_sym).line expr.line
|
1151
1182
|
}
|
1152
1183
|
| tCOLON3 tCONSTANT
|
1153
1184
|
{
|
1154
|
-
_, id = val
|
1185
|
+
_, (id, line) = val
|
1155
1186
|
|
1156
|
-
result = s(:colon3, id.to_sym).line
|
1187
|
+
result = s(:colon3, id.to_sym).line line
|
1157
1188
|
}
|
1158
1189
|
| tLBRACK { result = lexer.lineno } aref_args tRBRACK
|
1159
1190
|
{
|
@@ -1177,15 +1208,21 @@ rule
|
|
1177
1208
|
}
|
1178
1209
|
| kYIELD tLPAREN2 call_args rparen
|
1179
1210
|
{
|
1180
|
-
|
1211
|
+
(_, line), _, args, _ = val
|
1212
|
+
|
1213
|
+
result = new_yield(args).line line
|
1181
1214
|
}
|
1182
1215
|
| kYIELD tLPAREN2 rparen
|
1183
1216
|
{
|
1184
|
-
|
1217
|
+
(_, line), _, _ = val
|
1218
|
+
|
1219
|
+
result = new_yield.line line
|
1185
1220
|
}
|
1186
1221
|
| kYIELD
|
1187
1222
|
{
|
1188
|
-
|
1223
|
+
(_, line), = val
|
1224
|
+
|
1225
|
+
result = new_yield.line line
|
1189
1226
|
}
|
1190
1227
|
| kDEFINED opt_nl tLPAREN2 expr rparen
|
1191
1228
|
{
|
@@ -1200,7 +1237,7 @@ rule
|
|
1200
1237
|
}
|
1201
1238
|
| kNOT tLPAREN2 rparen
|
1202
1239
|
{
|
1203
|
-
|
1240
|
+
debug 20
|
1204
1241
|
}
|
1205
1242
|
| fcall brace_block
|
1206
1243
|
{
|
@@ -1218,9 +1255,10 @@ rule
|
|
1218
1255
|
iter.insert 1, call # FIX
|
1219
1256
|
result = iter
|
1220
1257
|
}
|
1221
|
-
|
|
1258
|
+
| lambda
|
1222
1259
|
{
|
1223
|
-
|
1260
|
+
expr, = val
|
1261
|
+
result = expr
|
1224
1262
|
}
|
1225
1263
|
| k_if expr_value then compstmt if_tail k_end
|
1226
1264
|
{
|
@@ -1263,7 +1301,6 @@ rule
|
|
1263
1301
|
}
|
1264
1302
|
cpath superclass
|
1265
1303
|
{
|
1266
|
-
self.comments.push self.lexer.comments
|
1267
1304
|
if (self.in_def || self.in_single > 0) then
|
1268
1305
|
yyerror "class definition in method body"
|
1269
1306
|
end
|
@@ -1273,7 +1310,7 @@ rule
|
|
1273
1310
|
{
|
1274
1311
|
result = new_class val
|
1275
1312
|
self.env.unextend
|
1276
|
-
self.lexer.
|
1313
|
+
self.lexer.ignore_body_comments
|
1277
1314
|
}
|
1278
1315
|
| k_class tLSHFT
|
1279
1316
|
{
|
@@ -1294,7 +1331,7 @@ rule
|
|
1294
1331
|
{
|
1295
1332
|
result = new_sclass val
|
1296
1333
|
self.env.unextend
|
1297
|
-
self.lexer.
|
1334
|
+
self.lexer.ignore_body_comments
|
1298
1335
|
}
|
1299
1336
|
| k_module
|
1300
1337
|
{
|
@@ -1302,7 +1339,6 @@ rule
|
|
1302
1339
|
}
|
1303
1340
|
cpath
|
1304
1341
|
{
|
1305
|
-
self.comments.push self.lexer.comments
|
1306
1342
|
yyerror "module definition in method body" if
|
1307
1343
|
self.in_def or self.in_single > 0
|
1308
1344
|
|
@@ -1312,53 +1348,67 @@ rule
|
|
1312
1348
|
{
|
1313
1349
|
result = new_module val
|
1314
1350
|
self.env.unextend
|
1315
|
-
self.lexer.
|
1351
|
+
self.lexer.ignore_body_comments
|
1316
1352
|
}
|
1317
1353
|
| k_def fname
|
1318
1354
|
{
|
1319
|
-
result =
|
1355
|
+
result = self.in_def
|
1320
1356
|
|
1321
|
-
self.
|
1322
|
-
self.in_def = true
|
1357
|
+
self.in_def = true # group = local_push
|
1323
1358
|
self.env.extend
|
1324
|
-
|
1325
|
-
|
1326
|
-
lexer.cmdarg.stack.replace [false]
|
1359
|
+
lexer.cmdarg.push false
|
1360
|
+
lexer.cond.push false
|
1327
1361
|
}
|
1328
|
-
f_arglist bodystmt
|
1362
|
+
f_arglist bodystmt k_end
|
1329
1363
|
{
|
1330
|
-
|
1331
|
-
|
1332
|
-
result = new_defn val
|
1364
|
+
result, in_def = new_defn val
|
1333
1365
|
|
1334
|
-
lexer.
|
1366
|
+
lexer.cond.pop # group = local_pop
|
1367
|
+
lexer.cmdarg.pop
|
1335
1368
|
self.env.unextend
|
1336
1369
|
self.in_def = in_def
|
1337
|
-
|
1370
|
+
|
1371
|
+
self.lexer.ignore_body_comments
|
1338
1372
|
}
|
1339
1373
|
| k_def singleton dot_or_colon
|
1340
1374
|
{
|
1341
|
-
self.comments.push self.lexer.comments
|
1342
1375
|
lexer.lex_state = EXPR_FNAME
|
1343
1376
|
}
|
1344
1377
|
fname
|
1345
1378
|
{
|
1346
|
-
self.
|
1379
|
+
result = self.in_def
|
1380
|
+
|
1381
|
+
self.in_single += 1 # TODO: remove?
|
1382
|
+
|
1383
|
+
self.in_def = true # local_push
|
1347
1384
|
self.env.extend
|
1348
|
-
lexer.
|
1349
|
-
|
1350
|
-
|
1385
|
+
lexer.cmdarg.push false
|
1386
|
+
lexer.cond.push false
|
1387
|
+
|
1388
|
+
lexer.lex_state = EXPR_ENDFN|EXPR_LABEL
|
1351
1389
|
}
|
1352
1390
|
f_arglist bodystmt k_end
|
1353
1391
|
{
|
1354
|
-
_, cmdarg = val[5]
|
1355
|
-
result = new_defs val
|
1356
1392
|
|
1357
|
-
|
1393
|
+
# [kdef, recv, _, _, (name, line), in_def, args, body, kend]
|
1394
|
+
# =>
|
1395
|
+
# [kdef, recv, (name, line), in_def, args, body, kend]
|
1358
1396
|
|
1397
|
+
val.delete_at 3
|
1398
|
+
val.delete_at 2
|
1399
|
+
|
1400
|
+
result, in_def = new_defs val
|
1401
|
+
|
1402
|
+
lexer.cond.pop # group = local_pop
|
1403
|
+
lexer.cmdarg.pop
|
1359
1404
|
self.env.unextend
|
1405
|
+
self.in_def = in_def
|
1406
|
+
|
1360
1407
|
self.in_single -= 1
|
1361
|
-
|
1408
|
+
|
1409
|
+
# TODO: restore cur_arg ? what's cur_arg?
|
1410
|
+
|
1411
|
+
self.lexer.ignore_body_comments
|
1362
1412
|
}
|
1363
1413
|
| kBREAK
|
1364
1414
|
{
|
@@ -1395,8 +1445,17 @@ rule
|
|
1395
1445
|
k_case: kCASE
|
1396
1446
|
k_for: kFOR
|
1397
1447
|
k_class: kCLASS
|
1448
|
+
{
|
1449
|
+
self.comments.push self.lexer.comments
|
1450
|
+
}
|
1398
1451
|
k_module: kMODULE
|
1452
|
+
{
|
1453
|
+
self.comments.push self.lexer.comments
|
1454
|
+
}
|
1399
1455
|
k_def: kDEF
|
1456
|
+
{
|
1457
|
+
self.comments.push self.lexer.comments
|
1458
|
+
}
|
1400
1459
|
k_do: kDO
|
1401
1460
|
k_do_block: kDO_BLOCK
|
1402
1461
|
k_rescue: kRESCUE
|
@@ -1457,51 +1516,42 @@ rule
|
|
1457
1516
|
|
1458
1517
|
result = block_var args
|
1459
1518
|
}
|
1460
|
-
| f_marg_list tCOMMA
|
1519
|
+
| f_marg_list tCOMMA f_rest_marg
|
1461
1520
|
{
|
1462
|
-
args, _,
|
1521
|
+
args, _, rest = val
|
1463
1522
|
|
1464
|
-
result = block_var args,
|
1523
|
+
result = block_var args, rest
|
1465
1524
|
}
|
1466
|
-
| f_marg_list tCOMMA
|
1525
|
+
| f_marg_list tCOMMA f_rest_marg tCOMMA f_marg_list
|
1467
1526
|
{
|
1468
|
-
|
1527
|
+
lhs, _, splat, _, rhs = val
|
1469
1528
|
|
1470
|
-
result = block_var
|
1529
|
+
result = block_var lhs, splat, rhs
|
1471
1530
|
}
|
1472
|
-
|
|
1531
|
+
| f_rest_marg
|
1473
1532
|
{
|
1474
|
-
|
1533
|
+
rest, = val
|
1475
1534
|
|
1476
|
-
result = block_var
|
1535
|
+
result = block_var rest
|
1477
1536
|
}
|
1478
|
-
|
|
1537
|
+
| f_rest_marg tCOMMA f_marg_list
|
1479
1538
|
{
|
1480
|
-
|
1539
|
+
splat, _, rest = val
|
1481
1540
|
|
1482
|
-
result = block_var
|
1541
|
+
result = block_var splat, rest
|
1483
1542
|
}
|
1484
|
-
| tSTAR f_norm_arg
|
1485
|
-
{
|
1486
|
-
_, splat = val
|
1487
1543
|
|
1488
|
-
|
1489
|
-
}
|
1490
|
-
| tSTAR f_norm_arg tCOMMA f_marg_list
|
1544
|
+
f_rest_marg: tSTAR f_norm_arg
|
1491
1545
|
{
|
1492
|
-
_,
|
1546
|
+
_, (id, line) = val
|
1493
1547
|
|
1494
|
-
result =
|
1548
|
+
result = args ["*#{id}".to_sym]
|
1549
|
+
result.line line
|
1495
1550
|
}
|
1496
1551
|
| tSTAR
|
1497
1552
|
{
|
1498
|
-
result =
|
1499
|
-
|
1500
|
-
| tSTAR tCOMMA f_marg_list
|
1501
|
-
{
|
1502
|
-
_, _, args = val
|
1503
|
-
|
1504
|
-
result = block_var :*, args
|
1553
|
+
result = args [:*]
|
1554
|
+
result.line lexer.lineno # FIX: tSTAR -> line
|
1505
1555
|
}
|
1506
1556
|
|
1507
1557
|
block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg
|
@@ -1518,8 +1568,8 @@ rule
|
|
1518
1568
|
}
|
1519
1569
|
| f_block_arg
|
1520
1570
|
{
|
1521
|
-
line =
|
1522
|
-
result = call_args
|
1571
|
+
(id, line), = val
|
1572
|
+
result = call_args [id]
|
1523
1573
|
result.line line
|
1524
1574
|
}
|
1525
1575
|
|
@@ -1628,13 +1678,13 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1628
1678
|
|
1629
1679
|
bvar: tIDENTIFIER
|
1630
1680
|
{
|
1631
|
-
id, = val
|
1632
|
-
line = lexer.lineno
|
1681
|
+
(id, line), = val
|
1633
1682
|
result = s(:shadow, id.to_sym).line line
|
1634
1683
|
}
|
1635
1684
|
| f_bad_arg
|
1636
1685
|
|
1637
|
-
lambda:
|
1686
|
+
lambda: tLAMBDA
|
1687
|
+
{
|
1638
1688
|
self.env.extend :dynamic
|
1639
1689
|
result = [lexer.lineno, lexer.lpar_beg]
|
1640
1690
|
lexer.paren_nest += 1
|
@@ -1642,20 +1692,19 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1642
1692
|
}
|
1643
1693
|
f_larglist
|
1644
1694
|
{
|
1645
|
-
|
1695
|
+
lexer.cmdarg.push false
|
1646
1696
|
}
|
1647
1697
|
lambda_body
|
1648
1698
|
{
|
1649
|
-
(line, lpar), args,
|
1699
|
+
_, (line, lpar), args, _cmdarg, body = val
|
1650
1700
|
lexer.lpar_beg = lpar
|
1651
1701
|
|
1652
|
-
lexer.cmdarg.
|
1653
|
-
lexer.cmdarg.lexpop
|
1702
|
+
lexer.cmdarg.pop
|
1654
1703
|
|
1655
1704
|
call = s(:lambda).line line
|
1656
1705
|
result = new_iter call, args, body
|
1657
|
-
result.line
|
1658
|
-
self.env.unextend
|
1706
|
+
result.line line
|
1707
|
+
self.env.unextend # TODO: dynapush & dynapop
|
1659
1708
|
}
|
1660
1709
|
|
1661
1710
|
f_larglist: tLPAREN2 f_args opt_bv_decl rparen
|
@@ -1689,23 +1738,28 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1689
1738
|
## if (nd_type($1) == NODE_YIELD) {
|
1690
1739
|
## compile_error(PARSER_ARG "block given to yield");
|
1691
1740
|
|
1692
|
-
|
1693
|
-
val[0].block_pass?
|
1741
|
+
cmd, blk = val
|
1694
1742
|
|
1695
|
-
|
1743
|
+
syntax_error "Both block arg and actual block given." if
|
1744
|
+
cmd.block_pass?
|
1696
1745
|
|
1697
|
-
|
1746
|
+
if inverted? val then
|
1747
|
+
val = invert_block_call val
|
1748
|
+
cmd, blk = val
|
1749
|
+
end
|
1698
1750
|
|
1699
1751
|
result = blk
|
1700
1752
|
result.insert 1, cmd
|
1701
1753
|
}
|
1702
1754
|
| block_call call_op2 operation2 opt_paren_args
|
1703
1755
|
{
|
1704
|
-
|
1756
|
+
lhs, _, (id, _line), args = val
|
1757
|
+
|
1758
|
+
result = new_call lhs, id.to_sym, args
|
1705
1759
|
}
|
1706
1760
|
| block_call call_op2 operation2 opt_paren_args brace_block
|
1707
1761
|
{
|
1708
|
-
iter1, _, name, args, iter2 = val
|
1762
|
+
iter1, _, (name, _line), args, iter2 = val
|
1709
1763
|
|
1710
1764
|
call = new_call iter1, name.to_sym, args
|
1711
1765
|
iter2.insert 1, call
|
@@ -1714,7 +1768,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1714
1768
|
}
|
1715
1769
|
| block_call call_op2 operation2 command_args do_block
|
1716
1770
|
{
|
1717
|
-
iter1, _, name, args, iter2 = val
|
1771
|
+
iter1, _, (name, _line), args, iter2 = val
|
1718
1772
|
|
1719
1773
|
call = new_call iter1, name.to_sym, args
|
1720
1774
|
iter2.insert 1, call
|
@@ -1722,28 +1776,29 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1722
1776
|
result = iter2
|
1723
1777
|
}
|
1724
1778
|
|
1725
|
-
method_call: fcall
|
1726
|
-
{
|
1727
|
-
result = self.lexer.lineno
|
1728
|
-
}
|
1729
|
-
paren_args
|
1779
|
+
method_call: fcall paren_args
|
1730
1780
|
{
|
1731
|
-
call,
|
1781
|
+
call, args = val
|
1732
1782
|
|
1733
1783
|
result = call.concat args.sexp_body if args
|
1734
|
-
result.line lineno
|
1735
1784
|
}
|
1736
1785
|
| primary_value call_op operation2 opt_paren_args
|
1737
1786
|
{
|
1738
|
-
|
1787
|
+
recv, call_op, (op, _line), args = val
|
1788
|
+
|
1789
|
+
result = new_call recv, op.to_sym, args, call_op
|
1739
1790
|
}
|
1740
1791
|
| primary_value tCOLON2 operation2 paren_args
|
1741
1792
|
{
|
1742
|
-
|
1793
|
+
recv, _, (op, _line), args = val
|
1794
|
+
|
1795
|
+
result = new_call recv, op.to_sym, args
|
1743
1796
|
}
|
1744
1797
|
| primary_value tCOLON2 operation3
|
1745
1798
|
{
|
1746
|
-
|
1799
|
+
lhs, _, (id, _line) = val
|
1800
|
+
|
1801
|
+
result = new_call lhs, id.to_sym
|
1747
1802
|
}
|
1748
1803
|
| primary_value call_op paren_args
|
1749
1804
|
{
|
@@ -1776,7 +1831,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1776
1831
|
_, line, body, _ = val
|
1777
1832
|
|
1778
1833
|
result = body
|
1779
|
-
result.line
|
1834
|
+
result.line line
|
1780
1835
|
|
1781
1836
|
self.env.unextend
|
1782
1837
|
}
|
@@ -1790,7 +1845,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1790
1845
|
_, line, body, _ = val
|
1791
1846
|
|
1792
1847
|
result = body
|
1793
|
-
result.line
|
1848
|
+
result.line line
|
1794
1849
|
|
1795
1850
|
self.env.unextend
|
1796
1851
|
}
|
@@ -1808,25 +1863,50 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1808
1863
|
}
|
1809
1864
|
|
1810
1865
|
do_body: { self.env.extend :dynamic; result = self.lexer.lineno }
|
1811
|
-
{
|
1866
|
+
{ lexer.cmdarg.push false }
|
1812
1867
|
opt_block_param
|
1813
1868
|
compstmt
|
1814
1869
|
{
|
1815
|
-
line,
|
1870
|
+
line, _cmdarg, param, cmpstmt = val
|
1816
1871
|
|
1817
1872
|
result = new_do_body param, cmpstmt, line
|
1873
|
+
lexer.cmdarg.pop
|
1818
1874
|
self.env.unextend
|
1819
|
-
|
1875
|
+
}
|
1876
|
+
|
1877
|
+
case_args: arg_value
|
1878
|
+
{
|
1879
|
+
arg, = val
|
1880
|
+
|
1881
|
+
result = s(:array, arg).line arg.line
|
1882
|
+
}
|
1883
|
+
| tSTAR arg_value
|
1884
|
+
{
|
1885
|
+
_, arg = val
|
1886
|
+
|
1887
|
+
result = s(:array, s(:splat, arg).line(arg.line)).line arg.line
|
1888
|
+
}
|
1889
|
+
| case_args tCOMMA arg_value
|
1890
|
+
{
|
1891
|
+
args, _, id = val
|
1892
|
+
|
1893
|
+
result = self.list_append args, id
|
1894
|
+
}
|
1895
|
+
| case_args tCOMMA tSTAR arg_value
|
1896
|
+
{
|
1897
|
+
args, _, _, id = val
|
1898
|
+
|
1899
|
+
result = self.list_append args, s(:splat, id).line(id.line)
|
1820
1900
|
}
|
1821
1901
|
|
1822
1902
|
case_body: k_when
|
1823
1903
|
{
|
1824
1904
|
result = self.lexer.lineno
|
1825
1905
|
}
|
1826
|
-
|
1906
|
+
case_args then compstmt cases
|
1827
1907
|
{
|
1828
1908
|
result = new_when(val[2], val[4])
|
1829
|
-
result.line
|
1909
|
+
result.line val[1]
|
1830
1910
|
result << val[5] if val[5]
|
1831
1911
|
}
|
1832
1912
|
|
@@ -1872,17 +1952,10 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1872
1952
|
|
1873
1953
|
literal: numeric
|
1874
1954
|
{
|
1875
|
-
line =
|
1876
|
-
result = s(:lit,
|
1877
|
-
result.line = line
|
1955
|
+
(lit, line), = val
|
1956
|
+
result = s(:lit, lit).line line
|
1878
1957
|
}
|
1879
1958
|
| symbol
|
1880
|
-
{
|
1881
|
-
line = lexer.lineno
|
1882
|
-
result = s(:lit, val[0])
|
1883
|
-
result.line = line
|
1884
|
-
}
|
1885
|
-
| dsym
|
1886
1959
|
|
1887
1960
|
strings: string
|
1888
1961
|
{
|
@@ -1893,7 +1966,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1893
1966
|
|
1894
1967
|
string: tCHAR
|
1895
1968
|
{
|
1896
|
-
|
1969
|
+
debug 37
|
1897
1970
|
}
|
1898
1971
|
| string1
|
1899
1972
|
| string string1
|
@@ -1903,11 +1976,11 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1903
1976
|
|
1904
1977
|
string1: tSTRING_BEG string_contents tSTRING_END
|
1905
1978
|
{
|
1906
|
-
_, str, (_, func) = val
|
1979
|
+
(_, line), str, (_, func) = val
|
1907
1980
|
|
1908
|
-
str = dedent str if func =~ RubyLexer::
|
1981
|
+
str = dedent str if func =~ RubyLexer::STR_FUNC_DEDENT
|
1909
1982
|
|
1910
|
-
result = str
|
1983
|
+
result = str.line line
|
1911
1984
|
}
|
1912
1985
|
| tSTRING
|
1913
1986
|
{
|
@@ -1916,7 +1989,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1916
1989
|
|
1917
1990
|
xstring: tXSTRING_BEG xstring_contents tSTRING_END
|
1918
1991
|
{
|
1919
|
-
result = new_xstring val
|
1992
|
+
result = new_xstring val
|
1920
1993
|
# TODO: dedent?!?! SERIOUSLY?!?
|
1921
1994
|
}
|
1922
1995
|
|
@@ -1927,11 +2000,15 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1927
2000
|
|
1928
2001
|
words: tWORDS_BEG tSPACE tSTRING_END
|
1929
2002
|
{
|
1930
|
-
|
2003
|
+
(_, line), _, _ = val
|
2004
|
+
|
2005
|
+
result = s(:array).line line
|
1931
2006
|
}
|
1932
2007
|
| tWORDS_BEG word_list tSTRING_END
|
1933
2008
|
{
|
1934
|
-
|
2009
|
+
(_, line), list, _ = val
|
2010
|
+
|
2011
|
+
result = list.line line
|
1935
2012
|
}
|
1936
2013
|
|
1937
2014
|
word_list: none
|
@@ -1951,18 +2028,20 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1951
2028
|
|
1952
2029
|
symbols: tSYMBOLS_BEG tSPACE tSTRING_END
|
1953
2030
|
{
|
1954
|
-
|
2031
|
+
(_, line), _, _ = val
|
2032
|
+
|
2033
|
+
result = s(:array).line line
|
1955
2034
|
}
|
1956
|
-
| tSYMBOLS_BEG
|
2035
|
+
| tSYMBOLS_BEG symbol_list tSTRING_END
|
1957
2036
|
{
|
1958
|
-
_, line, list, _, = val
|
1959
|
-
list.line
|
2037
|
+
(_, line), list, _, = val
|
2038
|
+
list.line line
|
1960
2039
|
result = list
|
1961
2040
|
}
|
1962
2041
|
|
1963
2042
|
symbol_list: none
|
1964
2043
|
{
|
1965
|
-
result = new_symbol_list
|
2044
|
+
result = new_symbol_list
|
1966
2045
|
}
|
1967
2046
|
| symbol_list word tSPACE
|
1968
2047
|
{
|
@@ -1972,20 +2051,28 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1972
2051
|
|
1973
2052
|
qwords: tQWORDS_BEG tSPACE tSTRING_END
|
1974
2053
|
{
|
1975
|
-
|
2054
|
+
(_, line), _, _ = val
|
2055
|
+
|
2056
|
+
result = s(:array).line line
|
1976
2057
|
}
|
1977
2058
|
| tQWORDS_BEG qword_list tSTRING_END
|
1978
2059
|
{
|
1979
|
-
|
2060
|
+
(_, line), list, _ = val
|
2061
|
+
|
2062
|
+
result = list.line line
|
1980
2063
|
}
|
1981
2064
|
|
1982
2065
|
qsymbols: tQSYMBOLS_BEG tSPACE tSTRING_END
|
1983
2066
|
{
|
1984
|
-
|
2067
|
+
(_, line), _, _ = val
|
2068
|
+
|
2069
|
+
result = s(:array).line line
|
1985
2070
|
}
|
1986
2071
|
| tQSYMBOLS_BEG qsym_list tSTRING_END
|
1987
2072
|
{
|
1988
|
-
|
2073
|
+
(_, line), list, _ = val
|
2074
|
+
|
2075
|
+
result = list.line line
|
1989
2076
|
}
|
1990
2077
|
|
1991
2078
|
qword_list: none
|
@@ -2008,7 +2095,8 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
2008
2095
|
|
2009
2096
|
string_contents: none
|
2010
2097
|
{
|
2011
|
-
|
2098
|
+
line = prev_value_to_lineno _values.last
|
2099
|
+
result = s(:str, +"").line line
|
2012
2100
|
}
|
2013
2101
|
| string_contents string_content
|
2014
2102
|
{
|
@@ -2058,12 +2146,13 @@ regexp_contents: none
|
|
2058
2146
|
result = [lexer.lex_strterm,
|
2059
2147
|
lexer.brace_nest,
|
2060
2148
|
lexer.string_nest, # TODO: remove
|
2061
|
-
lexer.cond.store,
|
2062
|
-
lexer.cmdarg.store,
|
2063
2149
|
lexer.lex_state,
|
2064
2150
|
lexer.lineno,
|
2065
2151
|
]
|
2066
2152
|
|
2153
|
+
lexer.cmdarg.push false
|
2154
|
+
lexer.cond.push false
|
2155
|
+
|
2067
2156
|
lexer.lex_strterm = nil
|
2068
2157
|
lexer.brace_nest = 0
|
2069
2158
|
lexer.string_nest = 0
|
@@ -2075,14 +2164,15 @@ regexp_contents: none
|
|
2075
2164
|
{
|
2076
2165
|
_, memo, stmt, _ = val
|
2077
2166
|
|
2078
|
-
lex_strterm, brace_nest, string_nest,
|
2167
|
+
lex_strterm, brace_nest, string_nest, oldlex_state, line = memo
|
2168
|
+
# TODO: heredoc_indent
|
2079
2169
|
|
2080
2170
|
lexer.lex_strterm = lex_strterm
|
2081
2171
|
lexer.brace_nest = brace_nest
|
2082
2172
|
lexer.string_nest = string_nest
|
2083
2173
|
|
2084
|
-
lexer.cond.
|
2085
|
-
lexer.cmdarg.
|
2174
|
+
lexer.cond.pop
|
2175
|
+
lexer.cmdarg.pop
|
2086
2176
|
|
2087
2177
|
lexer.lex_state = oldlex_state
|
2088
2178
|
|
@@ -2097,29 +2187,49 @@ regexp_contents: none
|
|
2097
2187
|
when nil then
|
2098
2188
|
result = s(:evstr).line line
|
2099
2189
|
else
|
2100
|
-
|
2190
|
+
debug 38
|
2101
2191
|
raise "unknown string body: #{stmt.inspect}"
|
2102
2192
|
end
|
2103
2193
|
}
|
2104
2194
|
|
2105
|
-
string_dvar: tGVAR
|
2106
|
-
|
2107
|
-
|
2195
|
+
string_dvar: tGVAR
|
2196
|
+
{
|
2197
|
+
(id, line), = val
|
2198
|
+
result = s(:gvar, id.to_sym).line line
|
2199
|
+
}
|
2200
|
+
| tIVAR
|
2201
|
+
{
|
2202
|
+
(id, line), = val
|
2203
|
+
result = s(:ivar, id.to_sym).line line
|
2204
|
+
}
|
2205
|
+
| tCVAR
|
2206
|
+
{
|
2207
|
+
(id, line), = val
|
2208
|
+
result = s(:cvar, id.to_sym).line line
|
2209
|
+
}
|
2108
2210
|
| backref
|
2109
2211
|
|
2110
|
-
symbol:
|
2212
|
+
symbol: ssym
|
2213
|
+
| dsym
|
2214
|
+
|
2215
|
+
ssym: tSYMBEG sym
|
2111
2216
|
{
|
2217
|
+
_, (id, line) = val
|
2218
|
+
|
2112
2219
|
lexer.lex_state = EXPR_END
|
2113
|
-
result =
|
2220
|
+
result = s(:lit, id.to_sym).line line
|
2114
2221
|
}
|
2115
2222
|
| tSYMBOL
|
2116
2223
|
{
|
2117
|
-
|
2224
|
+
(id, line), = val
|
2225
|
+
|
2226
|
+
lexer.lex_state = EXPR_END
|
2227
|
+
result = s(:lit, id.to_sym).line line
|
2118
2228
|
}
|
2119
2229
|
|
2120
2230
|
sym: fname | tIVAR | tGVAR | tCVAR
|
2121
2231
|
|
2122
|
-
dsym: tSYMBEG
|
2232
|
+
dsym: tSYMBEG string_contents tSTRING_END
|
2123
2233
|
{
|
2124
2234
|
_, result, _ = val
|
2125
2235
|
|
@@ -2135,14 +2245,15 @@ regexp_contents: none
|
|
2135
2245
|
when :evstr then
|
2136
2246
|
result = s(:dsym, "", result).line result.line
|
2137
2247
|
else
|
2138
|
-
|
2248
|
+
debug 39
|
2139
2249
|
end
|
2140
2250
|
}
|
2141
2251
|
|
2142
2252
|
numeric: simple_numeric
|
2143
|
-
| tUMINUS_NUM simple_numeric
|
2253
|
+
| tUMINUS_NUM simple_numeric =tLOWEST
|
2144
2254
|
{
|
2145
|
-
|
2255
|
+
_, (num, line) = val
|
2256
|
+
result = [-num, line]
|
2146
2257
|
}
|
2147
2258
|
|
2148
2259
|
simple_numeric: tINTEGER
|
@@ -2175,8 +2286,10 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2175
2286
|
|
2176
2287
|
var_ref: user_variable
|
2177
2288
|
{
|
2178
|
-
|
2289
|
+
raise "NO: #{val.inspect}" if Sexp === val.first
|
2290
|
+
(var, line), = val
|
2179
2291
|
result = Sexp === var ? var : self.gettable(var)
|
2292
|
+
result.line line
|
2180
2293
|
}
|
2181
2294
|
| keyword_variable
|
2182
2295
|
{
|
@@ -2191,11 +2304,19 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2191
2304
|
| keyword_variable
|
2192
2305
|
{
|
2193
2306
|
result = self.assignable val[0]
|
2194
|
-
|
2307
|
+
debug 40
|
2195
2308
|
}
|
2196
2309
|
|
2197
|
-
backref: tNTH_REF
|
2198
|
-
|
2310
|
+
backref: tNTH_REF
|
2311
|
+
{
|
2312
|
+
(ref, line), = val
|
2313
|
+
result = s(:nth_ref, ref).line line
|
2314
|
+
}
|
2315
|
+
| tBACK_REF
|
2316
|
+
{
|
2317
|
+
(ref, line), = val
|
2318
|
+
result = s(:back_ref, ref).line line
|
2319
|
+
}
|
2199
2320
|
|
2200
2321
|
superclass: tLT
|
2201
2322
|
{
|
@@ -2213,9 +2334,7 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2213
2334
|
|
2214
2335
|
f_arglist: tLPAREN2 f_args rparen
|
2215
2336
|
{
|
2216
|
-
result = val
|
2217
|
-
self.lexer.lex_state = EXPR_BEG
|
2218
|
-
self.lexer.command_start = true
|
2337
|
+
result = end_args val
|
2219
2338
|
}
|
2220
2339
|
| {
|
2221
2340
|
result = self.in_kwarg
|
@@ -2224,12 +2343,7 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2224
2343
|
}
|
2225
2344
|
f_args term
|
2226
2345
|
{
|
2227
|
-
|
2228
|
-
|
2229
|
-
self.in_kwarg = kwarg
|
2230
|
-
result = args
|
2231
|
-
lexer.lex_state = EXPR_BEG
|
2232
|
-
lexer.command_start = true
|
2346
|
+
result = end_args val
|
2233
2347
|
}
|
2234
2348
|
|
2235
2349
|
args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg
|
@@ -2314,8 +2428,10 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2314
2428
|
|
|
2315
2429
|
{
|
2316
2430
|
result = args val
|
2431
|
+
# result.line lexer.lineno
|
2317
2432
|
}
|
2318
2433
|
|
2434
|
+
|
2319
2435
|
f_bad_arg: tCONSTANT
|
2320
2436
|
{
|
2321
2437
|
yyerror "formal argument cannot be a constant"
|
@@ -2336,10 +2452,11 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2336
2452
|
f_norm_arg: f_bad_arg
|
2337
2453
|
| tIDENTIFIER
|
2338
2454
|
{
|
2339
|
-
|
2455
|
+
(id, line), = val
|
2456
|
+
identifier = id.to_sym
|
2340
2457
|
self.env[identifier] = :lvar
|
2341
2458
|
|
2342
|
-
result = identifier
|
2459
|
+
result = [identifier, line]
|
2343
2460
|
}
|
2344
2461
|
|
2345
2462
|
f_arg_asgn: f_norm_arg
|
@@ -2347,22 +2464,14 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2347
2464
|
f_arg_item: f_arg_asgn
|
2348
2465
|
| tLPAREN f_margs rparen
|
2349
2466
|
{
|
2350
|
-
|
2467
|
+
_, margs, _ = val
|
2468
|
+
|
2469
|
+
result = margs
|
2351
2470
|
}
|
2352
2471
|
|
2353
2472
|
f_arg: f_arg_item
|
2354
2473
|
{
|
2355
|
-
|
2356
|
-
|
2357
|
-
case arg
|
2358
|
-
when Symbol then
|
2359
|
-
result = s(:args, arg).line lexer.lineno
|
2360
|
-
when Sexp then
|
2361
|
-
result = arg
|
2362
|
-
else
|
2363
|
-
debug20 32
|
2364
|
-
raise "Unknown f_arg type: #{val.inspect}"
|
2365
|
-
end
|
2474
|
+
result = new_arg val
|
2366
2475
|
}
|
2367
2476
|
| f_arg tCOMMA f_arg_item
|
2368
2477
|
{
|
@@ -2374,7 +2483,7 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2374
2483
|
result = s(:args, list).line list.line
|
2375
2484
|
end
|
2376
2485
|
|
2377
|
-
result << item
|
2486
|
+
result << (Sexp === item ? item : item.first)
|
2378
2487
|
}
|
2379
2488
|
|
2380
2489
|
f_label: tLABEL
|
@@ -2435,26 +2544,33 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2435
2544
|
kwrest_mark: tPOW
|
2436
2545
|
| tDSTAR
|
2437
2546
|
|
2547
|
+
|
2438
2548
|
f_kwrest: kwrest_mark tIDENTIFIER
|
2439
2549
|
{
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2550
|
+
_, (id, line) = val
|
2551
|
+
|
2552
|
+
name = id.to_sym
|
2553
|
+
self.assignable [name, line]
|
2554
|
+
result = [:"**#{name}", line]
|
2443
2555
|
}
|
2444
2556
|
| kwrest_mark
|
2445
2557
|
{
|
2446
|
-
|
2558
|
+
id = :"**"
|
2559
|
+
self.env[id] = :lvar # TODO: needed?!?
|
2560
|
+
result = [id, lexer.lineno] # TODO: tPOW/tDSTAR include lineno
|
2447
2561
|
}
|
2448
2562
|
|
2449
2563
|
f_opt: f_arg_asgn tEQL arg_value
|
2450
2564
|
{
|
2451
|
-
|
2565
|
+
lhs, _, rhs = val
|
2566
|
+
result = self.assignable lhs, rhs
|
2452
2567
|
# TODO: detect duplicate names
|
2453
2568
|
}
|
2454
2569
|
|
2455
2570
|
f_block_opt: f_arg_asgn tEQL primary_value
|
2456
2571
|
{
|
2457
|
-
|
2572
|
+
lhs, _, rhs = val
|
2573
|
+
result = self.assignable lhs, rhs
|
2458
2574
|
}
|
2459
2575
|
|
2460
2576
|
f_block_optarg: f_block_opt
|
@@ -2484,30 +2600,33 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2484
2600
|
f_rest_arg: restarg_mark tIDENTIFIER
|
2485
2601
|
{
|
2486
2602
|
# TODO: differs from parse.y - needs tests
|
2487
|
-
|
2488
|
-
|
2489
|
-
|
2603
|
+
_, (id, line) = val
|
2604
|
+
name = id.to_sym
|
2605
|
+
self.assignable [name, line]
|
2606
|
+
result = [:"*#{name}", line]
|
2490
2607
|
}
|
2491
2608
|
| restarg_mark
|
2492
2609
|
{
|
2493
2610
|
name = :"*"
|
2494
2611
|
self.env[name] = :lvar
|
2495
|
-
result = name
|
2612
|
+
result = [name, lexer.lineno] # FIX: tSTAR to include lineno
|
2496
2613
|
}
|
2497
2614
|
|
2498
2615
|
blkarg_mark: tAMPER2 | tAMPER
|
2499
2616
|
|
2500
2617
|
f_block_arg: blkarg_mark tIDENTIFIER
|
2501
2618
|
{
|
2502
|
-
|
2619
|
+
_, (id, line) = val
|
2620
|
+
identifier = id.to_sym
|
2503
2621
|
|
2504
2622
|
self.env[identifier] = :lvar
|
2505
|
-
result = "&#{identifier}".to_sym
|
2623
|
+
result = ["&#{identifier}".to_sym, line]
|
2506
2624
|
}
|
2507
2625
|
|
2508
2626
|
opt_f_block_arg: tCOMMA f_block_arg
|
2509
2627
|
{
|
2510
|
-
|
2628
|
+
_, arg = val
|
2629
|
+
result = arg
|
2511
2630
|
}
|
2512
2631
|
|
|
2513
2632
|
{
|
@@ -2556,9 +2675,11 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2556
2675
|
}
|
2557
2676
|
| tSTRING_BEG string_contents tLABEL_END arg_value
|
2558
2677
|
{
|
2559
|
-
_, sym, _, value = val
|
2678
|
+
(_, line), sym, _, value = val
|
2679
|
+
|
2560
2680
|
sym.sexp_type = :dsym
|
2561
|
-
|
2681
|
+
|
2682
|
+
result = s(:array, sym, value).line line
|
2562
2683
|
}
|
2563
2684
|
| tDSTAR arg_value
|
2564
2685
|
{
|