brakeman 4.7.1 → 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 +163 -1
- data/README.md +24 -7
- 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.0 → 2.7.0/gems/ruby_parser-3.18.1}/History.rdoc +166 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.0 → 2.7.0/gems/ruby_parser-3.18.1}/Manifest.txt +7 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.0 → 2.7.0/gems/ruby_parser-3.18.1}/README.rdoc +1 -0
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.0 → 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.0 → 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.0 → 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.0 → 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.0 → 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.0 → 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.0 → 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.0/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.0/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.0/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.0 → 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.0 → 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.0 → 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.0 → 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.0 → 2.7.0/gems/ruby_parser-3.18.1}/lib/ruby_parser_extras.rb +343 -133
- data/bundle/ruby/{2.6.0/gems/ruby_parser-3.14.0 → 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.0 → 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 +38 -10
- 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 +83 -41
- 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/processor.rb +1 -1
- 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 +63 -24
- 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 +438 -352
- 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.0/debugging.md +0 -18
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/rp_stringscanner.rb +0 -64
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby20_parser.rb +0 -7045
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby21_parser.rb +0 -7116
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby22_parser.rb +0 -7149
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby23_parser.rb +0 -7166
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby24_parser.rb +0 -7178
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/lib/ruby25_parser.rb +0 -7178
- data/bundle/ruby/2.6.0/gems/ruby_parser-3.14.0/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,22 +1,6 @@
|
|
1
1
|
# -*- racc -*-
|
2
2
|
|
3
|
-
#if V==20
|
4
|
-
class Ruby20Parser
|
5
|
-
#elif V==21
|
6
|
-
class Ruby21Parser
|
7
|
-
#elif V == 22
|
8
|
-
class Ruby22Parser
|
9
|
-
#elif V == 23
|
10
|
-
class Ruby23Parser
|
11
|
-
#elif V == 24
|
12
|
-
class Ruby24Parser
|
13
|
-
#elif V == 25
|
14
|
-
class Ruby25Parser
|
15
|
-
#elif V == 26
|
16
3
|
class Ruby26Parser
|
17
|
-
#else
|
18
|
-
fail "version not specified or supported on code generation"
|
19
|
-
#endif
|
20
4
|
|
21
5
|
token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS
|
22
6
|
kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT
|
@@ -34,16 +18,11 @@ token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS
|
|
34
18
|
tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG
|
35
19
|
tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END
|
36
20
|
tSTRING tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA
|
37
|
-
tLAMBEG tDSTAR tCHAR tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DEND
|
38
|
-
#if V >= 21
|
21
|
+
tLAMBEG tDSTAR tCHAR tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DEND
|
39
22
|
tRATIONAL tIMAGINARY
|
40
|
-
#endif
|
41
|
-
#if V >= 22
|
42
23
|
tLABEL_END
|
43
|
-
#endif
|
44
|
-
#if V >= 23
|
45
24
|
tLONELY
|
46
|
-
|
25
|
+
tBDOT2 tBDOT3
|
47
26
|
|
48
27
|
preclow
|
49
28
|
nonassoc tLOWEST
|
@@ -55,7 +34,7 @@ preclow
|
|
55
34
|
right tEQL tOP_ASGN
|
56
35
|
left kRESCUE_MOD
|
57
36
|
right tEH tCOLON
|
58
|
-
nonassoc tDOT2 tDOT3
|
37
|
+
nonassoc tDOT2 tDOT3 tBDOT2 tBDOT3
|
59
38
|
left tOROP
|
60
39
|
left tANDOP
|
61
40
|
nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
|
@@ -78,6 +57,9 @@ rule
|
|
78
57
|
top_compstmt
|
79
58
|
{
|
80
59
|
result = new_compstmt val
|
60
|
+
|
61
|
+
lexer.cond.pop # local_pop
|
62
|
+
lexer.cmdarg.pop
|
81
63
|
}
|
82
64
|
|
83
65
|
top_compstmt: top_stmts opt_terms
|
@@ -98,7 +80,7 @@ rule
|
|
98
80
|
| klBEGIN
|
99
81
|
{
|
100
82
|
if (self.in_def || self.in_single > 0) then
|
101
|
-
|
83
|
+
debug 11
|
102
84
|
yyerror "BEGIN in method"
|
103
85
|
end
|
104
86
|
self.env.extend
|
@@ -123,6 +105,8 @@ rule
|
|
123
105
|
bodystmt: compstmt opt_rescue k_else
|
124
106
|
{
|
125
107
|
res = _values[-2]
|
108
|
+
# TODO: move down to main match so I can just use val
|
109
|
+
|
126
110
|
yyerror "else without rescue is useless" unless res
|
127
111
|
}
|
128
112
|
compstmt
|
@@ -153,7 +137,7 @@ rule
|
|
153
137
|
| error stmt
|
154
138
|
{
|
155
139
|
result = val[1]
|
156
|
-
|
140
|
+
debug 12
|
157
141
|
}
|
158
142
|
|
159
143
|
stmt_or_begin: stmt
|
@@ -161,6 +145,10 @@ rule
|
|
161
145
|
{
|
162
146
|
yyerror "BEGIN is permitted only at toplevel"
|
163
147
|
}
|
148
|
+
begin_block
|
149
|
+
{
|
150
|
+
result = val[2] # wtf?
|
151
|
+
}
|
164
152
|
|
165
153
|
stmt: kALIAS fitem
|
166
154
|
{
|
@@ -173,12 +161,12 @@ rule
|
|
173
161
|
}
|
174
162
|
| kALIAS tGVAR tGVAR
|
175
163
|
{
|
176
|
-
(_, line), lhs, rhs = val
|
164
|
+
(_, line), (lhs, _), (rhs, _) = val
|
177
165
|
result = s(:valias, lhs.to_sym, rhs.to_sym).line line
|
178
166
|
}
|
179
167
|
| kALIAS tGVAR tBACK_REF
|
180
168
|
{
|
181
|
-
(_, line), lhs, rhs = val
|
169
|
+
(_, line), (lhs, _), (rhs, _) = val
|
182
170
|
result = s(:valias, lhs.to_sym, :"$#{rhs}").line line
|
183
171
|
}
|
184
172
|
| kALIAS tGVAR tNTH_REF
|
@@ -221,7 +209,7 @@ rule
|
|
221
209
|
(_, line), _, stmt, _ = val
|
222
210
|
|
223
211
|
if (self.in_def || self.in_single > 0) then
|
224
|
-
|
212
|
+
debug 13
|
225
213
|
yyerror "END in method; use at_exit"
|
226
214
|
end
|
227
215
|
|
@@ -237,15 +225,7 @@ rule
|
|
237
225
|
lhs, _, rhs = val
|
238
226
|
result = new_assign lhs, s(:svalue, rhs).line(rhs.line)
|
239
227
|
}
|
240
|
-
#if V == 20
|
241
|
-
| mlhs tEQL arg_value
|
242
|
-
{
|
243
|
-
result = new_masgn val[0], val[2], :wrap
|
244
|
-
}
|
245
|
-
| mlhs tEQL mrhs
|
246
|
-
#else
|
247
228
|
| mlhs tEQL mrhs_arg
|
248
|
-
#endif
|
249
229
|
{
|
250
230
|
result = new_masgn val[0], val[2]
|
251
231
|
}
|
@@ -269,30 +249,31 @@ rule
|
|
269
249
|
}
|
270
250
|
| primary_value call_op tIDENTIFIER tOP_ASGN command_rhs
|
271
251
|
{
|
272
|
-
prim, _, id,
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
result.line = val[0].line
|
252
|
+
prim, (call_op, _), (id, _), (op_asgn, _), rhs = val
|
253
|
+
|
254
|
+
result = s(:op_asgn, prim, rhs, id.to_sym, op_asgn.to_sym)
|
255
|
+
result.sexp_type = :safe_op_asgn if call_op == '&.'
|
256
|
+
result.line prim.line
|
278
257
|
}
|
279
258
|
| primary_value call_op tCONSTANT tOP_ASGN command_rhs
|
280
259
|
{
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
result.line
|
260
|
+
prim, (call_op, _), (id, _), (op_asgn, _), rhs = val
|
261
|
+
|
262
|
+
result = s(:op_asgn, prim, rhs, id.to_sym, op_asgn.to_sym)
|
263
|
+
result.sexp_type = :safe_op_asgn if call_op == '&.'
|
264
|
+
result.line prim.line
|
286
265
|
}
|
287
266
|
| primary_value tCOLON2 tCONSTANT tOP_ASGN command_rhs
|
288
267
|
{
|
289
|
-
|
290
|
-
|
268
|
+
lhs1, _, (lhs2, line), (id, _), rhs = val
|
269
|
+
|
270
|
+
result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, id.to_sym).line line
|
291
271
|
}
|
292
272
|
| primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_rhs
|
293
273
|
{
|
294
|
-
|
295
|
-
|
274
|
+
lhs1, _, (lhs2, line), (id, _), rhs = val
|
275
|
+
|
276
|
+
result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, id.to_sym).line line
|
296
277
|
}
|
297
278
|
| backref tOP_ASGN command_rhs
|
298
279
|
{
|
@@ -304,7 +285,6 @@ rule
|
|
304
285
|
expr, = val
|
305
286
|
result = value_expr expr
|
306
287
|
}
|
307
|
-
#if V >= 24
|
308
288
|
| command_call kRESCUE_MOD stmt
|
309
289
|
{
|
310
290
|
expr, (_, line), resbody = val
|
@@ -313,7 +293,6 @@ rule
|
|
313
293
|
ary = s(:array).line line
|
314
294
|
result = new_rescue(expr, new_resbody(ary, resbody))
|
315
295
|
}
|
316
|
-
#endif
|
317
296
|
| command_asgn
|
318
297
|
|
319
298
|
expr: command_call
|
@@ -340,7 +319,7 @@ rule
|
|
340
319
|
# TODO: fix line number to tBANG... but causes BAD shift/reduce conflict
|
341
320
|
# REFACTOR: call_uni_op -- see parse26.y
|
342
321
|
}
|
343
|
-
| arg
|
322
|
+
| arg =tLBRACE_ARG
|
344
323
|
|
345
324
|
expr_value: expr
|
346
325
|
{
|
@@ -365,7 +344,7 @@ rule
|
|
365
344
|
block_command: block_call
|
366
345
|
| block_call call_op2 operation2 command_args
|
367
346
|
{
|
368
|
-
blk, _, msg, args = val
|
347
|
+
blk, _, (msg, _line), args = val
|
369
348
|
result = new_call(blk, msg.to_sym, args).line blk.line
|
370
349
|
}
|
371
350
|
|
@@ -379,15 +358,15 @@ rule
|
|
379
358
|
_, line, body, _ = val
|
380
359
|
|
381
360
|
result = body
|
382
|
-
result.line
|
361
|
+
result.line line
|
383
362
|
|
384
363
|
# self.env.unextend
|
385
364
|
}
|
386
365
|
|
387
366
|
fcall: operation
|
388
367
|
{
|
389
|
-
msg, = val
|
390
|
-
result = new_call(nil, msg.to_sym).line
|
368
|
+
(msg, line), = val
|
369
|
+
result = new_call(nil, msg.to_sym).line line
|
391
370
|
}
|
392
371
|
|
393
372
|
command: fcall command_args =tLOWEST
|
@@ -410,12 +389,14 @@ rule
|
|
410
389
|
}
|
411
390
|
| primary_value call_op operation2 command_args =tLOWEST
|
412
391
|
{
|
413
|
-
lhs, callop, op, args = val
|
392
|
+
lhs, callop, (op, _), args = val
|
393
|
+
|
414
394
|
result = new_call lhs, op.to_sym, args, callop
|
395
|
+
result.line lhs.line
|
415
396
|
}
|
416
397
|
| primary_value call_op operation2 command_args cmd_brace_block
|
417
398
|
{
|
418
|
-
recv, _, msg, args, block = val
|
399
|
+
recv, _, (msg, _line), args, block = val
|
419
400
|
call = new_call recv, msg.to_sym, args, val[1]
|
420
401
|
|
421
402
|
block_dup_check call, block
|
@@ -425,11 +406,14 @@ rule
|
|
425
406
|
}
|
426
407
|
| primary_value tCOLON2 operation2 command_args =tLOWEST
|
427
408
|
{
|
428
|
-
|
409
|
+
lhs, _, (id, line), args = val
|
410
|
+
|
411
|
+
result = new_call lhs, id.to_sym, args
|
412
|
+
result.line line
|
429
413
|
}
|
430
414
|
| primary_value tCOLON2 operation2 command_args cmd_brace_block
|
431
415
|
{
|
432
|
-
recv, _, msg, args, block = val
|
416
|
+
recv, _, (msg, _line), args, block = val
|
433
417
|
call = new_call recv, msg.to_sym, args
|
434
418
|
|
435
419
|
block_dup_check call, block
|
@@ -587,25 +571,29 @@ rule
|
|
587
571
|
}
|
588
572
|
| primary_value call_op tIDENTIFIER
|
589
573
|
{
|
590
|
-
|
574
|
+
lhs, call_op, (id, _line) = val
|
575
|
+
|
576
|
+
result = new_attrasgn lhs, id, call_op
|
591
577
|
}
|
592
578
|
| primary_value tCOLON2 tIDENTIFIER
|
593
579
|
{
|
594
|
-
recv, _, id = val
|
580
|
+
recv, _, (id, _line) = val
|
595
581
|
result = new_attrasgn recv, id
|
596
582
|
}
|
597
583
|
| primary_value call_op tCONSTANT
|
598
584
|
{
|
599
|
-
|
585
|
+
lhs, call_op, (id, _line) = val
|
586
|
+
|
587
|
+
result = new_attrasgn lhs, id, call_op
|
600
588
|
}
|
601
589
|
| primary_value tCOLON2 tCONSTANT
|
602
590
|
{
|
603
591
|
if (self.in_def || self.in_single > 0) then
|
604
|
-
|
592
|
+
debug 14
|
605
593
|
yyerror "dynamic constant assignment"
|
606
594
|
end
|
607
595
|
|
608
|
-
expr, _, id = val
|
596
|
+
expr, _, (id, _line) = val
|
609
597
|
l = expr.line
|
610
598
|
|
611
599
|
result = s(:const, s(:colon2, expr, id.to_sym).line(l), nil).line l
|
@@ -613,58 +601,65 @@ rule
|
|
613
601
|
| tCOLON3 tCONSTANT
|
614
602
|
{
|
615
603
|
if (self.in_def || self.in_single > 0) then
|
616
|
-
|
604
|
+
debug 15
|
617
605
|
yyerror "dynamic constant assignment"
|
618
606
|
end
|
619
607
|
|
620
|
-
_, id = val
|
621
|
-
l = lexer.lineno
|
608
|
+
_, (id, l) = val
|
622
609
|
|
623
610
|
result = s(:const, nil, s(:colon3, id.to_sym).line(l)).line l
|
624
611
|
}
|
625
612
|
| backref
|
626
613
|
{
|
627
|
-
|
614
|
+
ref, = val
|
615
|
+
|
616
|
+
self.backref_assign_error ref
|
628
617
|
}
|
629
618
|
|
630
619
|
lhs: user_variable
|
631
620
|
{
|
632
|
-
|
633
|
-
|
634
|
-
result
|
621
|
+
var, = val
|
622
|
+
|
623
|
+
result = self.assignable var
|
635
624
|
}
|
636
625
|
| keyword_variable
|
637
626
|
{
|
638
|
-
|
639
|
-
|
640
|
-
result
|
641
|
-
|
627
|
+
var, = val
|
628
|
+
|
629
|
+
result = self.assignable var
|
630
|
+
|
631
|
+
debug 16
|
642
632
|
}
|
643
633
|
| primary_value tLBRACK2 opt_call_args rbracket
|
644
634
|
{
|
645
635
|
lhs, _, args, _ = val
|
636
|
+
|
646
637
|
result = self.aryset lhs, args
|
647
638
|
}
|
648
639
|
| primary_value call_op tIDENTIFIER # REFACTOR
|
649
640
|
{
|
650
|
-
lhs, op, id = val
|
641
|
+
lhs, op, (id, _line) = val
|
642
|
+
|
651
643
|
result = new_attrasgn lhs, id, op
|
652
644
|
}
|
653
645
|
| primary_value tCOLON2 tIDENTIFIER
|
654
646
|
{
|
655
|
-
lhs, _, id = val
|
647
|
+
lhs, _, (id, _line) = val
|
648
|
+
|
656
649
|
result = new_attrasgn lhs, id
|
657
650
|
}
|
658
651
|
| primary_value call_op tCONSTANT # REFACTOR?
|
659
652
|
{
|
660
|
-
|
653
|
+
lhs, call_op, (id, _line) = val
|
654
|
+
|
655
|
+
result = new_attrasgn lhs, id, call_op
|
661
656
|
}
|
662
657
|
| primary_value tCOLON2 tCONSTANT
|
663
658
|
{
|
664
|
-
expr, _, id = val
|
659
|
+
expr, _, (id, _line) = val
|
665
660
|
|
666
661
|
if (self.in_def || self.in_single > 0) then
|
667
|
-
|
662
|
+
debug 17
|
668
663
|
yyerror "dynamic constant assignment"
|
669
664
|
end
|
670
665
|
|
@@ -673,14 +668,13 @@ rule
|
|
673
668
|
}
|
674
669
|
| tCOLON3 tCONSTANT
|
675
670
|
{
|
676
|
-
_, id = val
|
671
|
+
_, (id, l) = val
|
677
672
|
|
678
673
|
if (self.in_def || self.in_single > 0) then
|
679
|
-
|
674
|
+
debug 18
|
680
675
|
yyerror "dynamic constant assignment"
|
681
676
|
end
|
682
677
|
|
683
|
-
l = lexer.lineno
|
684
678
|
result = s(:const, s(:colon3, id.to_sym).line(l)).line l
|
685
679
|
}
|
686
680
|
| backref
|
@@ -696,16 +690,17 @@ rule
|
|
696
690
|
|
697
691
|
cpath: tCOLON3 cname
|
698
692
|
{
|
699
|
-
_, name = val
|
700
|
-
result = s(:colon3, name.to_sym).line
|
693
|
+
_, (name, line) = val
|
694
|
+
result = s(:colon3, name.to_sym).line line
|
701
695
|
}
|
702
696
|
| cname
|
703
697
|
{
|
704
|
-
|
698
|
+
(id, line), = val
|
699
|
+
result = [id.to_sym, line] # TODO: sexp?
|
705
700
|
}
|
706
701
|
| primary_value tCOLON2 cname
|
707
702
|
{
|
708
|
-
pval, _, name = val
|
703
|
+
pval, _, (name, _line) = val
|
709
704
|
|
710
705
|
result = s(:colon2, pval, name.to_sym)
|
711
706
|
result.line pval.line
|
@@ -715,24 +710,17 @@ rule
|
|
715
710
|
| op
|
716
711
|
{
|
717
712
|
lexer.lex_state = EXPR_END
|
718
|
-
result = val[0]
|
719
713
|
}
|
720
714
|
|
721
715
|
| reswords
|
722
|
-
{
|
723
|
-
(sym, _line), = val
|
724
|
-
lexer.lex_state = EXPR_END
|
725
|
-
result = sym
|
726
|
-
}
|
727
|
-
|
728
|
-
fsym: fname | symbol
|
729
716
|
|
730
|
-
fitem:
|
717
|
+
fitem: fname
|
731
718
|
{
|
732
|
-
id, = val
|
733
|
-
|
719
|
+
(id, line), = val
|
720
|
+
|
721
|
+
result = s(:lit, id.to_sym).line line
|
734
722
|
}
|
735
|
-
|
|
723
|
+
| symbol
|
736
724
|
|
737
725
|
undef_list: fitem
|
738
726
|
{
|
@@ -753,10 +741,6 @@ rule
|
|
753
741
|
| tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2
|
754
742
|
| tSTAR | tDIVIDE | tPERCENT | tPOW | tDSTAR | tBANG | tTILDE
|
755
743
|
| tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2
|
756
|
-
#if V >= 20
|
757
|
-
# TODO: tUBANG dead?
|
758
|
-
| tUBANG
|
759
|
-
#endif
|
760
744
|
|
761
745
|
reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND
|
762
746
|
| kALIAS | kAND | kBEGIN | kBREAK | kCASE
|
@@ -790,24 +774,20 @@ rule
|
|
790
774
|
}
|
791
775
|
| primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg_rhs
|
792
776
|
{
|
793
|
-
lhs, _, id, op, rhs = val
|
777
|
+
lhs, _, (id, _line), (op, _), rhs = val
|
794
778
|
|
795
779
|
result = s(:op_asgn, lhs, rhs, id.to_sym, op.to_sym).line lhs.line
|
796
780
|
}
|
797
781
|
| primary_value tCOLON2 tCONSTANT tOP_ASGN arg_rhs
|
798
782
|
{
|
799
|
-
lhs1, _, lhs2, op, rhs = val
|
783
|
+
lhs1, _, (lhs2, _line), op, rhs = val
|
800
784
|
|
801
785
|
lhs = s(:colon2, lhs1, lhs2.to_sym).line lhs1.line
|
802
786
|
result = new_const_op_asgn [lhs, op, rhs]
|
803
787
|
}
|
804
|
-
| tCOLON3 tCONSTANT
|
805
|
-
{
|
806
|
-
result = self.lexer.lineno
|
807
|
-
}
|
808
|
-
tOP_ASGN arg_rhs
|
788
|
+
| tCOLON3 tCONSTANT tOP_ASGN arg_rhs
|
809
789
|
{
|
810
|
-
_, lhs, line, op, rhs = val
|
790
|
+
_, (lhs, line), op, rhs = val
|
811
791
|
|
812
792
|
lhs = s(:colon3, lhs.to_sym).line line
|
813
793
|
result = new_const_op_asgn [lhs, op, rhs]
|
@@ -821,7 +801,7 @@ rule
|
|
821
801
|
| arg tDOT2 arg
|
822
802
|
{
|
823
803
|
v1, v2 = val[0], val[2]
|
824
|
-
if v1.
|
804
|
+
if v1.sexp_type == :lit and v2.sexp_type == :lit and Integer === v1.last and Integer === v2.last then
|
825
805
|
result = s(:lit, (v1.last)..(v2.last)).line v1.line
|
826
806
|
else
|
827
807
|
result = s(:dot2, v1, v2).line v1.line
|
@@ -830,13 +810,12 @@ rule
|
|
830
810
|
| arg tDOT3 arg
|
831
811
|
{
|
832
812
|
v1, v2 = val[0], val[2]
|
833
|
-
if v1.
|
813
|
+
if v1.sexp_type == :lit and v2.sexp_type == :lit and Integer === v1.last and Integer === v2.last then
|
834
814
|
result = s(:lit, (v1.last)...(v2.last)).line v1.line
|
835
815
|
else
|
836
816
|
result = s(:dot3, v1, v2).line v1.line
|
837
817
|
end
|
838
818
|
}
|
839
|
-
#if V >= 26
|
840
819
|
| arg tDOT2
|
841
820
|
{
|
842
821
|
v1, _ = val
|
@@ -851,7 +830,8 @@ rule
|
|
851
830
|
|
852
831
|
result = s(:dot3, v1, v2).line v1.line
|
853
832
|
}
|
854
|
-
|
833
|
+
|
834
|
+
|
855
835
|
| arg tPLUS arg
|
856
836
|
{
|
857
837
|
result = new_call val[0], :+, argl(val[2])
|
@@ -876,24 +856,12 @@ rule
|
|
876
856
|
{
|
877
857
|
result = new_call val[0], :**, argl(val[2])
|
878
858
|
}
|
879
|
-
#if V == 20
|
880
|
-
| tUMINUS_NUM tINTEGER tPOW arg
|
881
|
-
{
|
882
|
-
lit = s(:lit, val[1]).line lexer.lineno
|
883
|
-
result = new_call(new_call(lit, :"**", argl(val[3])), :"-@")
|
884
|
-
}
|
885
|
-
| tUMINUS_NUM tFLOAT tPOW arg
|
886
|
-
#else
|
887
859
|
| tUMINUS_NUM simple_numeric tPOW arg
|
888
|
-
#endif
|
889
860
|
{
|
890
|
-
|
891
|
-
|
861
|
+
_, (num, line), _, arg = val
|
862
|
+
lit = s(:lit, num).line line
|
863
|
+
result = new_call(new_call(lit, :"**", argl(arg)), :"-@")
|
892
864
|
|
893
|
-
#if V == 20
|
894
|
-
## TODO: why is this 2.0 only?
|
895
|
-
debug20 12, val, result
|
896
|
-
#endif
|
897
865
|
}
|
898
866
|
| tUPLUS arg
|
899
867
|
{
|
@@ -991,12 +959,12 @@ rule
|
|
991
959
|
|
992
960
|
rel_expr: arg relop arg =tGT
|
993
961
|
{
|
994
|
-
lhs, op, rhs = val
|
962
|
+
lhs, (op, _), rhs = val
|
995
963
|
result = new_call lhs, op.to_sym, argl(rhs)
|
996
964
|
}
|
997
965
|
| rel_expr relop arg =tGT
|
998
966
|
{
|
999
|
-
lhs, op, rhs = val
|
967
|
+
lhs, (op, _), rhs = val
|
1000
968
|
warn "comparison '%s' after comparison", op
|
1001
969
|
result = new_call lhs, op.to_sym, argl(rhs)
|
1002
970
|
}
|
@@ -1063,17 +1031,14 @@ rule
|
|
1063
1031
|
| args opt_block_arg
|
1064
1032
|
{
|
1065
1033
|
result = call_args val
|
1066
|
-
result = self.arg_blk_pass val[0], val[1]
|
1067
1034
|
}
|
1068
1035
|
| assocs opt_block_arg
|
1069
1036
|
{
|
1070
|
-
result = call_args [array_to_hash(val[0])]
|
1071
|
-
result = self.arg_blk_pass result, val[1]
|
1037
|
+
result = call_args [array_to_hash(val[0]), val[1]]
|
1072
1038
|
}
|
1073
1039
|
| args tCOMMA assocs opt_block_arg
|
1074
1040
|
{
|
1075
|
-
result = call_args [val[0], array_to_hash(val[2])]
|
1076
|
-
result = self.arg_blk_pass result, val[3]
|
1041
|
+
result = call_args [val[0], array_to_hash(val[2]), val[3]]
|
1077
1042
|
}
|
1078
1043
|
| block_arg
|
1079
1044
|
{
|
@@ -1081,12 +1046,39 @@ rule
|
|
1081
1046
|
}
|
1082
1047
|
|
1083
1048
|
command_args: {
|
1084
|
-
|
1049
|
+
# parse26.y line 2200
|
1050
|
+
|
1051
|
+
# If call_args starts with a open paren '(' or
|
1052
|
+
# '[', look-ahead reading of the letters calls
|
1053
|
+
# CMDARG_PUSH(0), but the push must be done
|
1054
|
+
# after CMDARG_PUSH(1). So this code makes them
|
1055
|
+
# consistent by first cancelling the premature
|
1056
|
+
# CMDARG_PUSH(0), doing CMDARG_PUSH(1), and
|
1057
|
+
# finally redoing CMDARG_PUSH(0).
|
1058
|
+
|
1059
|
+
result = yychar = self.last_token_type.first
|
1060
|
+
lookahead = [:tLPAREN, :tLPAREN_ARG, :tLPAREN2, :tLBRACK, :tLBRACK2].include?(yychar)
|
1061
|
+
lexer.cmdarg.pop if lookahead
|
1062
|
+
lexer.cmdarg.push true
|
1063
|
+
lexer.cmdarg.push false if lookahead
|
1085
1064
|
}
|
1086
1065
|
call_args
|
1087
1066
|
{
|
1088
|
-
|
1089
|
-
|
1067
|
+
yychar, args = val
|
1068
|
+
|
1069
|
+
# call_args can be followed by tLBRACE_ARG (that
|
1070
|
+
# does CMDARG_PUSH(0) in the lexer) but the push
|
1071
|
+
# must be done after CMDARG_POP() in the parser.
|
1072
|
+
# So this code does CMDARG_POP() to pop 0 pushed
|
1073
|
+
# by tLBRACE_ARG, CMDARG_POP() to pop 1 pushed
|
1074
|
+
# by command_args, and CMDARG_PUSH(0) to restore
|
1075
|
+
# back the flag set by tLBRACE_ARG.
|
1076
|
+
|
1077
|
+
lookahead = [:tLBRACE_ARG].include?(yychar)
|
1078
|
+
lexer.cmdarg.pop if lookahead
|
1079
|
+
lexer.cmdarg.pop
|
1080
|
+
lexer.cmdarg.push false if lookahead
|
1081
|
+
result = args
|
1090
1082
|
}
|
1091
1083
|
|
1092
1084
|
block_arg: tAMPER arg_value
|
@@ -1104,8 +1096,9 @@ rule
|
|
1104
1096
|
args: arg_value
|
1105
1097
|
{
|
1106
1098
|
arg, = val
|
1099
|
+
lineno = arg.line || lexer.lineno # HACK
|
1107
1100
|
|
1108
|
-
result = s(:array, arg).line
|
1101
|
+
result = s(:array, arg).line lineno
|
1109
1102
|
}
|
1110
1103
|
| tSTAR arg_value
|
1111
1104
|
{
|
@@ -1117,13 +1110,14 @@ rule
|
|
1117
1110
|
args, _, id = val
|
1118
1111
|
result = self.list_append args, id
|
1119
1112
|
}
|
1120
|
-
| args tCOMMA tSTAR
|
1113
|
+
| args tCOMMA tSTAR arg_value
|
1121
1114
|
{
|
1122
|
-
|
1115
|
+
# TODO: the line number from tSTAR has been dropped
|
1116
|
+
args, _, _, id = val
|
1117
|
+
line = lexer.lineno
|
1123
1118
|
result = self.list_append args, s(:splat, id).line(line)
|
1124
1119
|
}
|
1125
1120
|
|
1126
|
-
#if V >= 21
|
1127
1121
|
mrhs_arg: mrhs
|
1128
1122
|
{
|
1129
1123
|
result = new_masgn_arg val[0]
|
@@ -1133,14 +1127,12 @@ rule
|
|
1133
1127
|
result = new_masgn_arg val[0], :wrap
|
1134
1128
|
}
|
1135
1129
|
|
1136
|
-
#endif
|
1137
1130
|
mrhs: args tCOMMA arg_value
|
1138
1131
|
{
|
1139
1132
|
result = val[0] << val[2]
|
1140
1133
|
}
|
1141
1134
|
| args tCOMMA tSTAR arg_value
|
1142
1135
|
{
|
1143
|
-
# FIX: bad shift/reduce conflict with rhs' comma star prod
|
1144
1136
|
# TODO: make all tXXXX terminals include lexer.lineno
|
1145
1137
|
arg, _, _, splat = val
|
1146
1138
|
result = self.arg_concat arg, splat
|
@@ -1163,26 +1155,19 @@ rule
|
|
1163
1155
|
| backref
|
1164
1156
|
| tFID
|
1165
1157
|
{
|
1166
|
-
msg, = val
|
1158
|
+
(msg, line), = val
|
1167
1159
|
result = new_call nil, msg.to_sym
|
1160
|
+
result.line line
|
1168
1161
|
}
|
1169
1162
|
| k_begin
|
1170
1163
|
{
|
1164
|
+
lexer.cmdarg.push false
|
1171
1165
|
result = self.lexer.lineno
|
1172
|
-
# TODO:
|
1173
|
-
# $<val>1 = cmdarg_stack;
|
1174
|
-
# CMDARG_SET(0);
|
1175
1166
|
}
|
1176
1167
|
bodystmt k_end
|
1177
1168
|
{
|
1178
|
-
|
1179
|
-
|
1180
|
-
result = s(:nil)
|
1181
|
-
else
|
1182
|
-
result = s(:begin, val[2])
|
1183
|
-
end
|
1184
|
-
|
1185
|
-
result.line = val[1]
|
1169
|
+
lexer.cmdarg.pop
|
1170
|
+
result = new_begin val
|
1186
1171
|
}
|
1187
1172
|
| tLPAREN_ARG
|
1188
1173
|
{
|
@@ -1195,18 +1180,14 @@ rule
|
|
1195
1180
|
result = s(:begin).line line
|
1196
1181
|
}
|
1197
1182
|
| tLPAREN_ARG
|
1198
|
-
{
|
1199
|
-
result = lexer.cmdarg.store false
|
1200
|
-
}
|
1201
1183
|
stmt
|
1202
1184
|
{
|
1203
1185
|
lexer.lex_state = EXPR_ENDARG
|
1204
1186
|
}
|
1205
1187
|
rparen
|
1206
1188
|
{
|
1207
|
-
_,
|
1208
|
-
warning "(...) interpreted as grouped expression"
|
1209
|
-
lexer.cmdarg.restore cmdarg
|
1189
|
+
_, stmt, _, _, = val
|
1190
|
+
# warning "(...) interpreted as grouped expression"
|
1210
1191
|
result = stmt
|
1211
1192
|
}
|
1212
1193
|
| tLPAREN compstmt tRPAREN
|
@@ -1218,15 +1199,15 @@ rule
|
|
1218
1199
|
}
|
1219
1200
|
| primary_value tCOLON2 tCONSTANT
|
1220
1201
|
{
|
1221
|
-
expr, _, id = val
|
1202
|
+
expr, _, (id, _line) = val
|
1222
1203
|
|
1223
1204
|
result = s(:colon2, expr, id.to_sym).line expr.line
|
1224
1205
|
}
|
1225
1206
|
| tCOLON3 tCONSTANT
|
1226
1207
|
{
|
1227
|
-
_, id = val
|
1208
|
+
_, (id, line) = val
|
1228
1209
|
|
1229
|
-
result = s(:colon3, id.to_sym).line
|
1210
|
+
result = s(:colon3, id.to_sym).line line
|
1230
1211
|
}
|
1231
1212
|
| tLBRACK { result = lexer.lineno } aref_args tRBRACK
|
1232
1213
|
{
|
@@ -1250,15 +1231,21 @@ rule
|
|
1250
1231
|
}
|
1251
1232
|
| kYIELD tLPAREN2 call_args rparen
|
1252
1233
|
{
|
1253
|
-
|
1234
|
+
(_, line), _, args, _ = val
|
1235
|
+
|
1236
|
+
result = new_yield(args).line line
|
1254
1237
|
}
|
1255
1238
|
| kYIELD tLPAREN2 rparen
|
1256
1239
|
{
|
1257
|
-
|
1240
|
+
(_, line), _, _ = val
|
1241
|
+
|
1242
|
+
result = new_yield.line line
|
1258
1243
|
}
|
1259
1244
|
| kYIELD
|
1260
1245
|
{
|
1261
|
-
|
1246
|
+
(_, line), = val
|
1247
|
+
|
1248
|
+
result = new_yield.line line
|
1262
1249
|
}
|
1263
1250
|
| kDEFINED opt_nl tLPAREN2 expr rparen
|
1264
1251
|
{
|
@@ -1273,7 +1260,7 @@ rule
|
|
1273
1260
|
}
|
1274
1261
|
| kNOT tLPAREN2 rparen
|
1275
1262
|
{
|
1276
|
-
|
1263
|
+
debug 20
|
1277
1264
|
}
|
1278
1265
|
| fcall brace_block
|
1279
1266
|
{
|
@@ -1291,9 +1278,10 @@ rule
|
|
1291
1278
|
iter.insert 1, call # FIX
|
1292
1279
|
result = iter
|
1293
1280
|
}
|
1294
|
-
|
|
1281
|
+
| lambda
|
1295
1282
|
{
|
1296
|
-
|
1283
|
+
expr, = val
|
1284
|
+
result = expr
|
1297
1285
|
}
|
1298
1286
|
| k_if expr_value then compstmt if_tail k_end
|
1299
1287
|
{
|
@@ -1336,7 +1324,6 @@ rule
|
|
1336
1324
|
}
|
1337
1325
|
cpath superclass
|
1338
1326
|
{
|
1339
|
-
self.comments.push self.lexer.comments
|
1340
1327
|
if (self.in_def || self.in_single > 0) then
|
1341
1328
|
yyerror "class definition in method body"
|
1342
1329
|
end
|
@@ -1346,7 +1333,7 @@ rule
|
|
1346
1333
|
{
|
1347
1334
|
result = new_class val
|
1348
1335
|
self.env.unextend
|
1349
|
-
self.lexer.
|
1336
|
+
self.lexer.ignore_body_comments
|
1350
1337
|
}
|
1351
1338
|
| k_class tLSHFT
|
1352
1339
|
{
|
@@ -1367,7 +1354,7 @@ rule
|
|
1367
1354
|
{
|
1368
1355
|
result = new_sclass val
|
1369
1356
|
self.env.unextend
|
1370
|
-
self.lexer.
|
1357
|
+
self.lexer.ignore_body_comments
|
1371
1358
|
}
|
1372
1359
|
| k_module
|
1373
1360
|
{
|
@@ -1375,7 +1362,6 @@ rule
|
|
1375
1362
|
}
|
1376
1363
|
cpath
|
1377
1364
|
{
|
1378
|
-
self.comments.push self.lexer.comments
|
1379
1365
|
yyerror "module definition in method body" if
|
1380
1366
|
self.in_def or self.in_single > 0
|
1381
1367
|
|
@@ -1385,53 +1371,67 @@ rule
|
|
1385
1371
|
{
|
1386
1372
|
result = new_module val
|
1387
1373
|
self.env.unextend
|
1388
|
-
self.lexer.
|
1374
|
+
self.lexer.ignore_body_comments
|
1389
1375
|
}
|
1390
1376
|
| k_def fname
|
1391
1377
|
{
|
1392
|
-
result =
|
1378
|
+
result = self.in_def
|
1393
1379
|
|
1394
|
-
self.
|
1395
|
-
self.in_def = true
|
1380
|
+
self.in_def = true # group = local_push
|
1396
1381
|
self.env.extend
|
1397
|
-
|
1398
|
-
|
1399
|
-
lexer.cmdarg.stack.replace [false]
|
1382
|
+
lexer.cmdarg.push false
|
1383
|
+
lexer.cond.push false
|
1400
1384
|
}
|
1401
|
-
f_arglist bodystmt
|
1385
|
+
f_arglist bodystmt k_end
|
1402
1386
|
{
|
1403
|
-
|
1387
|
+
result, in_def = new_defn val
|
1404
1388
|
|
1405
|
-
|
1406
|
-
|
1407
|
-
lexer.cmdarg.stack.replace cmdarg
|
1389
|
+
lexer.cond.pop # group = local_pop
|
1390
|
+
lexer.cmdarg.pop
|
1408
1391
|
self.env.unextend
|
1409
1392
|
self.in_def = in_def
|
1410
|
-
|
1393
|
+
|
1394
|
+
self.lexer.ignore_body_comments
|
1411
1395
|
}
|
1412
1396
|
| k_def singleton dot_or_colon
|
1413
1397
|
{
|
1414
|
-
self.comments.push self.lexer.comments
|
1415
1398
|
lexer.lex_state = EXPR_FNAME
|
1416
1399
|
}
|
1417
1400
|
fname
|
1418
1401
|
{
|
1419
|
-
self.
|
1402
|
+
result = self.in_def
|
1403
|
+
|
1404
|
+
self.in_single += 1 # TODO: remove?
|
1405
|
+
|
1406
|
+
self.in_def = true # local_push
|
1420
1407
|
self.env.extend
|
1421
|
-
lexer.
|
1422
|
-
|
1423
|
-
|
1408
|
+
lexer.cmdarg.push false
|
1409
|
+
lexer.cond.push false
|
1410
|
+
|
1411
|
+
lexer.lex_state = EXPR_ENDFN|EXPR_LABEL
|
1424
1412
|
}
|
1425
1413
|
f_arglist bodystmt k_end
|
1426
1414
|
{
|
1427
|
-
_, cmdarg = val[5]
|
1428
|
-
result = new_defs val
|
1429
1415
|
|
1430
|
-
|
1416
|
+
# [kdef, recv, _, _, (name, line), in_def, args, body, kend]
|
1417
|
+
# =>
|
1418
|
+
# [kdef, recv, (name, line), in_def, args, body, kend]
|
1419
|
+
|
1420
|
+
val.delete_at 3
|
1421
|
+
val.delete_at 2
|
1431
1422
|
|
1423
|
+
result, in_def = new_defs val
|
1424
|
+
|
1425
|
+
lexer.cond.pop # group = local_pop
|
1426
|
+
lexer.cmdarg.pop
|
1432
1427
|
self.env.unextend
|
1428
|
+
self.in_def = in_def
|
1429
|
+
|
1433
1430
|
self.in_single -= 1
|
1434
|
-
|
1431
|
+
|
1432
|
+
# TODO: restore cur_arg ? what's cur_arg?
|
1433
|
+
|
1434
|
+
self.lexer.ignore_body_comments
|
1435
1435
|
}
|
1436
1436
|
| kBREAK
|
1437
1437
|
{
|
@@ -1468,8 +1468,17 @@ rule
|
|
1468
1468
|
k_case: kCASE
|
1469
1469
|
k_for: kFOR
|
1470
1470
|
k_class: kCLASS
|
1471
|
+
{
|
1472
|
+
self.comments.push self.lexer.comments
|
1473
|
+
}
|
1471
1474
|
k_module: kMODULE
|
1475
|
+
{
|
1476
|
+
self.comments.push self.lexer.comments
|
1477
|
+
}
|
1472
1478
|
k_def: kDEF
|
1479
|
+
{
|
1480
|
+
self.comments.push self.lexer.comments
|
1481
|
+
}
|
1473
1482
|
k_do: kDO
|
1474
1483
|
k_do_block: kDO_BLOCK
|
1475
1484
|
k_rescue: kRESCUE
|
@@ -1530,51 +1539,42 @@ rule
|
|
1530
1539
|
|
1531
1540
|
result = block_var args
|
1532
1541
|
}
|
1533
|
-
| f_marg_list tCOMMA
|
1542
|
+
| f_marg_list tCOMMA f_rest_marg
|
1534
1543
|
{
|
1535
|
-
args, _,
|
1544
|
+
args, _, rest = val
|
1536
1545
|
|
1537
|
-
result = block_var args,
|
1546
|
+
result = block_var args, rest
|
1538
1547
|
}
|
1539
|
-
| f_marg_list tCOMMA
|
1548
|
+
| f_marg_list tCOMMA f_rest_marg tCOMMA f_marg_list
|
1540
1549
|
{
|
1541
|
-
|
1550
|
+
lhs, _, splat, _, rhs = val
|
1542
1551
|
|
1543
|
-
result = block_var
|
1552
|
+
result = block_var lhs, splat, rhs
|
1544
1553
|
}
|
1545
|
-
|
|
1554
|
+
| f_rest_marg
|
1546
1555
|
{
|
1547
|
-
|
1556
|
+
rest, = val
|
1548
1557
|
|
1549
|
-
result = block_var
|
1558
|
+
result = block_var rest
|
1550
1559
|
}
|
1551
|
-
|
|
1560
|
+
| f_rest_marg tCOMMA f_marg_list
|
1552
1561
|
{
|
1553
|
-
|
1562
|
+
splat, _, rest = val
|
1554
1563
|
|
1555
|
-
result = block_var
|
1564
|
+
result = block_var splat, rest
|
1556
1565
|
}
|
1557
|
-
| tSTAR f_norm_arg
|
1558
|
-
{
|
1559
|
-
_, splat = val
|
1560
1566
|
|
1561
|
-
|
1562
|
-
}
|
1563
|
-
| tSTAR f_norm_arg tCOMMA f_marg_list
|
1567
|
+
f_rest_marg: tSTAR f_norm_arg
|
1564
1568
|
{
|
1565
|
-
_,
|
1569
|
+
_, (id, line) = val
|
1566
1570
|
|
1567
|
-
result =
|
1571
|
+
result = args ["*#{id}".to_sym]
|
1572
|
+
result.line line
|
1568
1573
|
}
|
1569
1574
|
| tSTAR
|
1570
1575
|
{
|
1571
|
-
result =
|
1572
|
-
|
1573
|
-
| tSTAR tCOMMA f_marg_list
|
1574
|
-
{
|
1575
|
-
_, _, args = val
|
1576
|
-
|
1577
|
-
result = block_var :*, args
|
1576
|
+
result = args [:*]
|
1577
|
+
result.line lexer.lineno # FIX: tSTAR -> line
|
1578
1578
|
}
|
1579
1579
|
|
1580
1580
|
block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg
|
@@ -1591,8 +1591,8 @@ rule
|
|
1591
1591
|
}
|
1592
1592
|
| f_block_arg
|
1593
1593
|
{
|
1594
|
-
line =
|
1595
|
-
result = call_args
|
1594
|
+
(id, line), = val
|
1595
|
+
result = call_args [id]
|
1596
1596
|
result.line line
|
1597
1597
|
}
|
1598
1598
|
|
@@ -1701,13 +1701,13 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1701
1701
|
|
1702
1702
|
bvar: tIDENTIFIER
|
1703
1703
|
{
|
1704
|
-
id, = val
|
1705
|
-
line = lexer.lineno
|
1704
|
+
(id, line), = val
|
1706
1705
|
result = s(:shadow, id.to_sym).line line
|
1707
1706
|
}
|
1708
1707
|
| f_bad_arg
|
1709
1708
|
|
1710
|
-
lambda:
|
1709
|
+
lambda: tLAMBDA
|
1710
|
+
{
|
1711
1711
|
self.env.extend :dynamic
|
1712
1712
|
result = [lexer.lineno, lexer.lpar_beg]
|
1713
1713
|
lexer.paren_nest += 1
|
@@ -1715,20 +1715,19 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1715
1715
|
}
|
1716
1716
|
f_larglist
|
1717
1717
|
{
|
1718
|
-
|
1718
|
+
lexer.cmdarg.push false
|
1719
1719
|
}
|
1720
1720
|
lambda_body
|
1721
1721
|
{
|
1722
|
-
(line, lpar), args,
|
1722
|
+
_, (line, lpar), args, _cmdarg, body = val
|
1723
1723
|
lexer.lpar_beg = lpar
|
1724
1724
|
|
1725
|
-
lexer.cmdarg.
|
1726
|
-
lexer.cmdarg.lexpop
|
1725
|
+
lexer.cmdarg.pop
|
1727
1726
|
|
1728
1727
|
call = s(:lambda).line line
|
1729
1728
|
result = new_iter call, args, body
|
1730
|
-
result.line
|
1731
|
-
self.env.unextend
|
1729
|
+
result.line line
|
1730
|
+
self.env.unextend # TODO: dynapush & dynapop
|
1732
1731
|
}
|
1733
1732
|
|
1734
1733
|
f_larglist: tLPAREN2 f_args opt_bv_decl rparen
|
@@ -1762,23 +1761,28 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1762
1761
|
## if (nd_type($1) == NODE_YIELD) {
|
1763
1762
|
## compile_error(PARSER_ARG "block given to yield");
|
1764
1763
|
|
1765
|
-
|
1766
|
-
val[0].block_pass?
|
1764
|
+
cmd, blk = val
|
1767
1765
|
|
1768
|
-
|
1766
|
+
syntax_error "Both block arg and actual block given." if
|
1767
|
+
cmd.block_pass?
|
1769
1768
|
|
1770
|
-
|
1769
|
+
if inverted? val then
|
1770
|
+
val = invert_block_call val
|
1771
|
+
cmd, blk = val
|
1772
|
+
end
|
1771
1773
|
|
1772
1774
|
result = blk
|
1773
1775
|
result.insert 1, cmd
|
1774
1776
|
}
|
1775
1777
|
| block_call call_op2 operation2 opt_paren_args
|
1776
1778
|
{
|
1777
|
-
|
1779
|
+
lhs, _, (id, _line), args = val
|
1780
|
+
|
1781
|
+
result = new_call lhs, id.to_sym, args
|
1778
1782
|
}
|
1779
1783
|
| block_call call_op2 operation2 opt_paren_args brace_block
|
1780
1784
|
{
|
1781
|
-
iter1, _, name, args, iter2 = val
|
1785
|
+
iter1, _, (name, _line), args, iter2 = val
|
1782
1786
|
|
1783
1787
|
call = new_call iter1, name.to_sym, args
|
1784
1788
|
iter2.insert 1, call
|
@@ -1787,7 +1791,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1787
1791
|
}
|
1788
1792
|
| block_call call_op2 operation2 command_args do_block
|
1789
1793
|
{
|
1790
|
-
iter1, _, name, args, iter2 = val
|
1794
|
+
iter1, _, (name, _line), args, iter2 = val
|
1791
1795
|
|
1792
1796
|
call = new_call iter1, name.to_sym, args
|
1793
1797
|
iter2.insert 1, call
|
@@ -1795,28 +1799,29 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1795
1799
|
result = iter2
|
1796
1800
|
}
|
1797
1801
|
|
1798
|
-
method_call: fcall
|
1802
|
+
method_call: fcall paren_args
|
1799
1803
|
{
|
1800
|
-
|
1801
|
-
}
|
1802
|
-
paren_args
|
1803
|
-
{
|
1804
|
-
call, lineno, args = val
|
1804
|
+
call, args = val
|
1805
1805
|
|
1806
1806
|
result = call.concat args.sexp_body if args
|
1807
|
-
result.line lineno
|
1808
1807
|
}
|
1809
1808
|
| primary_value call_op operation2 opt_paren_args
|
1810
1809
|
{
|
1811
|
-
|
1810
|
+
recv, call_op, (op, _line), args = val
|
1811
|
+
|
1812
|
+
result = new_call recv, op.to_sym, args, call_op
|
1812
1813
|
}
|
1813
1814
|
| primary_value tCOLON2 operation2 paren_args
|
1814
1815
|
{
|
1815
|
-
|
1816
|
+
recv, _, (op, _line), args = val
|
1817
|
+
|
1818
|
+
result = new_call recv, op.to_sym, args
|
1816
1819
|
}
|
1817
1820
|
| primary_value tCOLON2 operation3
|
1818
1821
|
{
|
1819
|
-
|
1822
|
+
lhs, _, (id, _line) = val
|
1823
|
+
|
1824
|
+
result = new_call lhs, id.to_sym
|
1820
1825
|
}
|
1821
1826
|
| primary_value call_op paren_args
|
1822
1827
|
{
|
@@ -1849,7 +1854,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1849
1854
|
_, line, body, _ = val
|
1850
1855
|
|
1851
1856
|
result = body
|
1852
|
-
result.line
|
1857
|
+
result.line line
|
1853
1858
|
|
1854
1859
|
self.env.unextend
|
1855
1860
|
}
|
@@ -1863,7 +1868,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1863
1868
|
_, line, body, _ = val
|
1864
1869
|
|
1865
1870
|
result = body
|
1866
|
-
result.line
|
1871
|
+
result.line line
|
1867
1872
|
|
1868
1873
|
self.env.unextend
|
1869
1874
|
}
|
@@ -1881,29 +1886,50 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1881
1886
|
}
|
1882
1887
|
|
1883
1888
|
do_body: { self.env.extend :dynamic; result = self.lexer.lineno }
|
1884
|
-
{
|
1889
|
+
{ lexer.cmdarg.push false }
|
1885
1890
|
opt_block_param
|
1886
|
-
#if V >= 25
|
1887
1891
|
bodystmt
|
1888
|
-
#else
|
1889
|
-
compstmt
|
1890
|
-
#endif
|
1891
1892
|
{
|
1892
|
-
line,
|
1893
|
+
line, _cmdarg, param, cmpstmt = val
|
1893
1894
|
|
1894
1895
|
result = new_do_body param, cmpstmt, line
|
1896
|
+
lexer.cmdarg.pop
|
1895
1897
|
self.env.unextend
|
1896
|
-
|
1898
|
+
}
|
1899
|
+
|
1900
|
+
case_args: arg_value
|
1901
|
+
{
|
1902
|
+
arg, = val
|
1903
|
+
|
1904
|
+
result = s(:array, arg).line arg.line
|
1905
|
+
}
|
1906
|
+
| tSTAR arg_value
|
1907
|
+
{
|
1908
|
+
_, arg = val
|
1909
|
+
|
1910
|
+
result = s(:array, s(:splat, arg).line(arg.line)).line arg.line
|
1911
|
+
}
|
1912
|
+
| case_args tCOMMA arg_value
|
1913
|
+
{
|
1914
|
+
args, _, id = val
|
1915
|
+
|
1916
|
+
result = self.list_append args, id
|
1917
|
+
}
|
1918
|
+
| case_args tCOMMA tSTAR arg_value
|
1919
|
+
{
|
1920
|
+
args, _, _, id = val
|
1921
|
+
|
1922
|
+
result = self.list_append args, s(:splat, id).line(id.line)
|
1897
1923
|
}
|
1898
1924
|
|
1899
1925
|
case_body: k_when
|
1900
1926
|
{
|
1901
1927
|
result = self.lexer.lineno
|
1902
1928
|
}
|
1903
|
-
|
1929
|
+
case_args then compstmt cases
|
1904
1930
|
{
|
1905
1931
|
result = new_when(val[2], val[4])
|
1906
|
-
result.line
|
1932
|
+
result.line val[1]
|
1907
1933
|
result << val[5] if val[5]
|
1908
1934
|
}
|
1909
1935
|
|
@@ -1949,17 +1975,10 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1949
1975
|
|
1950
1976
|
literal: numeric
|
1951
1977
|
{
|
1952
|
-
line =
|
1953
|
-
result = s(:lit,
|
1954
|
-
result.line = line
|
1978
|
+
(lit, line), = val
|
1979
|
+
result = s(:lit, lit).line line
|
1955
1980
|
}
|
1956
1981
|
| symbol
|
1957
|
-
{
|
1958
|
-
line = lexer.lineno
|
1959
|
-
result = s(:lit, val[0])
|
1960
|
-
result.line = line
|
1961
|
-
}
|
1962
|
-
| dsym
|
1963
1982
|
|
1964
1983
|
strings: string
|
1965
1984
|
{
|
@@ -1970,7 +1989,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1970
1989
|
|
1971
1990
|
string: tCHAR
|
1972
1991
|
{
|
1973
|
-
|
1992
|
+
debug 37
|
1974
1993
|
}
|
1975
1994
|
| string1
|
1976
1995
|
| string string1
|
@@ -1980,11 +1999,11 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1980
1999
|
|
1981
2000
|
string1: tSTRING_BEG string_contents tSTRING_END
|
1982
2001
|
{
|
1983
|
-
_, str, (_, func) = val
|
2002
|
+
(_, line), str, (_, func) = val
|
1984
2003
|
|
1985
|
-
str = dedent str if func =~ RubyLexer::
|
2004
|
+
str = dedent str if func =~ RubyLexer::STR_FUNC_DEDENT
|
1986
2005
|
|
1987
|
-
result = str
|
2006
|
+
result = str.line line
|
1988
2007
|
}
|
1989
2008
|
| tSTRING
|
1990
2009
|
{
|
@@ -1993,7 +2012,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1993
2012
|
|
1994
2013
|
xstring: tXSTRING_BEG xstring_contents tSTRING_END
|
1995
2014
|
{
|
1996
|
-
result = new_xstring val
|
2015
|
+
result = new_xstring val
|
1997
2016
|
# TODO: dedent?!?! SERIOUSLY?!?
|
1998
2017
|
}
|
1999
2018
|
|
@@ -2004,11 +2023,15 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
2004
2023
|
|
2005
2024
|
words: tWORDS_BEG tSPACE tSTRING_END
|
2006
2025
|
{
|
2007
|
-
|
2026
|
+
(_, line), _, _ = val
|
2027
|
+
|
2028
|
+
result = s(:array).line line
|
2008
2029
|
}
|
2009
2030
|
| tWORDS_BEG word_list tSTRING_END
|
2010
2031
|
{
|
2011
|
-
|
2032
|
+
(_, line), list, _ = val
|
2033
|
+
|
2034
|
+
result = list.line line
|
2012
2035
|
}
|
2013
2036
|
|
2014
2037
|
word_list: none
|
@@ -2028,18 +2051,20 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
2028
2051
|
|
2029
2052
|
symbols: tSYMBOLS_BEG tSPACE tSTRING_END
|
2030
2053
|
{
|
2031
|
-
|
2054
|
+
(_, line), _, _ = val
|
2055
|
+
|
2056
|
+
result = s(:array).line line
|
2032
2057
|
}
|
2033
|
-
| tSYMBOLS_BEG
|
2058
|
+
| tSYMBOLS_BEG symbol_list tSTRING_END
|
2034
2059
|
{
|
2035
|
-
_, line, list, _, = val
|
2036
|
-
list.line
|
2060
|
+
(_, line), list, _, = val
|
2061
|
+
list.line line
|
2037
2062
|
result = list
|
2038
2063
|
}
|
2039
2064
|
|
2040
2065
|
symbol_list: none
|
2041
2066
|
{
|
2042
|
-
result = new_symbol_list
|
2067
|
+
result = new_symbol_list
|
2043
2068
|
}
|
2044
2069
|
| symbol_list word tSPACE
|
2045
2070
|
{
|
@@ -2049,20 +2074,28 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
2049
2074
|
|
2050
2075
|
qwords: tQWORDS_BEG tSPACE tSTRING_END
|
2051
2076
|
{
|
2052
|
-
|
2077
|
+
(_, line), _, _ = val
|
2078
|
+
|
2079
|
+
result = s(:array).line line
|
2053
2080
|
}
|
2054
2081
|
| tQWORDS_BEG qword_list tSTRING_END
|
2055
2082
|
{
|
2056
|
-
|
2083
|
+
(_, line), list, _ = val
|
2084
|
+
|
2085
|
+
result = list.line line
|
2057
2086
|
}
|
2058
2087
|
|
2059
2088
|
qsymbols: tQSYMBOLS_BEG tSPACE tSTRING_END
|
2060
2089
|
{
|
2061
|
-
|
2090
|
+
(_, line), _, _ = val
|
2091
|
+
|
2092
|
+
result = s(:array).line line
|
2062
2093
|
}
|
2063
2094
|
| tQSYMBOLS_BEG qsym_list tSTRING_END
|
2064
2095
|
{
|
2065
|
-
|
2096
|
+
(_, line), list, _ = val
|
2097
|
+
|
2098
|
+
result = list.line line
|
2066
2099
|
}
|
2067
2100
|
|
2068
2101
|
qword_list: none
|
@@ -2085,7 +2118,8 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
2085
2118
|
|
2086
2119
|
string_contents: none
|
2087
2120
|
{
|
2088
|
-
|
2121
|
+
line = prev_value_to_lineno _values.last
|
2122
|
+
result = s(:str, +"").line line
|
2089
2123
|
}
|
2090
2124
|
| string_contents string_content
|
2091
2125
|
{
|
@@ -2135,12 +2169,13 @@ regexp_contents: none
|
|
2135
2169
|
result = [lexer.lex_strterm,
|
2136
2170
|
lexer.brace_nest,
|
2137
2171
|
lexer.string_nest, # TODO: remove
|
2138
|
-
lexer.cond.store,
|
2139
|
-
lexer.cmdarg.store,
|
2140
2172
|
lexer.lex_state,
|
2141
2173
|
lexer.lineno,
|
2142
2174
|
]
|
2143
2175
|
|
2176
|
+
lexer.cmdarg.push false
|
2177
|
+
lexer.cond.push false
|
2178
|
+
|
2144
2179
|
lexer.lex_strterm = nil
|
2145
2180
|
lexer.brace_nest = 0
|
2146
2181
|
lexer.string_nest = 0
|
@@ -2152,14 +2187,15 @@ regexp_contents: none
|
|
2152
2187
|
{
|
2153
2188
|
_, memo, stmt, _ = val
|
2154
2189
|
|
2155
|
-
lex_strterm, brace_nest, string_nest,
|
2190
|
+
lex_strterm, brace_nest, string_nest, oldlex_state, line = memo
|
2191
|
+
# TODO: heredoc_indent
|
2156
2192
|
|
2157
2193
|
lexer.lex_strterm = lex_strterm
|
2158
2194
|
lexer.brace_nest = brace_nest
|
2159
2195
|
lexer.string_nest = string_nest
|
2160
2196
|
|
2161
|
-
lexer.cond.
|
2162
|
-
lexer.cmdarg.
|
2197
|
+
lexer.cond.pop
|
2198
|
+
lexer.cmdarg.pop
|
2163
2199
|
|
2164
2200
|
lexer.lex_state = oldlex_state
|
2165
2201
|
|
@@ -2174,29 +2210,49 @@ regexp_contents: none
|
|
2174
2210
|
when nil then
|
2175
2211
|
result = s(:evstr).line line
|
2176
2212
|
else
|
2177
|
-
|
2213
|
+
debug 38
|
2178
2214
|
raise "unknown string body: #{stmt.inspect}"
|
2179
2215
|
end
|
2180
2216
|
}
|
2181
2217
|
|
2182
|
-
string_dvar: tGVAR
|
2183
|
-
|
2184
|
-
|
2218
|
+
string_dvar: tGVAR
|
2219
|
+
{
|
2220
|
+
(id, line), = val
|
2221
|
+
result = s(:gvar, id.to_sym).line line
|
2222
|
+
}
|
2223
|
+
| tIVAR
|
2224
|
+
{
|
2225
|
+
(id, line), = val
|
2226
|
+
result = s(:ivar, id.to_sym).line line
|
2227
|
+
}
|
2228
|
+
| tCVAR
|
2229
|
+
{
|
2230
|
+
(id, line), = val
|
2231
|
+
result = s(:cvar, id.to_sym).line line
|
2232
|
+
}
|
2185
2233
|
| backref
|
2186
2234
|
|
2187
|
-
symbol:
|
2235
|
+
symbol: ssym
|
2236
|
+
| dsym
|
2237
|
+
|
2238
|
+
ssym: tSYMBEG sym
|
2188
2239
|
{
|
2240
|
+
_, (id, line) = val
|
2241
|
+
|
2189
2242
|
lexer.lex_state = EXPR_END
|
2190
|
-
result =
|
2243
|
+
result = s(:lit, id.to_sym).line line
|
2191
2244
|
}
|
2192
2245
|
| tSYMBOL
|
2193
2246
|
{
|
2194
|
-
|
2247
|
+
(id, line), = val
|
2248
|
+
|
2249
|
+
lexer.lex_state = EXPR_END
|
2250
|
+
result = s(:lit, id.to_sym).line line
|
2195
2251
|
}
|
2196
2252
|
|
2197
2253
|
sym: fname | tIVAR | tGVAR | tCVAR
|
2198
2254
|
|
2199
|
-
dsym: tSYMBEG
|
2255
|
+
dsym: tSYMBEG string_contents tSTRING_END
|
2200
2256
|
{
|
2201
2257
|
_, result, _ = val
|
2202
2258
|
|
@@ -2212,35 +2268,22 @@ regexp_contents: none
|
|
2212
2268
|
when :evstr then
|
2213
2269
|
result = s(:dsym, "", result).line result.line
|
2214
2270
|
else
|
2215
|
-
|
2271
|
+
debug 39
|
2216
2272
|
end
|
2217
2273
|
}
|
2218
2274
|
|
2219
|
-
#if V == 20
|
2220
|
-
numeric: tINTEGER
|
2221
|
-
| tFLOAT
|
2222
|
-
| tUMINUS_NUM tINTEGER =tLOWEST
|
2223
|
-
#else
|
2224
2275
|
numeric: simple_numeric
|
2225
|
-
| tUMINUS_NUM simple_numeric
|
2226
|
-
#endif
|
2276
|
+
| tUMINUS_NUM simple_numeric =tLOWEST
|
2227
2277
|
{
|
2228
|
-
|
2229
|
-
|
2230
|
-
}
|
2231
|
-
| tUMINUS_NUM tFLOAT =tLOWEST
|
2232
|
-
{
|
2233
|
-
result = -val[1] # TODO: pt_testcase
|
2234
|
-
#endif
|
2278
|
+
_, (num, line) = val
|
2279
|
+
result = [-num, line]
|
2235
2280
|
}
|
2236
2281
|
|
2237
|
-
#if V >= 21
|
2238
2282
|
simple_numeric: tINTEGER
|
2239
2283
|
| tFLOAT
|
2240
2284
|
| tRATIONAL
|
2241
2285
|
| tIMAGINARY
|
2242
2286
|
|
2243
|
-
#endif
|
2244
2287
|
user_variable: tIDENTIFIER
|
2245
2288
|
| tIVAR
|
2246
2289
|
| tGVAR
|
@@ -2266,8 +2309,10 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2266
2309
|
|
2267
2310
|
var_ref: user_variable
|
2268
2311
|
{
|
2269
|
-
|
2312
|
+
raise "NO: #{val.inspect}" if Sexp === val.first
|
2313
|
+
(var, line), = val
|
2270
2314
|
result = Sexp === var ? var : self.gettable(var)
|
2315
|
+
result.line line
|
2271
2316
|
}
|
2272
2317
|
| keyword_variable
|
2273
2318
|
{
|
@@ -2282,11 +2327,19 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2282
2327
|
| keyword_variable
|
2283
2328
|
{
|
2284
2329
|
result = self.assignable val[0]
|
2285
|
-
|
2330
|
+
debug 40
|
2286
2331
|
}
|
2287
2332
|
|
2288
|
-
backref: tNTH_REF
|
2289
|
-
|
2333
|
+
backref: tNTH_REF
|
2334
|
+
{
|
2335
|
+
(ref, line), = val
|
2336
|
+
result = s(:nth_ref, ref).line line
|
2337
|
+
}
|
2338
|
+
| tBACK_REF
|
2339
|
+
{
|
2340
|
+
(ref, line), = val
|
2341
|
+
result = s(:back_ref, ref).line line
|
2342
|
+
}
|
2290
2343
|
|
2291
2344
|
superclass: tLT
|
2292
2345
|
{
|
@@ -2304,9 +2357,7 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2304
2357
|
|
2305
2358
|
f_arglist: tLPAREN2 f_args rparen
|
2306
2359
|
{
|
2307
|
-
result = val
|
2308
|
-
self.lexer.lex_state = EXPR_BEG
|
2309
|
-
self.lexer.command_start = true
|
2360
|
+
result = end_args val
|
2310
2361
|
}
|
2311
2362
|
| {
|
2312
2363
|
result = self.in_kwarg
|
@@ -2315,12 +2366,7 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2315
2366
|
}
|
2316
2367
|
f_args term
|
2317
2368
|
{
|
2318
|
-
|
2319
|
-
|
2320
|
-
self.in_kwarg = kwarg
|
2321
|
-
result = args
|
2322
|
-
lexer.lex_state = EXPR_BEG
|
2323
|
-
lexer.command_start = true
|
2369
|
+
result = end_args val
|
2324
2370
|
}
|
2325
2371
|
|
2326
2372
|
args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg
|
@@ -2405,8 +2451,10 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2405
2451
|
|
|
2406
2452
|
{
|
2407
2453
|
result = args val
|
2454
|
+
# result.line lexer.lineno
|
2408
2455
|
}
|
2409
2456
|
|
2457
|
+
|
2410
2458
|
f_bad_arg: tCONSTANT
|
2411
2459
|
{
|
2412
2460
|
yyerror "formal argument cannot be a constant"
|
@@ -2427,41 +2475,26 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2427
2475
|
f_norm_arg: f_bad_arg
|
2428
2476
|
| tIDENTIFIER
|
2429
2477
|
{
|
2430
|
-
|
2478
|
+
(id, line), = val
|
2479
|
+
identifier = id.to_sym
|
2431
2480
|
self.env[identifier] = :lvar
|
2432
2481
|
|
2433
|
-
result = identifier
|
2482
|
+
result = [identifier, line]
|
2434
2483
|
}
|
2435
2484
|
|
2436
|
-
#if V >= 22
|
2437
2485
|
f_arg_asgn: f_norm_arg
|
2438
2486
|
|
2439
2487
|
f_arg_item: f_arg_asgn
|
2440
2488
|
| tLPAREN f_margs rparen
|
2441
2489
|
{
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
f_arg_item: f_norm_arg
|
2446
|
-
| tLPAREN f_margs rparen
|
2447
|
-
{
|
2448
|
-
result = val[1]
|
2490
|
+
_, margs, _ = val
|
2491
|
+
|
2492
|
+
result = margs
|
2449
2493
|
}
|
2450
|
-
#endif
|
2451
2494
|
|
2452
2495
|
f_arg: f_arg_item
|
2453
2496
|
{
|
2454
|
-
|
2455
|
-
|
2456
|
-
case arg
|
2457
|
-
when Symbol then
|
2458
|
-
result = s(:args, arg).line lexer.lineno
|
2459
|
-
when Sexp then
|
2460
|
-
result = arg
|
2461
|
-
else
|
2462
|
-
debug20 32
|
2463
|
-
raise "Unknown f_arg type: #{val.inspect}"
|
2464
|
-
end
|
2497
|
+
result = new_arg val
|
2465
2498
|
}
|
2466
2499
|
| f_arg tCOMMA f_arg_item
|
2467
2500
|
{
|
@@ -2473,16 +2506,12 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2473
2506
|
result = s(:args, list).line list.line
|
2474
2507
|
end
|
2475
2508
|
|
2476
|
-
result << item
|
2509
|
+
result << (Sexp === item ? item : item.first)
|
2477
2510
|
}
|
2478
2511
|
|
2479
|
-
#if V == 20
|
2480
|
-
f_kw: tLABEL arg_value
|
2481
|
-
#else
|
2482
2512
|
f_label: tLABEL
|
2483
2513
|
|
2484
2514
|
f_kw: f_label arg_value
|
2485
|
-
#endif
|
2486
2515
|
{
|
2487
2516
|
# TODO: new_kw_arg
|
2488
2517
|
(label, line), arg = val
|
@@ -2493,7 +2522,6 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2493
2522
|
kwarg = s(:kwarg, identifier, arg).line line
|
2494
2523
|
result = s(:array, kwarg).line line
|
2495
2524
|
}
|
2496
|
-
#if V >= 21
|
2497
2525
|
| f_label
|
2498
2526
|
{
|
2499
2527
|
(label, line), = val
|
@@ -2503,13 +2531,8 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2503
2531
|
|
2504
2532
|
result = s(:array, s(:kwarg, id).line(line)).line line
|
2505
2533
|
}
|
2506
|
-
#endif
|
2507
2534
|
|
2508
|
-
#if V == 20
|
2509
|
-
f_block_kw: tLABEL primary_value
|
2510
|
-
#else
|
2511
2535
|
f_block_kw: f_label primary_value
|
2512
|
-
#endif
|
2513
2536
|
{
|
2514
2537
|
# TODO: new_kw_arg
|
2515
2538
|
(label, line), expr = val
|
@@ -2518,7 +2541,6 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2518
2541
|
|
2519
2542
|
result = s(:array, s(:kwarg, id, expr).line(line)).line line
|
2520
2543
|
}
|
2521
|
-
#if V >= 21
|
2522
2544
|
| f_label
|
2523
2545
|
{
|
2524
2546
|
# TODO: new_kw_arg
|
@@ -2528,7 +2550,6 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2528
2550
|
|
2529
2551
|
result = s(:array, s(:kwarg, id).line(line)).line line
|
2530
2552
|
}
|
2531
|
-
#endif
|
2532
2553
|
|
2533
2554
|
f_block_kwarg: f_block_kw
|
2534
2555
|
| f_block_kwarg tCOMMA f_block_kw
|
@@ -2546,38 +2567,33 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2546
2567
|
kwrest_mark: tPOW
|
2547
2568
|
| tDSTAR
|
2548
2569
|
|
2570
|
+
|
2549
2571
|
f_kwrest: kwrest_mark tIDENTIFIER
|
2550
2572
|
{
|
2551
|
-
|
2552
|
-
|
2553
|
-
|
2573
|
+
_, (id, line) = val
|
2574
|
+
|
2575
|
+
name = id.to_sym
|
2576
|
+
self.assignable [name, line]
|
2577
|
+
result = [:"**#{name}", line]
|
2554
2578
|
}
|
2555
2579
|
| kwrest_mark
|
2556
2580
|
{
|
2557
|
-
|
2581
|
+
id = :"**"
|
2582
|
+
self.env[id] = :lvar # TODO: needed?!?
|
2583
|
+
result = [id, lexer.lineno] # TODO: tPOW/tDSTAR include lineno
|
2558
2584
|
}
|
2559
2585
|
|
2560
|
-
#if V == 20
|
2561
|
-
f_opt: tIDENTIFIER tEQL arg_value
|
2562
|
-
#elif V == 21
|
2563
|
-
f_opt: f_norm_arg tEQL arg_value
|
2564
|
-
#else
|
2565
2586
|
f_opt: f_arg_asgn tEQL arg_value
|
2566
|
-
#endif
|
2567
2587
|
{
|
2568
|
-
|
2588
|
+
lhs, _, rhs = val
|
2589
|
+
result = self.assignable lhs, rhs
|
2569
2590
|
# TODO: detect duplicate names
|
2570
2591
|
}
|
2571
2592
|
|
2572
|
-
#if V == 20
|
2573
|
-
f_block_opt: tIDENTIFIER tEQL primary_value
|
2574
|
-
#elif V == 21
|
2575
|
-
f_block_opt: f_norm_arg tEQL primary_value
|
2576
|
-
#else
|
2577
2593
|
f_block_opt: f_arg_asgn tEQL primary_value
|
2578
|
-
#endif
|
2579
2594
|
{
|
2580
|
-
|
2595
|
+
lhs, _, rhs = val
|
2596
|
+
result = self.assignable lhs, rhs
|
2581
2597
|
}
|
2582
2598
|
|
2583
2599
|
f_block_optarg: f_block_opt
|
@@ -2607,30 +2623,33 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2607
2623
|
f_rest_arg: restarg_mark tIDENTIFIER
|
2608
2624
|
{
|
2609
2625
|
# TODO: differs from parse.y - needs tests
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
2626
|
+
_, (id, line) = val
|
2627
|
+
name = id.to_sym
|
2628
|
+
self.assignable [name, line]
|
2629
|
+
result = [:"*#{name}", line]
|
2613
2630
|
}
|
2614
2631
|
| restarg_mark
|
2615
2632
|
{
|
2616
2633
|
name = :"*"
|
2617
2634
|
self.env[name] = :lvar
|
2618
|
-
result = name
|
2635
|
+
result = [name, lexer.lineno] # FIX: tSTAR to include lineno
|
2619
2636
|
}
|
2620
2637
|
|
2621
2638
|
blkarg_mark: tAMPER2 | tAMPER
|
2622
2639
|
|
2623
2640
|
f_block_arg: blkarg_mark tIDENTIFIER
|
2624
2641
|
{
|
2625
|
-
|
2642
|
+
_, (id, line) = val
|
2643
|
+
identifier = id.to_sym
|
2626
2644
|
|
2627
2645
|
self.env[identifier] = :lvar
|
2628
|
-
result = "&#{identifier}".to_sym
|
2646
|
+
result = ["&#{identifier}".to_sym, line]
|
2629
2647
|
}
|
2630
2648
|
|
2631
2649
|
opt_f_block_arg: tCOMMA f_block_arg
|
2632
2650
|
{
|
2633
|
-
|
2651
|
+
_, arg = val
|
2652
|
+
result = arg
|
2634
2653
|
}
|
2635
2654
|
|
|
2636
2655
|
{
|
@@ -2677,14 +2696,14 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2677
2696
|
lit = s(:lit, label.to_sym).line line
|
2678
2697
|
result = s(:array, lit, arg).line line
|
2679
2698
|
}
|
2680
|
-
#if V >= 22
|
2681
2699
|
| tSTRING_BEG string_contents tLABEL_END arg_value
|
2682
2700
|
{
|
2683
|
-
_, sym, _, value = val
|
2701
|
+
(_, line), sym, _, value = val
|
2702
|
+
|
2684
2703
|
sym.sexp_type = :dsym
|
2685
|
-
|
2704
|
+
|
2705
|
+
result = s(:array, sym, value).line line
|
2686
2706
|
}
|
2687
|
-
#endif
|
2688
2707
|
| tDSTAR arg_value
|
2689
2708
|
{
|
2690
2709
|
_, arg = val
|
@@ -2697,9 +2716,7 @@ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
|
2697
2716
|
operation3: tIDENTIFIER | tFID | op
|
2698
2717
|
dot_or_colon: tDOT | tCOLON2
|
2699
2718
|
call_op: tDOT
|
2700
|
-
#if V >= 23
|
2701
2719
|
| tLONELY # TODO: rename tANDDOT?
|
2702
|
-
#endif
|
2703
2720
|
|
2704
2721
|
call_op2: call_op
|
2705
2722
|
| tCOLON2
|