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
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- racc -*-
|
2
2
|
|
3
|
-
class
|
3
|
+
class Ruby25Parser
|
4
4
|
|
5
5
|
token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS
|
6
6
|
kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT
|
@@ -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
|
{
|
@@ -308,7 +318,7 @@ rule
|
|
308
318
|
# TODO: fix line number to tBANG... but causes BAD shift/reduce conflict
|
309
319
|
# REFACTOR: call_uni_op -- see parse26.y
|
310
320
|
}
|
311
|
-
| arg
|
321
|
+
| arg =tLBRACE_ARG
|
312
322
|
|
313
323
|
expr_value: expr
|
314
324
|
{
|
@@ -333,7 +343,7 @@ rule
|
|
333
343
|
block_command: block_call
|
334
344
|
| block_call call_op2 operation2 command_args
|
335
345
|
{
|
336
|
-
blk, _, msg, args = val
|
346
|
+
blk, _, (msg, _line), args = val
|
337
347
|
result = new_call(blk, msg.to_sym, args).line blk.line
|
338
348
|
}
|
339
349
|
|
@@ -347,15 +357,15 @@ rule
|
|
347
357
|
_, line, body, _ = val
|
348
358
|
|
349
359
|
result = body
|
350
|
-
result.line
|
360
|
+
result.line line
|
351
361
|
|
352
362
|
# self.env.unextend
|
353
363
|
}
|
354
364
|
|
355
365
|
fcall: operation
|
356
366
|
{
|
357
|
-
msg, = val
|
358
|
-
result = new_call(nil, msg.to_sym).line
|
367
|
+
(msg, line), = val
|
368
|
+
result = new_call(nil, msg.to_sym).line line
|
359
369
|
}
|
360
370
|
|
361
371
|
command: fcall command_args =tLOWEST
|
@@ -378,12 +388,14 @@ rule
|
|
378
388
|
}
|
379
389
|
| primary_value call_op operation2 command_args =tLOWEST
|
380
390
|
{
|
381
|
-
lhs, callop, op, args = val
|
391
|
+
lhs, callop, (op, _), args = val
|
392
|
+
|
382
393
|
result = new_call lhs, op.to_sym, args, callop
|
394
|
+
result.line lhs.line
|
383
395
|
}
|
384
396
|
| primary_value call_op operation2 command_args cmd_brace_block
|
385
397
|
{
|
386
|
-
recv, _, msg, args, block = val
|
398
|
+
recv, _, (msg, _line), args, block = val
|
387
399
|
call = new_call recv, msg.to_sym, args, val[1]
|
388
400
|
|
389
401
|
block_dup_check call, block
|
@@ -393,11 +405,14 @@ rule
|
|
393
405
|
}
|
394
406
|
| primary_value tCOLON2 operation2 command_args =tLOWEST
|
395
407
|
{
|
396
|
-
|
408
|
+
lhs, _, (id, line), args = val
|
409
|
+
|
410
|
+
result = new_call lhs, id.to_sym, args
|
411
|
+
result.line line
|
397
412
|
}
|
398
413
|
| primary_value tCOLON2 operation2 command_args cmd_brace_block
|
399
414
|
{
|
400
|
-
recv, _, msg, args, block = val
|
415
|
+
recv, _, (msg, _line), args, block = val
|
401
416
|
call = new_call recv, msg.to_sym, args
|
402
417
|
|
403
418
|
block_dup_check call, block
|
@@ -555,25 +570,29 @@ rule
|
|
555
570
|
}
|
556
571
|
| primary_value call_op tIDENTIFIER
|
557
572
|
{
|
558
|
-
|
573
|
+
lhs, call_op, (id, _line) = val
|
574
|
+
|
575
|
+
result = new_attrasgn lhs, id, call_op
|
559
576
|
}
|
560
577
|
| primary_value tCOLON2 tIDENTIFIER
|
561
578
|
{
|
562
|
-
recv, _, id = val
|
579
|
+
recv, _, (id, _line) = val
|
563
580
|
result = new_attrasgn recv, id
|
564
581
|
}
|
565
582
|
| primary_value call_op tCONSTANT
|
566
583
|
{
|
567
|
-
|
584
|
+
lhs, call_op, (id, _line) = val
|
585
|
+
|
586
|
+
result = new_attrasgn lhs, id, call_op
|
568
587
|
}
|
569
588
|
| primary_value tCOLON2 tCONSTANT
|
570
589
|
{
|
571
590
|
if (self.in_def || self.in_single > 0) then
|
572
|
-
|
591
|
+
debug 14
|
573
592
|
yyerror "dynamic constant assignment"
|
574
593
|
end
|
575
594
|
|
576
|
-
expr, _, id = val
|
595
|
+
expr, _, (id, _line) = val
|
577
596
|
l = expr.line
|
578
597
|
|
579
598
|
result = s(:const, s(:colon2, expr, id.to_sym).line(l), nil).line l
|
@@ -581,58 +600,65 @@ rule
|
|
581
600
|
| tCOLON3 tCONSTANT
|
582
601
|
{
|
583
602
|
if (self.in_def || self.in_single > 0) then
|
584
|
-
|
603
|
+
debug 15
|
585
604
|
yyerror "dynamic constant assignment"
|
586
605
|
end
|
587
606
|
|
588
|
-
_, id = val
|
589
|
-
l = lexer.lineno
|
607
|
+
_, (id, l) = val
|
590
608
|
|
591
609
|
result = s(:const, nil, s(:colon3, id.to_sym).line(l)).line l
|
592
610
|
}
|
593
611
|
| backref
|
594
612
|
{
|
595
|
-
|
613
|
+
ref, = val
|
614
|
+
|
615
|
+
self.backref_assign_error ref
|
596
616
|
}
|
597
617
|
|
598
618
|
lhs: user_variable
|
599
619
|
{
|
600
|
-
|
601
|
-
|
602
|
-
result
|
620
|
+
var, = val
|
621
|
+
|
622
|
+
result = self.assignable var
|
603
623
|
}
|
604
624
|
| keyword_variable
|
605
625
|
{
|
606
|
-
|
607
|
-
|
608
|
-
result
|
609
|
-
|
626
|
+
var, = val
|
627
|
+
|
628
|
+
result = self.assignable var
|
629
|
+
|
630
|
+
debug 16
|
610
631
|
}
|
611
632
|
| primary_value tLBRACK2 opt_call_args rbracket
|
612
633
|
{
|
613
634
|
lhs, _, args, _ = val
|
635
|
+
|
614
636
|
result = self.aryset lhs, args
|
615
637
|
}
|
616
638
|
| primary_value call_op tIDENTIFIER # REFACTOR
|
617
639
|
{
|
618
|
-
lhs, op, id = val
|
640
|
+
lhs, op, (id, _line) = val
|
641
|
+
|
619
642
|
result = new_attrasgn lhs, id, op
|
620
643
|
}
|
621
644
|
| primary_value tCOLON2 tIDENTIFIER
|
622
645
|
{
|
623
|
-
lhs, _, id = val
|
646
|
+
lhs, _, (id, _line) = val
|
647
|
+
|
624
648
|
result = new_attrasgn lhs, id
|
625
649
|
}
|
626
650
|
| primary_value call_op tCONSTANT # REFACTOR?
|
627
651
|
{
|
628
|
-
|
652
|
+
lhs, call_op, (id, _line) = val
|
653
|
+
|
654
|
+
result = new_attrasgn lhs, id, call_op
|
629
655
|
}
|
630
656
|
| primary_value tCOLON2 tCONSTANT
|
631
657
|
{
|
632
|
-
expr, _, id = val
|
658
|
+
expr, _, (id, _line) = val
|
633
659
|
|
634
660
|
if (self.in_def || self.in_single > 0) then
|
635
|
-
|
661
|
+
debug 17
|
636
662
|
yyerror "dynamic constant assignment"
|
637
663
|
end
|
638
664
|
|
@@ -641,14 +667,13 @@ rule
|
|
641
667
|
}
|
642
668
|
| tCOLON3 tCONSTANT
|
643
669
|
{
|
644
|
-
_, id = val
|
670
|
+
_, (id, l) = val
|
645
671
|
|
646
672
|
if (self.in_def || self.in_single > 0) then
|
647
|
-
|
673
|
+
debug 18
|
648
674
|
yyerror "dynamic constant assignment"
|
649
675
|
end
|
650
676
|
|
651
|
-
l = lexer.lineno
|
652
677
|
result = s(:const, s(:colon3, id.to_sym).line(l)).line l
|
653
678
|
}
|
654
679
|
| backref
|
@@ -664,16 +689,17 @@ rule
|
|
664
689
|
|
665
690
|
cpath: tCOLON3 cname
|
666
691
|
{
|
667
|
-
_, name = val
|
668
|
-
result = s(:colon3, name.to_sym).line
|
692
|
+
_, (name, line) = val
|
693
|
+
result = s(:colon3, name.to_sym).line line
|
669
694
|
}
|
670
695
|
| cname
|
671
696
|
{
|
672
|
-
|
697
|
+
(id, line), = val
|
698
|
+
result = [id.to_sym, line] # TODO: sexp?
|
673
699
|
}
|
674
700
|
| primary_value tCOLON2 cname
|
675
701
|
{
|
676
|
-
pval, _, name = val
|
702
|
+
pval, _, (name, _line) = val
|
677
703
|
|
678
704
|
result = s(:colon2, pval, name.to_sym)
|
679
705
|
result.line pval.line
|
@@ -683,24 +709,17 @@ rule
|
|
683
709
|
| op
|
684
710
|
{
|
685
711
|
lexer.lex_state = EXPR_END
|
686
|
-
result = val[0]
|
687
712
|
}
|
688
713
|
|
689
714
|
| reswords
|
690
|
-
{
|
691
|
-
(sym, _line), = val
|
692
|
-
lexer.lex_state = EXPR_END
|
693
|
-
result = sym
|
694
|
-
}
|
695
|
-
|
696
|
-
fsym: fname | symbol
|
697
715
|
|
698
|
-
fitem:
|
716
|
+
fitem: fname
|
699
717
|
{
|
700
|
-
id, = val
|
701
|
-
|
718
|
+
(id, line), = val
|
719
|
+
|
720
|
+
result = s(:lit, id.to_sym).line line
|
702
721
|
}
|
703
|
-
|
|
722
|
+
| symbol
|
704
723
|
|
705
724
|
undef_list: fitem
|
706
725
|
{
|
@@ -721,8 +740,6 @@ rule
|
|
721
740
|
| tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2
|
722
741
|
| tSTAR | tDIVIDE | tPERCENT | tPOW | tDSTAR | tBANG | tTILDE
|
723
742
|
| tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2
|
724
|
-
# TODO: tUBANG dead?
|
725
|
-
| tUBANG
|
726
743
|
|
727
744
|
reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND
|
728
745
|
| kALIAS | kAND | kBEGIN | kBREAK | kCASE
|
@@ -756,24 +773,20 @@ rule
|
|
756
773
|
}
|
757
774
|
| primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg_rhs
|
758
775
|
{
|
759
|
-
lhs, _, id, op, rhs = val
|
776
|
+
lhs, _, (id, _line), (op, _), rhs = val
|
760
777
|
|
761
778
|
result = s(:op_asgn, lhs, rhs, id.to_sym, op.to_sym).line lhs.line
|
762
779
|
}
|
763
780
|
| primary_value tCOLON2 tCONSTANT tOP_ASGN arg_rhs
|
764
781
|
{
|
765
|
-
lhs1, _, lhs2, op, rhs = val
|
782
|
+
lhs1, _, (lhs2, _line), op, rhs = val
|
766
783
|
|
767
784
|
lhs = s(:colon2, lhs1, lhs2.to_sym).line lhs1.line
|
768
785
|
result = new_const_op_asgn [lhs, op, rhs]
|
769
786
|
}
|
770
|
-
| tCOLON3 tCONSTANT
|
771
|
-
{
|
772
|
-
result = self.lexer.lineno
|
773
|
-
}
|
774
|
-
tOP_ASGN arg_rhs
|
787
|
+
| tCOLON3 tCONSTANT tOP_ASGN arg_rhs
|
775
788
|
{
|
776
|
-
_, lhs, line, op, rhs = val
|
789
|
+
_, (lhs, line), op, rhs = val
|
777
790
|
|
778
791
|
lhs = s(:colon3, lhs.to_sym).line line
|
779
792
|
result = new_const_op_asgn [lhs, op, rhs]
|
@@ -787,7 +800,7 @@ rule
|
|
787
800
|
| arg tDOT2 arg
|
788
801
|
{
|
789
802
|
v1, v2 = val[0], val[2]
|
790
|
-
if v1.
|
803
|
+
if v1.sexp_type == :lit and v2.sexp_type == :lit and Integer === v1.last and Integer === v2.last then
|
791
804
|
result = s(:lit, (v1.last)..(v2.last)).line v1.line
|
792
805
|
else
|
793
806
|
result = s(:dot2, v1, v2).line v1.line
|
@@ -796,26 +809,14 @@ rule
|
|
796
809
|
| arg tDOT3 arg
|
797
810
|
{
|
798
811
|
v1, v2 = val[0], val[2]
|
799
|
-
if v1.
|
812
|
+
if v1.sexp_type == :lit and v2.sexp_type == :lit and Integer === v1.last and Integer === v2.last then
|
800
813
|
result = s(:lit, (v1.last)...(v2.last)).line v1.line
|
801
814
|
else
|
802
815
|
result = s(:dot3, v1, v2).line v1.line
|
803
816
|
end
|
804
817
|
}
|
805
|
-
| arg tDOT2
|
806
|
-
{
|
807
|
-
v1, _ = val
|
808
|
-
v2 = nil
|
809
818
|
|
810
|
-
result = s(:dot2, v1, v2).line v1.line
|
811
|
-
}
|
812
|
-
| arg tDOT3
|
813
|
-
{
|
814
|
-
v1, _ = val
|
815
|
-
v2 = nil
|
816
819
|
|
817
|
-
result = s(:dot3, v1, v2).line v1.line
|
818
|
-
}
|
819
820
|
| arg tPLUS arg
|
820
821
|
{
|
821
822
|
result = new_call val[0], :+, argl(val[2])
|
@@ -842,8 +843,9 @@ rule
|
|
842
843
|
}
|
843
844
|
| tUMINUS_NUM simple_numeric tPOW arg
|
844
845
|
{
|
845
|
-
|
846
|
-
|
846
|
+
_, (num, line), _, arg = val
|
847
|
+
lit = s(:lit, num).line line
|
848
|
+
result = new_call(new_call(lit, :"**", argl(arg)), :"-@")
|
847
849
|
|
848
850
|
}
|
849
851
|
| tUPLUS arg
|
@@ -942,12 +944,12 @@ rule
|
|
942
944
|
|
943
945
|
rel_expr: arg relop arg =tGT
|
944
946
|
{
|
945
|
-
lhs, op, rhs = val
|
947
|
+
lhs, (op, _), rhs = val
|
946
948
|
result = new_call lhs, op.to_sym, argl(rhs)
|
947
949
|
}
|
948
950
|
| rel_expr relop arg =tGT
|
949
951
|
{
|
950
|
-
lhs, op, rhs = val
|
952
|
+
lhs, (op, _), rhs = val
|
951
953
|
warn "comparison '%s' after comparison", op
|
952
954
|
result = new_call lhs, op.to_sym, argl(rhs)
|
953
955
|
}
|
@@ -1014,17 +1016,14 @@ rule
|
|
1014
1016
|
| args opt_block_arg
|
1015
1017
|
{
|
1016
1018
|
result = call_args val
|
1017
|
-
result = self.arg_blk_pass val[0], val[1]
|
1018
1019
|
}
|
1019
1020
|
| assocs opt_block_arg
|
1020
1021
|
{
|
1021
|
-
result = call_args [array_to_hash(val[0])]
|
1022
|
-
result = self.arg_blk_pass result, val[1]
|
1022
|
+
result = call_args [array_to_hash(val[0]), val[1]]
|
1023
1023
|
}
|
1024
1024
|
| args tCOMMA assocs opt_block_arg
|
1025
1025
|
{
|
1026
|
-
result = call_args [val[0], array_to_hash(val[2])]
|
1027
|
-
result = self.arg_blk_pass result, val[3]
|
1026
|
+
result = call_args [val[0], array_to_hash(val[2]), val[3]]
|
1028
1027
|
}
|
1029
1028
|
| block_arg
|
1030
1029
|
{
|
@@ -1032,12 +1031,39 @@ rule
|
|
1032
1031
|
}
|
1033
1032
|
|
1034
1033
|
command_args: {
|
1035
|
-
|
1034
|
+
# parse26.y line 2200
|
1035
|
+
|
1036
|
+
# If call_args starts with a open paren '(' or
|
1037
|
+
# '[', look-ahead reading of the letters calls
|
1038
|
+
# CMDARG_PUSH(0), but the push must be done
|
1039
|
+
# after CMDARG_PUSH(1). So this code makes them
|
1040
|
+
# consistent by first cancelling the premature
|
1041
|
+
# CMDARG_PUSH(0), doing CMDARG_PUSH(1), and
|
1042
|
+
# finally redoing CMDARG_PUSH(0).
|
1043
|
+
|
1044
|
+
result = yychar = self.last_token_type.first
|
1045
|
+
lookahead = [:tLPAREN, :tLPAREN_ARG, :tLPAREN2, :tLBRACK, :tLBRACK2].include?(yychar)
|
1046
|
+
lexer.cmdarg.pop if lookahead
|
1047
|
+
lexer.cmdarg.push true
|
1048
|
+
lexer.cmdarg.push false if lookahead
|
1036
1049
|
}
|
1037
1050
|
call_args
|
1038
1051
|
{
|
1039
|
-
|
1040
|
-
|
1052
|
+
yychar, args = val
|
1053
|
+
|
1054
|
+
# call_args can be followed by tLBRACE_ARG (that
|
1055
|
+
# does CMDARG_PUSH(0) in the lexer) but the push
|
1056
|
+
# must be done after CMDARG_POP() in the parser.
|
1057
|
+
# So this code does CMDARG_POP() to pop 0 pushed
|
1058
|
+
# by tLBRACE_ARG, CMDARG_POP() to pop 1 pushed
|
1059
|
+
# by command_args, and CMDARG_PUSH(0) to restore
|
1060
|
+
# back the flag set by tLBRACE_ARG.
|
1061
|
+
|
1062
|
+
lookahead = [:tLBRACE_ARG].include?(yychar)
|
1063
|
+
lexer.cmdarg.pop if lookahead
|
1064
|
+
lexer.cmdarg.pop
|
1065
|
+
lexer.cmdarg.push false if lookahead
|
1066
|
+
result = args
|
1041
1067
|
}
|
1042
1068
|
|
1043
1069
|
block_arg: tAMPER arg_value
|
@@ -1055,8 +1081,9 @@ rule
|
|
1055
1081
|
args: arg_value
|
1056
1082
|
{
|
1057
1083
|
arg, = val
|
1084
|
+
lineno = arg.line || lexer.lineno # HACK
|
1058
1085
|
|
1059
|
-
result = s(:array, arg).line
|
1086
|
+
result = s(:array, arg).line lineno
|
1060
1087
|
}
|
1061
1088
|
| tSTAR arg_value
|
1062
1089
|
{
|
@@ -1068,9 +1095,11 @@ rule
|
|
1068
1095
|
args, _, id = val
|
1069
1096
|
result = self.list_append args, id
|
1070
1097
|
}
|
1071
|
-
| args tCOMMA tSTAR
|
1098
|
+
| args tCOMMA tSTAR arg_value
|
1072
1099
|
{
|
1073
|
-
|
1100
|
+
# TODO: the line number from tSTAR has been dropped
|
1101
|
+
args, _, _, id = val
|
1102
|
+
line = lexer.lineno
|
1074
1103
|
result = self.list_append args, s(:splat, id).line(line)
|
1075
1104
|
}
|
1076
1105
|
|
@@ -1089,7 +1118,6 @@ rule
|
|
1089
1118
|
}
|
1090
1119
|
| args tCOMMA tSTAR arg_value
|
1091
1120
|
{
|
1092
|
-
# FIX: bad shift/reduce conflict with rhs' comma star prod
|
1093
1121
|
# TODO: make all tXXXX terminals include lexer.lineno
|
1094
1122
|
arg, _, _, splat = val
|
1095
1123
|
result = self.arg_concat arg, splat
|
@@ -1112,26 +1140,19 @@ rule
|
|
1112
1140
|
| backref
|
1113
1141
|
| tFID
|
1114
1142
|
{
|
1115
|
-
msg, = val
|
1143
|
+
(msg, line), = val
|
1116
1144
|
result = new_call nil, msg.to_sym
|
1145
|
+
result.line line
|
1117
1146
|
}
|
1118
1147
|
| k_begin
|
1119
1148
|
{
|
1149
|
+
lexer.cmdarg.push false
|
1120
1150
|
result = self.lexer.lineno
|
1121
|
-
# TODO:
|
1122
|
-
# $<val>1 = cmdarg_stack;
|
1123
|
-
# CMDARG_SET(0);
|
1124
1151
|
}
|
1125
1152
|
bodystmt k_end
|
1126
1153
|
{
|
1127
|
-
|
1128
|
-
|
1129
|
-
result = s(:nil)
|
1130
|
-
else
|
1131
|
-
result = s(:begin, val[2])
|
1132
|
-
end
|
1133
|
-
|
1134
|
-
result.line = val[1]
|
1154
|
+
lexer.cmdarg.pop
|
1155
|
+
result = new_begin val
|
1135
1156
|
}
|
1136
1157
|
| tLPAREN_ARG
|
1137
1158
|
{
|
@@ -1144,18 +1165,14 @@ rule
|
|
1144
1165
|
result = s(:begin).line line
|
1145
1166
|
}
|
1146
1167
|
| tLPAREN_ARG
|
1147
|
-
{
|
1148
|
-
result = lexer.cmdarg.store false
|
1149
|
-
}
|
1150
1168
|
stmt
|
1151
1169
|
{
|
1152
1170
|
lexer.lex_state = EXPR_ENDARG
|
1153
1171
|
}
|
1154
1172
|
rparen
|
1155
1173
|
{
|
1156
|
-
_,
|
1157
|
-
warning "(...) interpreted as grouped expression"
|
1158
|
-
lexer.cmdarg.restore cmdarg
|
1174
|
+
_, stmt, _, _, = val
|
1175
|
+
# warning "(...) interpreted as grouped expression"
|
1159
1176
|
result = stmt
|
1160
1177
|
}
|
1161
1178
|
| tLPAREN compstmt tRPAREN
|
@@ -1167,15 +1184,15 @@ rule
|
|
1167
1184
|
}
|
1168
1185
|
| primary_value tCOLON2 tCONSTANT
|
1169
1186
|
{
|
1170
|
-
expr, _, id = val
|
1187
|
+
expr, _, (id, _line) = val
|
1171
1188
|
|
1172
1189
|
result = s(:colon2, expr, id.to_sym).line expr.line
|
1173
1190
|
}
|
1174
1191
|
| tCOLON3 tCONSTANT
|
1175
1192
|
{
|
1176
|
-
_, id = val
|
1193
|
+
_, (id, line) = val
|
1177
1194
|
|
1178
|
-
result = s(:colon3, id.to_sym).line
|
1195
|
+
result = s(:colon3, id.to_sym).line line
|
1179
1196
|
}
|
1180
1197
|
| tLBRACK { result = lexer.lineno } aref_args tRBRACK
|
1181
1198
|
{
|
@@ -1199,15 +1216,21 @@ rule
|
|
1199
1216
|
}
|
1200
1217
|
| kYIELD tLPAREN2 call_args rparen
|
1201
1218
|
{
|
1202
|
-
|
1219
|
+
(_, line), _, args, _ = val
|
1220
|
+
|
1221
|
+
result = new_yield(args).line line
|
1203
1222
|
}
|
1204
1223
|
| kYIELD tLPAREN2 rparen
|
1205
1224
|
{
|
1206
|
-
|
1225
|
+
(_, line), _, _ = val
|
1226
|
+
|
1227
|
+
result = new_yield.line line
|
1207
1228
|
}
|
1208
1229
|
| kYIELD
|
1209
1230
|
{
|
1210
|
-
|
1231
|
+
(_, line), = val
|
1232
|
+
|
1233
|
+
result = new_yield.line line
|
1211
1234
|
}
|
1212
1235
|
| kDEFINED opt_nl tLPAREN2 expr rparen
|
1213
1236
|
{
|
@@ -1222,7 +1245,7 @@ rule
|
|
1222
1245
|
}
|
1223
1246
|
| kNOT tLPAREN2 rparen
|
1224
1247
|
{
|
1225
|
-
|
1248
|
+
debug 20
|
1226
1249
|
}
|
1227
1250
|
| fcall brace_block
|
1228
1251
|
{
|
@@ -1240,9 +1263,10 @@ rule
|
|
1240
1263
|
iter.insert 1, call # FIX
|
1241
1264
|
result = iter
|
1242
1265
|
}
|
1243
|
-
|
|
1266
|
+
| lambda
|
1244
1267
|
{
|
1245
|
-
|
1268
|
+
expr, = val
|
1269
|
+
result = expr
|
1246
1270
|
}
|
1247
1271
|
| k_if expr_value then compstmt if_tail k_end
|
1248
1272
|
{
|
@@ -1285,7 +1309,6 @@ rule
|
|
1285
1309
|
}
|
1286
1310
|
cpath superclass
|
1287
1311
|
{
|
1288
|
-
self.comments.push self.lexer.comments
|
1289
1312
|
if (self.in_def || self.in_single > 0) then
|
1290
1313
|
yyerror "class definition in method body"
|
1291
1314
|
end
|
@@ -1295,7 +1318,7 @@ rule
|
|
1295
1318
|
{
|
1296
1319
|
result = new_class val
|
1297
1320
|
self.env.unextend
|
1298
|
-
self.lexer.
|
1321
|
+
self.lexer.ignore_body_comments
|
1299
1322
|
}
|
1300
1323
|
| k_class tLSHFT
|
1301
1324
|
{
|
@@ -1316,7 +1339,7 @@ rule
|
|
1316
1339
|
{
|
1317
1340
|
result = new_sclass val
|
1318
1341
|
self.env.unextend
|
1319
|
-
self.lexer.
|
1342
|
+
self.lexer.ignore_body_comments
|
1320
1343
|
}
|
1321
1344
|
| k_module
|
1322
1345
|
{
|
@@ -1324,7 +1347,6 @@ rule
|
|
1324
1347
|
}
|
1325
1348
|
cpath
|
1326
1349
|
{
|
1327
|
-
self.comments.push self.lexer.comments
|
1328
1350
|
yyerror "module definition in method body" if
|
1329
1351
|
self.in_def or self.in_single > 0
|
1330
1352
|
|
@@ -1334,53 +1356,67 @@ rule
|
|
1334
1356
|
{
|
1335
1357
|
result = new_module val
|
1336
1358
|
self.env.unextend
|
1337
|
-
self.lexer.
|
1359
|
+
self.lexer.ignore_body_comments
|
1338
1360
|
}
|
1339
1361
|
| k_def fname
|
1340
1362
|
{
|
1341
|
-
result =
|
1363
|
+
result = self.in_def
|
1342
1364
|
|
1343
|
-
self.
|
1344
|
-
self.in_def = true
|
1365
|
+
self.in_def = true # group = local_push
|
1345
1366
|
self.env.extend
|
1346
|
-
|
1347
|
-
|
1348
|
-
lexer.cmdarg.stack.replace [false]
|
1367
|
+
lexer.cmdarg.push false
|
1368
|
+
lexer.cond.push false
|
1349
1369
|
}
|
1350
|
-
f_arglist bodystmt
|
1370
|
+
f_arglist bodystmt k_end
|
1351
1371
|
{
|
1352
|
-
|
1353
|
-
|
1354
|
-
result = new_defn val
|
1372
|
+
result, in_def = new_defn val
|
1355
1373
|
|
1356
|
-
lexer.
|
1374
|
+
lexer.cond.pop # group = local_pop
|
1375
|
+
lexer.cmdarg.pop
|
1357
1376
|
self.env.unextend
|
1358
1377
|
self.in_def = in_def
|
1359
|
-
|
1378
|
+
|
1379
|
+
self.lexer.ignore_body_comments
|
1360
1380
|
}
|
1361
1381
|
| k_def singleton dot_or_colon
|
1362
1382
|
{
|
1363
|
-
self.comments.push self.lexer.comments
|
1364
1383
|
lexer.lex_state = EXPR_FNAME
|
1365
1384
|
}
|
1366
1385
|
fname
|
1367
1386
|
{
|
1368
|
-
self.
|
1387
|
+
result = self.in_def
|
1388
|
+
|
1389
|
+
self.in_single += 1 # TODO: remove?
|
1390
|
+
|
1391
|
+
self.in_def = true # local_push
|
1369
1392
|
self.env.extend
|
1370
|
-
lexer.
|
1371
|
-
|
1372
|
-
|
1393
|
+
lexer.cmdarg.push false
|
1394
|
+
lexer.cond.push false
|
1395
|
+
|
1396
|
+
lexer.lex_state = EXPR_ENDFN|EXPR_LABEL
|
1373
1397
|
}
|
1374
1398
|
f_arglist bodystmt k_end
|
1375
1399
|
{
|
1376
|
-
_, cmdarg = val[5]
|
1377
|
-
result = new_defs val
|
1378
1400
|
|
1379
|
-
|
1401
|
+
# [kdef, recv, _, _, (name, line), in_def, args, body, kend]
|
1402
|
+
# =>
|
1403
|
+
# [kdef, recv, (name, line), in_def, args, body, kend]
|
1404
|
+
|
1405
|
+
val.delete_at 3
|
1406
|
+
val.delete_at 2
|
1407
|
+
|
1408
|
+
result, in_def = new_defs val
|
1380
1409
|
|
1410
|
+
lexer.cond.pop # group = local_pop
|
1411
|
+
lexer.cmdarg.pop
|
1381
1412
|
self.env.unextend
|
1413
|
+
self.in_def = in_def
|
1414
|
+
|
1382
1415
|
self.in_single -= 1
|
1383
|
-
|
1416
|
+
|
1417
|
+
# TODO: restore cur_arg ? what's cur_arg?
|
1418
|
+
|
1419
|
+
self.lexer.ignore_body_comments
|
1384
1420
|
}
|
1385
1421
|
| kBREAK
|
1386
1422
|
{
|
@@ -1417,8 +1453,17 @@ rule
|
|
1417
1453
|
k_case: kCASE
|
1418
1454
|
k_for: kFOR
|
1419
1455
|
k_class: kCLASS
|
1456
|
+
{
|
1457
|
+
self.comments.push self.lexer.comments
|
1458
|
+
}
|
1420
1459
|
k_module: kMODULE
|
1460
|
+
{
|
1461
|
+
self.comments.push self.lexer.comments
|
1462
|
+
}
|
1421
1463
|
k_def: kDEF
|
1464
|
+
{
|
1465
|
+
self.comments.push self.lexer.comments
|
1466
|
+
}
|
1422
1467
|
k_do: kDO
|
1423
1468
|
k_do_block: kDO_BLOCK
|
1424
1469
|
k_rescue: kRESCUE
|
@@ -1479,51 +1524,42 @@ rule
|
|
1479
1524
|
|
1480
1525
|
result = block_var args
|
1481
1526
|
}
|
1482
|
-
| f_marg_list tCOMMA
|
1527
|
+
| f_marg_list tCOMMA f_rest_marg
|
1483
1528
|
{
|
1484
|
-
args, _,
|
1529
|
+
args, _, rest = val
|
1485
1530
|
|
1486
|
-
result = block_var args,
|
1531
|
+
result = block_var args, rest
|
1487
1532
|
}
|
1488
|
-
| f_marg_list tCOMMA
|
1533
|
+
| f_marg_list tCOMMA f_rest_marg tCOMMA f_marg_list
|
1489
1534
|
{
|
1490
|
-
|
1535
|
+
lhs, _, splat, _, rhs = val
|
1491
1536
|
|
1492
|
-
result = block_var
|
1537
|
+
result = block_var lhs, splat, rhs
|
1493
1538
|
}
|
1494
|
-
|
|
1539
|
+
| f_rest_marg
|
1495
1540
|
{
|
1496
|
-
|
1541
|
+
rest, = val
|
1497
1542
|
|
1498
|
-
result = block_var
|
1543
|
+
result = block_var rest
|
1499
1544
|
}
|
1500
|
-
|
|
1545
|
+
| f_rest_marg tCOMMA f_marg_list
|
1501
1546
|
{
|
1502
|
-
|
1547
|
+
splat, _, rest = val
|
1503
1548
|
|
1504
|
-
result = block_var
|
1549
|
+
result = block_var splat, rest
|
1505
1550
|
}
|
1506
|
-
| tSTAR f_norm_arg
|
1507
|
-
{
|
1508
|
-
_, splat = val
|
1509
1551
|
|
1510
|
-
|
1511
|
-
}
|
1512
|
-
| tSTAR f_norm_arg tCOMMA f_marg_list
|
1552
|
+
f_rest_marg: tSTAR f_norm_arg
|
1513
1553
|
{
|
1514
|
-
_,
|
1554
|
+
_, (id, line) = val
|
1515
1555
|
|
1516
|
-
result =
|
1556
|
+
result = args ["*#{id}".to_sym]
|
1557
|
+
result.line line
|
1517
1558
|
}
|
1518
1559
|
| tSTAR
|
1519
1560
|
{
|
1520
|
-
result =
|
1521
|
-
|
1522
|
-
| tSTAR tCOMMA f_marg_list
|
1523
|
-
{
|
1524
|
-
_, _, args = val
|
1525
|
-
|
1526
|
-
result = block_var :*, args
|
1561
|
+
result = args [:*]
|
1562
|
+
result.line lexer.lineno # FIX: tSTAR -> line
|
1527
1563
|
}
|
1528
1564
|
|
1529
1565
|
block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg
|
@@ -1540,8 +1576,8 @@ rule
|
|
1540
1576
|
}
|
1541
1577
|
| f_block_arg
|
1542
1578
|
{
|
1543
|
-
line =
|
1544
|
-
result = call_args
|
1579
|
+
(id, line), = val
|
1580
|
+
result = call_args [id]
|
1545
1581
|
result.line line
|
1546
1582
|
}
|
1547
1583
|
|
@@ -1650,13 +1686,13 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1650
1686
|
|
1651
1687
|
bvar: tIDENTIFIER
|
1652
1688
|
{
|
1653
|
-
id, = val
|
1654
|
-
line = lexer.lineno
|
1689
|
+
(id, line), = val
|
1655
1690
|
result = s(:shadow, id.to_sym).line line
|
1656
1691
|
}
|
1657
1692
|
| f_bad_arg
|
1658
1693
|
|
1659
|
-
lambda:
|
1694
|
+
lambda: tLAMBDA
|
1695
|
+
{
|
1660
1696
|
self.env.extend :dynamic
|
1661
1697
|
result = [lexer.lineno, lexer.lpar_beg]
|
1662
1698
|
lexer.paren_nest += 1
|
@@ -1664,20 +1700,19 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1664
1700
|
}
|
1665
1701
|
f_larglist
|
1666
1702
|
{
|
1667
|
-
|
1703
|
+
lexer.cmdarg.push false
|
1668
1704
|
}
|
1669
1705
|
lambda_body
|
1670
1706
|
{
|
1671
|
-
(line, lpar), args,
|
1707
|
+
_, (line, lpar), args, _cmdarg, body = val
|
1672
1708
|
lexer.lpar_beg = lpar
|
1673
1709
|
|
1674
|
-
lexer.cmdarg.
|
1675
|
-
lexer.cmdarg.lexpop
|
1710
|
+
lexer.cmdarg.pop
|
1676
1711
|
|
1677
1712
|
call = s(:lambda).line line
|
1678
1713
|
result = new_iter call, args, body
|
1679
|
-
result.line
|
1680
|
-
self.env.unextend
|
1714
|
+
result.line line
|
1715
|
+
self.env.unextend # TODO: dynapush & dynapop
|
1681
1716
|
}
|
1682
1717
|
|
1683
1718
|
f_larglist: tLPAREN2 f_args opt_bv_decl rparen
|
@@ -1711,23 +1746,28 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1711
1746
|
## if (nd_type($1) == NODE_YIELD) {
|
1712
1747
|
## compile_error(PARSER_ARG "block given to yield");
|
1713
1748
|
|
1714
|
-
|
1715
|
-
val[0].block_pass?
|
1749
|
+
cmd, blk = val
|
1716
1750
|
|
1717
|
-
|
1751
|
+
syntax_error "Both block arg and actual block given." if
|
1752
|
+
cmd.block_pass?
|
1718
1753
|
|
1719
|
-
|
1754
|
+
if inverted? val then
|
1755
|
+
val = invert_block_call val
|
1756
|
+
cmd, blk = val
|
1757
|
+
end
|
1720
1758
|
|
1721
1759
|
result = blk
|
1722
1760
|
result.insert 1, cmd
|
1723
1761
|
}
|
1724
1762
|
| block_call call_op2 operation2 opt_paren_args
|
1725
1763
|
{
|
1726
|
-
|
1764
|
+
lhs, _, (id, _line), args = val
|
1765
|
+
|
1766
|
+
result = new_call lhs, id.to_sym, args
|
1727
1767
|
}
|
1728
1768
|
| block_call call_op2 operation2 opt_paren_args brace_block
|
1729
1769
|
{
|
1730
|
-
iter1, _, name, args, iter2 = val
|
1770
|
+
iter1, _, (name, _line), args, iter2 = val
|
1731
1771
|
|
1732
1772
|
call = new_call iter1, name.to_sym, args
|
1733
1773
|
iter2.insert 1, call
|
@@ -1736,7 +1776,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1736
1776
|
}
|
1737
1777
|
| block_call call_op2 operation2 command_args do_block
|
1738
1778
|
{
|
1739
|
-
iter1, _, name, args, iter2 = val
|
1779
|
+
iter1, _, (name, _line), args, iter2 = val
|
1740
1780
|
|
1741
1781
|
call = new_call iter1, name.to_sym, args
|
1742
1782
|
iter2.insert 1, call
|
@@ -1744,28 +1784,29 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1744
1784
|
result = iter2
|
1745
1785
|
}
|
1746
1786
|
|
1747
|
-
method_call: fcall
|
1748
|
-
{
|
1749
|
-
result = self.lexer.lineno
|
1750
|
-
}
|
1751
|
-
paren_args
|
1787
|
+
method_call: fcall paren_args
|
1752
1788
|
{
|
1753
|
-
call,
|
1789
|
+
call, args = val
|
1754
1790
|
|
1755
1791
|
result = call.concat args.sexp_body if args
|
1756
|
-
result.line lineno
|
1757
1792
|
}
|
1758
1793
|
| primary_value call_op operation2 opt_paren_args
|
1759
1794
|
{
|
1760
|
-
|
1795
|
+
recv, call_op, (op, _line), args = val
|
1796
|
+
|
1797
|
+
result = new_call recv, op.to_sym, args, call_op
|
1761
1798
|
}
|
1762
1799
|
| primary_value tCOLON2 operation2 paren_args
|
1763
1800
|
{
|
1764
|
-
|
1801
|
+
recv, _, (op, _line), args = val
|
1802
|
+
|
1803
|
+
result = new_call recv, op.to_sym, args
|
1765
1804
|
}
|
1766
1805
|
| primary_value tCOLON2 operation3
|
1767
1806
|
{
|
1768
|
-
|
1807
|
+
lhs, _, (id, _line) = val
|
1808
|
+
|
1809
|
+
result = new_call lhs, id.to_sym
|
1769
1810
|
}
|
1770
1811
|
| primary_value call_op paren_args
|
1771
1812
|
{
|
@@ -1798,7 +1839,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1798
1839
|
_, line, body, _ = val
|
1799
1840
|
|
1800
1841
|
result = body
|
1801
|
-
result.line
|
1842
|
+
result.line line
|
1802
1843
|
|
1803
1844
|
self.env.unextend
|
1804
1845
|
}
|
@@ -1812,7 +1853,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1812
1853
|
_, line, body, _ = val
|
1813
1854
|
|
1814
1855
|
result = body
|
1815
|
-
result.line
|
1856
|
+
result.line line
|
1816
1857
|
|
1817
1858
|
self.env.unextend
|
1818
1859
|
}
|
@@ -1830,25 +1871,50 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1830
1871
|
}
|
1831
1872
|
|
1832
1873
|
do_body: { self.env.extend :dynamic; result = self.lexer.lineno }
|
1833
|
-
{
|
1874
|
+
{ lexer.cmdarg.push false }
|
1834
1875
|
opt_block_param
|
1835
1876
|
bodystmt
|
1836
1877
|
{
|
1837
|
-
line,
|
1878
|
+
line, _cmdarg, param, cmpstmt = val
|
1838
1879
|
|
1839
1880
|
result = new_do_body param, cmpstmt, line
|
1881
|
+
lexer.cmdarg.pop
|
1840
1882
|
self.env.unextend
|
1841
|
-
|
1883
|
+
}
|
1884
|
+
|
1885
|
+
case_args: arg_value
|
1886
|
+
{
|
1887
|
+
arg, = val
|
1888
|
+
|
1889
|
+
result = s(:array, arg).line arg.line
|
1890
|
+
}
|
1891
|
+
| tSTAR arg_value
|
1892
|
+
{
|
1893
|
+
_, arg = val
|
1894
|
+
|
1895
|
+
result = s(:array, s(:splat, arg).line(arg.line)).line arg.line
|
1896
|
+
}
|
1897
|
+
| case_args tCOMMA arg_value
|
1898
|
+
{
|
1899
|
+
args, _, id = val
|
1900
|
+
|
1901
|
+
result = self.list_append args, id
|
1902
|
+
}
|
1903
|
+
| case_args tCOMMA tSTAR arg_value
|
1904
|
+
{
|
1905
|
+
args, _, _, id = val
|
1906
|
+
|
1907
|
+
result = self.list_append args, s(:splat, id).line(id.line)
|
1842
1908
|
}
|
1843
1909
|
|
1844
1910
|
case_body: k_when
|
1845
1911
|
{
|
1846
1912
|
result = self.lexer.lineno
|
1847
1913
|
}
|
1848
|
-
|
1914
|
+
case_args then compstmt cases
|
1849
1915
|
{
|
1850
1916
|
result = new_when(val[2], val[4])
|
1851
|
-
result.line
|
1917
|
+
result.line val[1]
|
1852
1918
|
result << val[5] if val[5]
|
1853
1919
|
}
|
1854
1920
|
|
@@ -1894,17 +1960,10 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1894
1960
|
|
1895
1961
|
literal: numeric
|
1896
1962
|
{
|
1897
|
-
line =
|
1898
|
-
result = s(:lit,
|
1899
|
-
result.line = line
|
1963
|
+
(lit, line), = val
|
1964
|
+
result = s(:lit, lit).line line
|
1900
1965
|
}
|
1901
1966
|
| symbol
|
1902
|
-
{
|
1903
|
-
line = lexer.lineno
|
1904
|
-
result = s(:lit, val[0])
|
1905
|
-
result.line = line
|
1906
|
-
}
|
1907
|
-
| dsym
|
1908
1967
|
|
1909
1968
|
strings: string
|
1910
1969
|
{
|
@@ -1915,7 +1974,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1915
1974
|
|
1916
1975
|
string: tCHAR
|
1917
1976
|
{
|
1918
|
-
|
1977
|
+
debug 37
|
1919
1978
|
}
|
1920
1979
|
| string1
|
1921
1980
|
| string string1
|
@@ -1925,11 +1984,11 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1925
1984
|
|
1926
1985
|
string1: tSTRING_BEG string_contents tSTRING_END
|
1927
1986
|
{
|
1928
|
-
_, str, (_, func) = val
|
1987
|
+
(_, line), str, (_, func) = val
|
1929
1988
|
|
1930
|
-
str = dedent str if func =~ RubyLexer::
|
1989
|
+
str = dedent str if func =~ RubyLexer::STR_FUNC_DEDENT
|
1931
1990
|
|
1932
|
-
result = str
|
1991
|
+
result = str.line line
|
1933
1992
|
}
|
1934
1993
|
| tSTRING
|
1935
1994
|
{
|
@@ -1938,7 +1997,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1938
1997
|
|
1939
1998
|
xstring: tXSTRING_BEG xstring_contents tSTRING_END
|
1940
1999
|
{
|
1941
|
-
result = new_xstring val
|
2000
|
+
result = new_xstring val
|
1942
2001
|
# TODO: dedent?!?! SERIOUSLY?!?
|
1943
2002
|
}
|
1944
2003
|
|
@@ -1949,11 +2008,15 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1949
2008
|
|
1950
2009
|
words: tWORDS_BEG tSPACE tSTRING_END
|
1951
2010
|
{
|
1952
|
-
|
2011
|
+
(_, line), _, _ = val
|
2012
|
+
|
2013
|
+
result = s(:array).line line
|
1953
2014
|
}
|
1954
2015
|
| tWORDS_BEG word_list tSTRING_END
|
1955
2016
|
{
|
1956
|
-
|
2017
|
+
(_, line), list, _ = val
|
2018
|
+
|
2019
|
+
result = list.line line
|
1957
2020
|
}
|
1958
2021
|
|
1959
2022
|
word_list: none
|
@@ -1973,18 +2036,20 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1973
2036
|
|
1974
2037
|
symbols: tSYMBOLS_BEG tSPACE tSTRING_END
|
1975
2038
|
{
|
1976
|
-
|
2039
|
+
(_, line), _, _ = val
|
2040
|
+
|
2041
|
+
result = s(:array).line line
|
1977
2042
|
}
|
1978
|
-
| tSYMBOLS_BEG
|
2043
|
+
| tSYMBOLS_BEG symbol_list tSTRING_END
|
1979
2044
|
{
|
1980
|
-
_, line, list, _, = val
|
1981
|
-
list.line
|
2045
|
+
(_, line), list, _, = val
|
2046
|
+
list.line line
|
1982
2047
|
result = list
|
1983
2048
|
}
|
1984
2049
|
|
1985
2050
|
symbol_list: none
|
1986
2051
|
{
|
1987
|
-
result = new_symbol_list
|
2052
|
+
result = new_symbol_list
|
1988
2053
|
}
|
1989
2054
|
| symbol_list word tSPACE
|
1990
2055
|
{
|
@@ -1994,20 +2059,28 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1994
2059
|
|
1995
2060
|
qwords: tQWORDS_BEG tSPACE tSTRING_END
|
1996
2061
|
{
|
1997
|
-
|
2062
|
+
(_, line), _, _ = val
|
2063
|
+
|
2064
|
+
result = s(:array).line line
|
1998
2065
|
}
|
1999
2066
|
| tQWORDS_BEG qword_list tSTRING_END
|
2000
2067
|
{
|
2001
|
-
|
2068
|
+
(_, line), list, _ = val
|
2069
|
+
|
2070
|
+
result = list.line line
|
2002
2071
|
}
|
2003
2072
|
|
2004
2073
|
qsymbols: tQSYMBOLS_BEG tSPACE tSTRING_END
|
2005
2074
|
{
|
2006
|
-
|
2075
|
+
(_, line), _, _ = val
|
2076
|
+
|
2077
|
+
result = s(:array).line line
|
2007
2078
|
}
|
2008
2079
|
| tQSYMBOLS_BEG qsym_list tSTRING_END
|
2009
2080
|
{
|
2010
|
-
|
2081
|
+
(_, line), list, _ = val
|
2082
|
+
|
2083
|
+
result = list.line line
|
2011
2084
|
}
|
2012
2085
|
|
2013
2086
|
qword_list: none
|
@@ -2030,7 +2103,8 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
2030
2103
|
|
2031
2104
|
string_contents: none
|
2032
2105
|
{
|
2033
|
-
|
2106
|
+
line = prev_value_to_lineno _values.last
|
2107
|
+
result = s(:str, +"").line line
|
2034
2108
|
}
|
2035
2109
|
| string_contents string_content
|
2036
2110
|
{
|
@@ -2080,12 +2154,13 @@ regexp_contents: none
|
|
2080
2154
|
result = [lexer.lex_strterm,
|
2081
2155
|
lexer.brace_nest,
|
2082
2156
|
lexer.string_nest, # TODO: remove
|
2083
|
-
lexer.cond.store,
|
2084
|
-
lexer.cmdarg.store,
|
2085
2157
|
lexer.lex_state,
|
2086
2158
|
lexer.lineno,
|
2087
2159
|
]
|
2088
2160
|
|
2161
|
+
lexer.cmdarg.push false
|
2162
|
+
lexer.cond.push false
|
2163
|
+
|
2089
2164
|
lexer.lex_strterm = nil
|
2090
2165
|
lexer.brace_nest = 0
|
2091
2166
|
lexer.string_nest = 0
|
@@ -2097,14 +2172,15 @@ regexp_contents: none
|
|
2097
2172
|
{
|
2098
2173
|
_, memo, stmt, _ = val
|
2099
2174
|
|
2100
|
-
lex_strterm, brace_nest, string_nest,
|
2175
|
+
lex_strterm, brace_nest, string_nest, oldlex_state, line = memo
|
2176
|
+
# TODO: heredoc_indent
|
2101
2177
|
|
2102
2178
|
lexer.lex_strterm = lex_strterm
|
2103
2179
|
lexer.brace_nest = brace_nest
|
2104
2180
|
lexer.string_nest = string_nest
|
2105
2181
|
|
2106
|
-
lexer.cond.
|
2107
|
-
lexer.cmdarg.
|
2182
|
+
lexer.cond.pop
|
2183
|
+
lexer.cmdarg.pop
|
2108
2184
|
|
2109
2185
|
lexer.lex_state = oldlex_state
|
2110
2186
|
|
@@ -2119,29 +2195,49 @@ regexp_contents: none
|
|
2119
2195
|
when nil then
|
2120
2196
|
result = s(:evstr).line line
|
2121
2197
|
else
|
2122
|
-
|
2198
|
+
debug 38
|
2123
2199
|
raise "unknown string body: #{stmt.inspect}"
|
2124
2200
|
end
|
2125
2201
|
}
|
2126
2202
|
|
2127
|
-
string_dvar: tGVAR
|
2128
|
-
|
2129
|
-
|
2203
|
+
string_dvar: tGVAR
|
2204
|
+
{
|
2205
|
+
(id, line), = val
|
2206
|
+
result = s(:gvar, id.to_sym).line line
|
2207
|
+
}
|
2208
|
+
| tIVAR
|
2209
|
+
{
|
2210
|
+
(id, line), = val
|
2211
|
+
result = s(:ivar, id.to_sym).line line
|
2212
|
+
}
|
2213
|
+
| tCVAR
|
2214
|
+
{
|
2215
|
+
(id, line), = val
|
2216
|
+
result = s(:cvar, id.to_sym).line line
|
2217
|
+
}
|
2130
2218
|
| backref
|
2131
2219
|
|
2132
|
-
symbol:
|
2220
|
+
symbol: ssym
|
2221
|
+
| dsym
|
2222
|
+
|
2223
|
+
ssym: tSYMBEG sym
|
2133
2224
|
{
|
2225
|
+
_, (id, line) = val
|
2226
|
+
|
2134
2227
|
lexer.lex_state = EXPR_END
|
2135
|
-
result =
|
2228
|
+
result = s(:lit, id.to_sym).line line
|
2136
2229
|
}
|
2137
2230
|
| tSYMBOL
|
2138
2231
|
{
|
2139
|
-
|
2232
|
+
(id, line), = val
|
2233
|
+
|
2234
|
+
lexer.lex_state = EXPR_END
|
2235
|
+
result = s(:lit, id.to_sym).line line
|
2140
2236
|
}
|
2141
2237
|
|
2142
2238
|
sym: fname | tIVAR | tGVAR | tCVAR
|
2143
2239
|
|
2144
|
-
dsym: tSYMBEG
|
2240
|
+
dsym: tSYMBEG string_contents tSTRING_END
|
2145
2241
|
{
|
2146
2242
|
_, result, _ = val
|
2147
2243
|
|
@@ -2157,14 +2253,15 @@ regexp_contents: none
|
|
2157
2253
|
when :evstr then
|
2158
2254
|
result = s(:dsym, "", result).line result.line
|
2159
2255
|
else
|
2160
|
-
|
2256
|
+
debug 39
|
2161
2257
|
end
|
2162
2258
|
}
|
2163
2259
|
|
2164
2260
|
numeric: simple_numeric
|
2165
|
-
| tUMINUS_NUM simple_numeric
|
2261
|
+
| tUMINUS_NUM simple_numeric =tLOWEST
|
2166
2262
|
{
|
2167
|
-
|
2263
|
+
_, (num, line) = val
|
2264
|
+
result = [-num, line]
|
2168
2265
|
}
|
2169
2266
|
|
2170
2267
|
simple_numeric: tINTEGER
|
@@ -2197,8 +2294,10 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2197
2294
|
|
2198
2295
|
var_ref: user_variable
|
2199
2296
|
{
|
2200
|
-
|
2297
|
+
raise "NO: #{val.inspect}" if Sexp === val.first
|
2298
|
+
(var, line), = val
|
2201
2299
|
result = Sexp === var ? var : self.gettable(var)
|
2300
|
+
result.line line
|
2202
2301
|
}
|
2203
2302
|
| keyword_variable
|
2204
2303
|
{
|
@@ -2213,11 +2312,19 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2213
2312
|
| keyword_variable
|
2214
2313
|
{
|
2215
2314
|
result = self.assignable val[0]
|
2216
|
-
|
2315
|
+
debug 40
|
2217
2316
|
}
|
2218
2317
|
|
2219
|
-
backref: tNTH_REF
|
2220
|
-
|
2318
|
+
backref: tNTH_REF
|
2319
|
+
{
|
2320
|
+
(ref, line), = val
|
2321
|
+
result = s(:nth_ref, ref).line line
|
2322
|
+
}
|
2323
|
+
| tBACK_REF
|
2324
|
+
{
|
2325
|
+
(ref, line), = val
|
2326
|
+
result = s(:back_ref, ref).line line
|
2327
|
+
}
|
2221
2328
|
|
2222
2329
|
superclass: tLT
|
2223
2330
|
{
|
@@ -2235,9 +2342,7 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2235
2342
|
|
2236
2343
|
f_arglist: tLPAREN2 f_args rparen
|
2237
2344
|
{
|
2238
|
-
result = val
|
2239
|
-
self.lexer.lex_state = EXPR_BEG
|
2240
|
-
self.lexer.command_start = true
|
2345
|
+
result = end_args val
|
2241
2346
|
}
|
2242
2347
|
| {
|
2243
2348
|
result = self.in_kwarg
|
@@ -2246,12 +2351,7 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2246
2351
|
}
|
2247
2352
|
f_args term
|
2248
2353
|
{
|
2249
|
-
|
2250
|
-
|
2251
|
-
self.in_kwarg = kwarg
|
2252
|
-
result = args
|
2253
|
-
lexer.lex_state = EXPR_BEG
|
2254
|
-
lexer.command_start = true
|
2354
|
+
result = end_args val
|
2255
2355
|
}
|
2256
2356
|
|
2257
2357
|
args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg
|
@@ -2336,8 +2436,10 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2336
2436
|
|
|
2337
2437
|
{
|
2338
2438
|
result = args val
|
2439
|
+
# result.line lexer.lineno
|
2339
2440
|
}
|
2340
2441
|
|
2442
|
+
|
2341
2443
|
f_bad_arg: tCONSTANT
|
2342
2444
|
{
|
2343
2445
|
yyerror "formal argument cannot be a constant"
|
@@ -2358,10 +2460,11 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2358
2460
|
f_norm_arg: f_bad_arg
|
2359
2461
|
| tIDENTIFIER
|
2360
2462
|
{
|
2361
|
-
|
2463
|
+
(id, line), = val
|
2464
|
+
identifier = id.to_sym
|
2362
2465
|
self.env[identifier] = :lvar
|
2363
2466
|
|
2364
|
-
result = identifier
|
2467
|
+
result = [identifier, line]
|
2365
2468
|
}
|
2366
2469
|
|
2367
2470
|
f_arg_asgn: f_norm_arg
|
@@ -2369,22 +2472,14 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2369
2472
|
f_arg_item: f_arg_asgn
|
2370
2473
|
| tLPAREN f_margs rparen
|
2371
2474
|
{
|
2372
|
-
|
2475
|
+
_, margs, _ = val
|
2476
|
+
|
2477
|
+
result = margs
|
2373
2478
|
}
|
2374
2479
|
|
2375
2480
|
f_arg: f_arg_item
|
2376
2481
|
{
|
2377
|
-
|
2378
|
-
|
2379
|
-
case arg
|
2380
|
-
when Symbol then
|
2381
|
-
result = s(:args, arg).line lexer.lineno
|
2382
|
-
when Sexp then
|
2383
|
-
result = arg
|
2384
|
-
else
|
2385
|
-
debug20 32
|
2386
|
-
raise "Unknown f_arg type: #{val.inspect}"
|
2387
|
-
end
|
2482
|
+
result = new_arg val
|
2388
2483
|
}
|
2389
2484
|
| f_arg tCOMMA f_arg_item
|
2390
2485
|
{
|
@@ -2396,7 +2491,7 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2396
2491
|
result = s(:args, list).line list.line
|
2397
2492
|
end
|
2398
2493
|
|
2399
|
-
result << item
|
2494
|
+
result << (Sexp === item ? item : item.first)
|
2400
2495
|
}
|
2401
2496
|
|
2402
2497
|
f_label: tLABEL
|
@@ -2457,26 +2552,33 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2457
2552
|
kwrest_mark: tPOW
|
2458
2553
|
| tDSTAR
|
2459
2554
|
|
2555
|
+
|
2460
2556
|
f_kwrest: kwrest_mark tIDENTIFIER
|
2461
2557
|
{
|
2462
|
-
|
2463
|
-
|
2464
|
-
|
2558
|
+
_, (id, line) = val
|
2559
|
+
|
2560
|
+
name = id.to_sym
|
2561
|
+
self.assignable [name, line]
|
2562
|
+
result = [:"**#{name}", line]
|
2465
2563
|
}
|
2466
2564
|
| kwrest_mark
|
2467
2565
|
{
|
2468
|
-
|
2566
|
+
id = :"**"
|
2567
|
+
self.env[id] = :lvar # TODO: needed?!?
|
2568
|
+
result = [id, lexer.lineno] # TODO: tPOW/tDSTAR include lineno
|
2469
2569
|
}
|
2470
2570
|
|
2471
2571
|
f_opt: f_arg_asgn tEQL arg_value
|
2472
2572
|
{
|
2473
|
-
|
2573
|
+
lhs, _, rhs = val
|
2574
|
+
result = self.assignable lhs, rhs
|
2474
2575
|
# TODO: detect duplicate names
|
2475
2576
|
}
|
2476
2577
|
|
2477
2578
|
f_block_opt: f_arg_asgn tEQL primary_value
|
2478
2579
|
{
|
2479
|
-
|
2580
|
+
lhs, _, rhs = val
|
2581
|
+
result = self.assignable lhs, rhs
|
2480
2582
|
}
|
2481
2583
|
|
2482
2584
|
f_block_optarg: f_block_opt
|
@@ -2506,30 +2608,33 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2506
2608
|
f_rest_arg: restarg_mark tIDENTIFIER
|
2507
2609
|
{
|
2508
2610
|
# TODO: differs from parse.y - needs tests
|
2509
|
-
|
2510
|
-
|
2511
|
-
|
2611
|
+
_, (id, line) = val
|
2612
|
+
name = id.to_sym
|
2613
|
+
self.assignable [name, line]
|
2614
|
+
result = [:"*#{name}", line]
|
2512
2615
|
}
|
2513
2616
|
| restarg_mark
|
2514
2617
|
{
|
2515
2618
|
name = :"*"
|
2516
2619
|
self.env[name] = :lvar
|
2517
|
-
result = name
|
2620
|
+
result = [name, lexer.lineno] # FIX: tSTAR to include lineno
|
2518
2621
|
}
|
2519
2622
|
|
2520
2623
|
blkarg_mark: tAMPER2 | tAMPER
|
2521
2624
|
|
2522
2625
|
f_block_arg: blkarg_mark tIDENTIFIER
|
2523
2626
|
{
|
2524
|
-
|
2627
|
+
_, (id, line) = val
|
2628
|
+
identifier = id.to_sym
|
2525
2629
|
|
2526
2630
|
self.env[identifier] = :lvar
|
2527
|
-
result = "&#{identifier}".to_sym
|
2631
|
+
result = ["&#{identifier}".to_sym, line]
|
2528
2632
|
}
|
2529
2633
|
|
2530
2634
|
opt_f_block_arg: tCOMMA f_block_arg
|
2531
2635
|
{
|
2532
|
-
|
2636
|
+
_, arg = val
|
2637
|
+
result = arg
|
2533
2638
|
}
|
2534
2639
|
|
|
2535
2640
|
{
|
@@ -2578,9 +2683,11 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2578
2683
|
}
|
2579
2684
|
| tSTRING_BEG string_contents tLABEL_END arg_value
|
2580
2685
|
{
|
2581
|
-
_, sym, _, value = val
|
2686
|
+
(_, line), sym, _, value = val
|
2687
|
+
|
2582
2688
|
sym.sexp_type = :dsym
|
2583
|
-
|
2689
|
+
|
2690
|
+
result = s(:array, sym, value).line line
|
2584
2691
|
}
|
2585
2692
|
| tDSTAR arg_value
|
2586
2693
|
{
|