brakeman 4.5.1 → 4.10.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 +216 -109
- data/README.md +13 -6
- data/bundle/load.rb +14 -13
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/README.txt +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/erubis-2.7.0/setup.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/CHANGELOG.md +138 -4
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/FAQ.md +4 -14
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/Gemfile +16 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/MIT-LICENSE +20 -0
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/README.md +79 -42
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/REFERENCE.md +150 -71
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/TODO +24 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/haml.gemspec +45 -0
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml.rb +2 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/attribute_builder.rb +164 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/attribute_compiler.rb +235 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/attribute_parser.rb +150 -0
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/buffer.rb +25 -132
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/compiler.rb +330 -0
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/engine.rb +34 -41
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/error.rb +65 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/escapable.rb +77 -0
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/exec.rb +38 -20
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/filters.rb +22 -27
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/generator.rb +42 -0
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/helpers.rb +134 -89
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/helpers/action_view_extensions.rb +4 -2
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/helpers/action_view_mods.rb +45 -60
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/helpers/action_view_xss_mods.rb +2 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/helpers/safe_erubi_template.rb +20 -0
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/helpers/safe_erubis_template.rb +5 -1
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/helpers/xss_mods.rb +23 -13
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/options.rb +63 -69
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/parser.rb +319 -227
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/plugin.rb +37 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/railtie.rb +48 -0
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/sass_rails_filter.rb +18 -4
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/template.rb +13 -6
- data/bundle/ruby/{2.5.0/gems/haml-4.0.7 → 2.7.0/gems/haml-5.2.1}/lib/haml/template/options.rb +13 -2
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/temple_engine.rb +123 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/temple_line_counter.rb +30 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/util.rb +258 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/lib/haml/version.rb +5 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/yard/default/fulldoc/html/css/common.sass +15 -0
- data/bundle/ruby/2.7.0/gems/haml-5.2.1/yard/default/layout/html/footer.erb +12 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/AUTHORS +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/COPYING +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/Changelog.md +3 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/Gemfile +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/LICENSE +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/README.md +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/TODO +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/appveyor.yml +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/highline.gemspec +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/builtin_styles.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/color_scheme.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/compatibility.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/custom_errors.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/import.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/io_console_compatible.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/list.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/list_renderer.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/menu.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/menu/item.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/paginator.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/question.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/question/answer_converter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/question_asker.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/simulate.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/statement.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/string.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/string_extensions.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/style.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/template_renderer.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/terminal.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/terminal/io_console.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/terminal/ncurses.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/terminal/unix_stty.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/version.rb +1 -1
- data/bundle/ruby/{2.5.0/gems/highline-2.0.2 → 2.7.0/gems/highline-2.0.3}/lib/highline/wrapper.rb +0 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/Gemfile +6 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/LICENSE.txt +22 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/NEWS.md +141 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/README.md +60 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/attlistdecl.rb +63 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/attribute.rb +205 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/cdata.rb +68 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/child.rb +97 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/comment.rb +80 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/doctype.rb +287 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/document.rb +291 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/dtd/attlistdecl.rb +11 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/dtd/dtd.rb +47 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/dtd/elementdecl.rb +18 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/dtd/entitydecl.rb +57 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/dtd/notationdecl.rb +40 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/element.rb +1269 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/encoding.rb +51 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/entity.rb +171 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/formatters/default.rb +116 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/formatters/pretty.rb +142 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/formatters/transitive.rb +58 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/functions.rb +447 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/instruction.rb +79 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/light/node.rb +196 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/namespace.rb +59 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/node.rb +76 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/output.rb +30 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parent.rb +166 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parseexception.rb +52 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parsers/baseparser.rb +594 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parsers/lightparser.rb +59 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parsers/pullparser.rb +197 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parsers/sax2parser.rb +273 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parsers/streamparser.rb +61 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parsers/treeparser.rb +101 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parsers/ultralightparser.rb +57 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/parsers/xpathparser.rb +675 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/quickpath.rb +266 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/rexml.rb +32 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/sax2listener.rb +98 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/security.rb +28 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/source.rb +298 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/streamlistener.rb +93 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/text.rb +424 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/undefinednamespaceexception.rb +9 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/validation/relaxng.rb +539 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/validation/validation.rb +144 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/validation/validationexception.rb +10 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/xmldecl.rb +130 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/xmltokens.rb +85 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/xpath.rb +81 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/lib/rexml/xpath_parser.rb +968 -0
- data/bundle/ruby/2.7.0/gems/rexml-3.2.4/rexml.gemspec +84 -0
- data/bundle/ruby/{2.5.0/gems/ruby2ruby-2.4.2 → 2.7.0/gems/ruby2ruby-2.4.4}/History.rdoc +19 -5
- data/bundle/ruby/{2.5.0/gems/ruby2ruby-2.4.2 → 2.7.0/gems/ruby2ruby-2.4.4}/Manifest.txt +0 -0
- data/bundle/ruby/{2.5.0/gems/ruby2ruby-2.4.2 → 2.7.0/gems/ruby2ruby-2.4.4}/README.rdoc +0 -0
- data/bundle/ruby/{2.5.0/gems/ruby2ruby-2.4.2 → 2.7.0/gems/ruby2ruby-2.4.4}/lib/ruby2ruby.rb +122 -112
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/History.rdoc +91 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/Manifest.txt +2 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/README.rdoc +3 -3
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/compare/normalize.rb +43 -3
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/debugging.md +57 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/rp_extensions.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/rp_stringscanner.rb +0 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby20_parser.rb +7062 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1/lib/ruby_parser.yy → 2.7.0/gems/ruby_parser-3.15.0/lib/ruby20_parser.y} +473 -450
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby21_parser.rb +7140 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby21_parser.y +482 -307
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby22_parser.rb +7160 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby22_parser.y +483 -308
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby23_parser.rb +7175 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby23_parser.y +483 -308
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby24_parser.rb +7204 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby24_parser.y +487 -310
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby25_parser.rb +7204 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby25_parser.y +487 -310
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby26_parser.rb +7224 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby26_parser.y +493 -314
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby27_parser.rb +7224 -0
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby27_parser.y +2657 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby_lexer.rb +483 -459
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby_lexer.rex +5 -6
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby_lexer.rex.rb +6 -8
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby_parser.rb +29 -27
- data/bundle/ruby/2.7.0/gems/ruby_parser-3.15.0/lib/ruby_parser.yy +2764 -0
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/lib/ruby_parser_extras.rb +670 -420
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/tools/munge.rb +10 -5
- data/bundle/ruby/{2.5.0/gems/ruby_parser-3.13.1 → 2.7.0/gems/ruby_parser-3.15.0}/tools/ripper.rb +13 -2
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/CHANGES.md +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/Gemfile +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/LICENSE.txt +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/README.md +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -0
- data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.15.1}/History.rdoc +53 -0
- data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.15.1}/Manifest.txt +1 -0
- data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.15.1}/README.rdoc +0 -0
- data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.15.1}/lib/composite_sexp_processor.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.15.1}/lib/pt_testcase.rb +15 -17
- data/bundle/ruby/2.7.0/gems/sexp_processor-4.15.1/lib/sexp.rb +381 -0
- data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0/lib/sexp.rb → 2.7.0/gems/sexp_processor-4.15.1/lib/sexp_matcher.rb} +67 -387
- data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.15.1}/lib/sexp_processor.rb +2 -2
- data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.15.1}/lib/strict_sexp.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/sexp_processor-4.12.0 → 2.7.0/gems/sexp_processor-4.15.1}/lib/unique.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/CHANGES +4 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/Gemfile +12 -13
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/LICENSE +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.jp.md +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/README.md +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/code_attributes.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/command.rb +13 -13
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/controls.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/do_inserter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/embedded.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/end_inserter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/engine.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/erb_converter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/filter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/grammar.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/include.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/interpolation.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less/context.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/logic_less/filter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/parser.rb +1 -1
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/escaper.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/filter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/smart/parser.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/splat/builder.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/splat/filter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/template.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/translator.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/lib/slim/version.rb +1 -1
- data/bundle/ruby/{2.5.0/gems/slim-4.0.1 → 2.7.0/gems/slim-4.1.0}/slim.gemspec +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/CHANGES +5 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/EXPRESSIONS.md +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/Gemfile +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/LICENSE +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/README.md +1 -1
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/engine.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/erb/engine.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/erb/parser.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/erb/template.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/erb/trimming.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/exceptions.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/code_merger.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/control_flow.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/dynamic_inliner.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/encoding.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/eraser.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/escapable.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/multi_flattener.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/remove_bom.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/static_analyzer.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/static_merger.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/string_splitter.rb +1 -1
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/filters/validator.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generator.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/array.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/array_buffer.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/erb.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/rails_output_buffer.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/generators/string_buffer.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/grammar.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/attribute_merger.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/attribute_remover.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/attribute_sorter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/dispatcher.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/fast.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/filter.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/pretty.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/html/safe.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/map.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/dispatcher.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/engine_dsl.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/grammar_dsl.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/options.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/mixins/template.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/parser.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/static_analyzer.rb +1 -1
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/templates.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/templates/rails.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/templates/tilt.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/lib/temple/utils.rb +0 -0
- data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/version.rb +3 -0
- data/bundle/ruby/{2.5.0/gems/temple-0.8.1 → 2.7.0/gems/temple-0.8.2}/temple.gemspec +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/Gemfile +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/History.rdoc +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/LICENSE.txt +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/Manifest +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/README.rdoc +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/Todo.rdoc +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/import.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/table_helper.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +0 -0
- data/bundle/ruby/{2.5.0 → 2.7.0}/gems/terminal-table-1.8.0/terminal-table.gemspec +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/COPYING +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt.rb +1 -1
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/asciidoc.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/babel.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/bluecloth.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/builder.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/coffee.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/commonmarker.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/creole.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/csv.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/dummy.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/erb.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/erubi.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/erubis.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/etanni.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/haml.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/kramdown.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/less.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/liquid.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/livescript.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/mapping.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/markaby.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/maruku.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/nokogiri.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/pandoc.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/plain.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/prawn.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/radius.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/rdiscount.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/rdoc.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/redcarpet.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/redcloth.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/rst-pandoc.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/sass.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/sigil.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/string.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/template.rb +7 -12
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/typescript.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/wikicloth.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/tilt-2.0.9 → 2.7.0/gems/tilt-2.0.10}/lib/tilt/yajl.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.7.0}/CHANGELOG.md +8 -0
- data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.7.0}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.7.0}/README.md +3 -3
- data/bundle/ruby/2.7.0/gems/unicode-display_width-1.7.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.7.0}/lib/unicode/display_width.rb +1 -1
- data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.7.0}/lib/unicode/display_width/constants.rb +2 -2
- data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.7.0}/lib/unicode/display_width/index.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.7.0}/lib/unicode/display_width/no_string_ext.rb +0 -0
- data/bundle/ruby/{2.5.0/gems/unicode-display_width-1.6.0 → 2.7.0/gems/unicode-display_width-1.7.0}/lib/unicode/display_width/string_ext.rb +0 -0
- data/lib/brakeman.rb +24 -0
- data/lib/brakeman/call_index.rb +54 -15
- data/lib/brakeman/checks/base_check.rb +62 -56
- 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_cookie_serialization.rb +22 -0
- data/lib/brakeman/checks/check_cross_site_scripting.rb +4 -4
- data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +28 -0
- data/lib/brakeman/checks/check_deserialize.rb +24 -7
- data/lib/brakeman/checks/check_execute.rb +65 -5
- data/lib/brakeman/checks/check_file_access.rb +7 -1
- data/lib/brakeman/checks/check_header_dos.rb +2 -2
- data/lib/brakeman/checks/check_i18n_xss.rb +2 -2
- data/lib/brakeman/checks/check_jruby_xml.rb +2 -2
- data/lib/brakeman/checks/check_json_entity_escape.rb +38 -0
- data/lib/brakeman/checks/check_json_parsing.rb +2 -2
- 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 +34 -4
- data/lib/brakeman/checks/check_mime_type_dos.rb +2 -2
- 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_nested_attributes_bypass.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_reverse_tabnabbing.rb +58 -0
- data/lib/brakeman/checks/check_sanitize_methods.rb +2 -2
- data/lib/brakeman/checks/check_session_settings.rb +5 -2
- data/lib/brakeman/checks/check_skip_before_filter.rb +4 -4
- data/lib/brakeman/checks/check_sql.rb +24 -33
- data/lib/brakeman/checks/check_template_injection.rb +32 -0
- data/lib/brakeman/checks/check_xml_dos.rb +2 -2
- data/lib/brakeman/checks/check_yaml_parsing.rb +10 -18
- data/lib/brakeman/commandline.rb +25 -1
- data/lib/brakeman/differ.rb +16 -33
- data/lib/brakeman/file_parser.rb +9 -8
- data/lib/brakeman/file_path.rb +14 -0
- data/lib/brakeman/options.rb +21 -1
- data/lib/brakeman/parsers/haml_embedded.rb +1 -1
- data/lib/brakeman/parsers/template_parser.rb +3 -1
- data/lib/brakeman/processor.rb +2 -2
- data/lib/brakeman/processors/alias_processor.rb +19 -6
- data/lib/brakeman/processors/base_processor.rb +2 -0
- data/lib/brakeman/processors/controller_processor.rb +5 -5
- data/lib/brakeman/processors/gem_processor.rb +10 -2
- data/lib/brakeman/processors/haml_template_processor.rb +94 -123
- data/lib/brakeman/processors/lib/call_conversion_helper.rb +6 -5
- data/lib/brakeman/processors/lib/find_all_calls.rb +57 -18
- data/lib/brakeman/processors/lib/find_call.rb +3 -64
- data/lib/brakeman/processors/lib/rails2_config_processor.rb +1 -1
- data/lib/brakeman/processors/lib/render_helper.rb +3 -1
- data/lib/brakeman/processors/output_processor.rb +1 -1
- data/lib/brakeman/processors/template_alias_processor.rb +33 -0
- data/lib/brakeman/processors/template_processor.rb +10 -6
- data/lib/brakeman/report.rb +11 -1
- data/lib/brakeman/report/ignore/config.rb +10 -2
- 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 +114 -0
- data/lib/brakeman/report/report_text.rb +41 -21
- data/lib/brakeman/rescanner.rb +4 -0
- data/lib/brakeman/scanner.rb +4 -1
- data/lib/brakeman/tracker.rb +29 -3
- data/lib/brakeman/tracker/config.rb +43 -75
- data/lib/brakeman/tracker/constants.rb +10 -8
- data/lib/brakeman/tracker/controller.rb +1 -1
- data/lib/brakeman/util.rb +23 -5
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman/warning.rb +4 -0
- data/lib/brakeman/warning_codes.rb +10 -0
- data/lib/ruby_parser/bm_sexp.rb +16 -11
- metadata +422 -343
- data/bundle/ruby/2.5.0/gems/haml-4.0.7/MIT-LICENSE +0 -20
- data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/compiler.rb +0 -540
- data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/error.rb +0 -61
- data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/railtie.rb +0 -22
- data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/template/plugin.rb +0 -41
- data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/util.rb +0 -377
- data/bundle/ruby/2.5.0/gems/haml-4.0.7/lib/haml/version.rb +0 -3
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/debugging.md +0 -18
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby20_parser.rb +0 -6869
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby20_parser.y +0 -2431
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby21_parser.rb +0 -6944
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby22_parser.rb +0 -6968
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby23_parser.rb +0 -6987
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby24_parser.rb +0 -6994
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby25_parser.rb +0 -6994
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.1/lib/ruby26_parser.rb +0 -7012
- data/bundle/ruby/2.5.0/gems/temple-0.8.1/lib/temple/version.rb +0 -3
- data/bundle/ruby/2.5.0/gems/tilt-2.0.9/CHANGELOG.md +0 -132
- data/bundle/ruby/2.5.0/gems/tilt-2.0.9/Gemfile +0 -70
- data/bundle/ruby/2.5.0/gems/tilt-2.0.9/HACKING +0 -16
- data/bundle/ruby/2.5.0/gems/tilt-2.0.9/README.md +0 -233
- data/bundle/ruby/2.5.0/gems/tilt-2.0.9/tilt.gemspec +0 -130
- data/bundle/ruby/2.5.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
3
|
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
|
-
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
|
@@ -35,40 +19,31 @@ token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS
|
|
35
19
|
tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END
|
36
20
|
tSTRING tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA
|
37
21
|
tLAMBEG tDSTAR tCHAR tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DEND tUBANG
|
38
|
-
#if V >= 21
|
39
|
-
tRATIONAL tIMAGINARY
|
40
|
-
#endif
|
41
|
-
#if V >= 22
|
42
|
-
tLABEL_END
|
43
|
-
#endif
|
44
|
-
#if V >= 23
|
45
|
-
tLONELY
|
46
|
-
#endif
|
47
22
|
|
48
|
-
prechigh
|
49
|
-
right tBANG tTILDE tUPLUS
|
50
|
-
right tPOW
|
51
|
-
right tUMINUS_NUM tUMINUS
|
52
|
-
left tSTAR2 tDIVIDE tPERCENT
|
53
|
-
left tPLUS tMINUS
|
54
|
-
left tLSHFT tRSHFT
|
55
|
-
left tAMPER2
|
56
|
-
left tPIPE tCARET
|
57
|
-
left tGT tGEQ tLT tLEQ
|
58
|
-
nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
|
59
|
-
left tANDOP
|
60
|
-
left tOROP
|
61
|
-
nonassoc tDOT2 tDOT3
|
62
|
-
right tEH tCOLON
|
63
|
-
left kRESCUE_MOD
|
64
|
-
right tEQL tOP_ASGN
|
65
|
-
nonassoc kDEFINED
|
66
|
-
right kNOT
|
67
|
-
left kOR kAND
|
68
|
-
nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
|
69
|
-
nonassoc tLBRACE_ARG
|
70
|
-
nonassoc tLOWEST
|
71
23
|
preclow
|
24
|
+
nonassoc tLOWEST
|
25
|
+
nonassoc tLBRACE_ARG
|
26
|
+
nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
|
27
|
+
left kOR kAND
|
28
|
+
right kNOT
|
29
|
+
nonassoc kDEFINED
|
30
|
+
right tEQL tOP_ASGN
|
31
|
+
left kRESCUE_MOD
|
32
|
+
right tEH tCOLON
|
33
|
+
nonassoc tDOT2 tDOT3
|
34
|
+
left tOROP
|
35
|
+
left tANDOP
|
36
|
+
nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
|
37
|
+
left tGT tGEQ tLT tLEQ
|
38
|
+
left tPIPE tCARET
|
39
|
+
left tAMPER2
|
40
|
+
left tLSHFT tRSHFT
|
41
|
+
left tPLUS tMINUS
|
42
|
+
left tSTAR2 tDIVIDE tPERCENT # TODO: tSTAR2 -> tMULT
|
43
|
+
right tUMINUS_NUM tUMINUS
|
44
|
+
right tPOW
|
45
|
+
right tBANG tTILDE tUPLUS
|
46
|
+
prechigh
|
72
47
|
|
73
48
|
rule
|
74
49
|
|
@@ -82,7 +57,8 @@ rule
|
|
82
57
|
|
83
58
|
top_compstmt: top_stmts opt_terms
|
84
59
|
{
|
85
|
-
|
60
|
+
stmt, _ = val
|
61
|
+
result = stmt
|
86
62
|
}
|
87
63
|
|
88
64
|
top_stmts: none
|
@@ -94,14 +70,6 @@ rule
|
|
94
70
|
| error top_stmt
|
95
71
|
|
96
72
|
top_stmt: stmt
|
97
|
-
{
|
98
|
-
result = val[0]
|
99
|
-
|
100
|
-
# TODO: remove once I have more confidence this is fixed
|
101
|
-
# result.each_of_type :call_args do |s|
|
102
|
-
# debug20 666, s, result
|
103
|
-
# end
|
104
|
-
}
|
105
73
|
| klBEGIN
|
106
74
|
{
|
107
75
|
if (self.in_def || self.in_single > 0) then
|
@@ -112,14 +80,19 @@ rule
|
|
112
80
|
}
|
113
81
|
begin_block
|
114
82
|
{
|
115
|
-
_, _,
|
116
|
-
|
83
|
+
(_, lineno), _, iter = val
|
84
|
+
iter.line lineno
|
85
|
+
|
86
|
+
(_, preexe,) = iter
|
87
|
+
preexe.line lineno
|
88
|
+
|
89
|
+
result = iter
|
117
90
|
}
|
118
91
|
|
119
|
-
begin_block: tLCURLY top_compstmt tRCURLY
|
92
|
+
begin_block: tLCURLY { result = lexer.lineno } top_compstmt tRCURLY
|
120
93
|
{
|
121
|
-
_, stmt, _ = val
|
122
|
-
result = new_iter s(:preexe), 0, stmt
|
94
|
+
_, line, stmt, _ = val
|
95
|
+
result = new_iter s(:preexe).line(line), 0, stmt
|
123
96
|
}
|
124
97
|
|
125
98
|
bodystmt: compstmt opt_rescue k_else
|
@@ -161,34 +134,27 @@ rule
|
|
161
134
|
stmt_or_begin: stmt
|
162
135
|
| klBEGIN
|
163
136
|
{
|
164
|
-
|
165
|
-
debug20 1
|
166
|
-
yyerror "BEGIN in method"
|
167
|
-
end
|
168
|
-
self.env.extend
|
169
|
-
}
|
170
|
-
begin_block
|
171
|
-
{
|
172
|
-
_, _, stmt = val
|
173
|
-
result = stmt
|
137
|
+
yyerror "BEGIN is permitted only at toplevel"
|
174
138
|
}
|
175
139
|
|
176
140
|
stmt: kALIAS fitem
|
177
141
|
{
|
178
142
|
lexer.lex_state = EXPR_FNAME
|
179
|
-
result = self.lexer.lineno
|
180
143
|
}
|
181
144
|
fitem
|
182
145
|
{
|
183
|
-
|
146
|
+
(_, line), lhs, _, rhs = val
|
147
|
+
result = s(:alias, lhs, rhs).line(line).line line
|
184
148
|
}
|
185
149
|
| kALIAS tGVAR tGVAR
|
186
150
|
{
|
187
|
-
|
151
|
+
(_, line), lhs, rhs = val
|
152
|
+
result = s(:valias, lhs.to_sym, rhs.to_sym).line line
|
188
153
|
}
|
189
154
|
| kALIAS tGVAR tBACK_REF
|
190
155
|
{
|
191
|
-
|
156
|
+
(_, line), lhs, rhs = val
|
157
|
+
result = s(:valias, lhs.to_sym, :"$#{rhs}").line line
|
192
158
|
}
|
193
159
|
| kALIAS tGVAR tNTH_REF
|
194
160
|
{
|
@@ -200,32 +166,41 @@ rule
|
|
200
166
|
}
|
201
167
|
| stmt kIF_MOD expr_value
|
202
168
|
{
|
203
|
-
|
169
|
+
t, _, c = val
|
170
|
+
result = new_if c, t, nil
|
204
171
|
}
|
205
172
|
| stmt kUNLESS_MOD expr_value
|
206
173
|
{
|
207
|
-
|
174
|
+
f, _, c = val
|
175
|
+
result = new_if c, nil, f
|
208
176
|
}
|
209
177
|
| stmt kWHILE_MOD expr_value
|
210
178
|
{
|
211
|
-
|
179
|
+
e, _, c = val
|
180
|
+
result = new_while e, c, true
|
212
181
|
}
|
213
182
|
| stmt kUNTIL_MOD expr_value
|
214
183
|
{
|
215
|
-
|
184
|
+
e, _, c = val
|
185
|
+
result = new_until e, c, true
|
216
186
|
}
|
217
187
|
| stmt kRESCUE_MOD stmt
|
218
188
|
{
|
219
189
|
body, _, resbody = val
|
220
|
-
|
190
|
+
|
191
|
+
resbody = new_resbody s(:array).line(resbody.line), resbody
|
192
|
+
result = new_rescue body, resbody
|
221
193
|
}
|
222
194
|
| klEND tLCURLY compstmt tRCURLY
|
223
195
|
{
|
196
|
+
(_, line), _, stmt, _ = val
|
197
|
+
|
224
198
|
if (self.in_def || self.in_single > 0) then
|
225
199
|
debug20 3
|
226
200
|
yyerror "END in method; use at_exit"
|
227
201
|
end
|
228
|
-
|
202
|
+
|
203
|
+
result = new_iter s(:postexe).line(line), 0, stmt
|
229
204
|
}
|
230
205
|
| command_asgn
|
231
206
|
| mlhs tEQL command_call
|
@@ -234,17 +209,14 @@ rule
|
|
234
209
|
}
|
235
210
|
| lhs tEQL mrhs
|
236
211
|
{
|
237
|
-
|
212
|
+
lhs, _, rhs = val
|
213
|
+
result = new_assign lhs, s(:svalue, rhs).line(rhs.line)
|
238
214
|
}
|
239
|
-
#if V == 20
|
240
215
|
| mlhs tEQL arg_value
|
241
216
|
{
|
242
217
|
result = new_masgn val[0], val[2], :wrap
|
243
218
|
}
|
244
219
|
| mlhs tEQL mrhs
|
245
|
-
#else
|
246
|
-
| mlhs tEQL mrhs_arg
|
247
|
-
#endif
|
248
220
|
{
|
249
221
|
result = new_masgn val[0], val[2]
|
250
222
|
}
|
@@ -264,11 +236,12 @@ rule
|
|
264
236
|
}
|
265
237
|
| primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_rhs
|
266
238
|
{
|
267
|
-
result =
|
239
|
+
result = new_op_asgn1 val
|
268
240
|
}
|
269
241
|
| primary_value call_op tIDENTIFIER tOP_ASGN command_rhs
|
270
242
|
{
|
271
|
-
|
243
|
+
prim, _, id, opasgn, rhs = val
|
244
|
+
result = s(:op_asgn, prim, rhs, id.to_sym, opasgn.to_sym)
|
272
245
|
if val[1] == '&.'
|
273
246
|
result.sexp_type = :safe_op_asgn
|
274
247
|
end
|
@@ -284,13 +257,15 @@ rule
|
|
284
257
|
}
|
285
258
|
| primary_value tCOLON2 tCONSTANT tOP_ASGN command_rhs
|
286
259
|
{
|
287
|
-
|
288
|
-
|
260
|
+
lhs1, _, lhs2, op, rhs = val
|
261
|
+
|
262
|
+
result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, op.to_sym)
|
289
263
|
}
|
290
264
|
| primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_rhs
|
291
265
|
{
|
292
|
-
|
293
|
-
|
266
|
+
lhs1, _, lhs2, op, rhs = val
|
267
|
+
|
268
|
+
result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, op.to_sym)
|
294
269
|
}
|
295
270
|
| backref tOP_ASGN command_rhs
|
296
271
|
{
|
@@ -302,32 +277,31 @@ rule
|
|
302
277
|
expr, = val
|
303
278
|
result = value_expr expr
|
304
279
|
}
|
305
|
-
#if V >= 24
|
306
|
-
| command_call kRESCUE_MOD stmt
|
307
|
-
{
|
308
|
-
expr, _, resbody = val
|
309
|
-
expr = value_expr expr
|
310
|
-
result = new_rescue(expr, new_resbody(s(:array), resbody))
|
311
|
-
}
|
312
|
-
#endif
|
313
280
|
| command_asgn
|
314
281
|
|
315
282
|
expr: command_call
|
316
283
|
| expr kAND expr
|
317
284
|
{
|
318
|
-
|
285
|
+
lhs, _, rhs = val
|
286
|
+
result = logical_op :and, lhs, rhs
|
319
287
|
}
|
320
288
|
| expr kOR expr
|
321
289
|
{
|
322
|
-
|
290
|
+
lhs, _, rhs = val
|
291
|
+
result = logical_op :or, lhs, rhs
|
323
292
|
}
|
324
293
|
| kNOT opt_nl expr
|
325
294
|
{
|
326
|
-
|
295
|
+
(_, line), _, expr = val
|
296
|
+
result = new_call(expr, :"!").line line
|
297
|
+
# REFACTOR: call_uni_op
|
327
298
|
}
|
328
299
|
| tBANG command_call
|
329
300
|
{
|
330
|
-
|
301
|
+
_, cmd = val
|
302
|
+
result = new_call(cmd, :"!").line cmd.line
|
303
|
+
# TODO: fix line number to tBANG... but causes BAD shift/reduce conflict
|
304
|
+
# REFACTOR: call_uni_op -- see parse26.y
|
331
305
|
}
|
332
306
|
| arg
|
333
307
|
|
@@ -354,7 +328,8 @@ rule
|
|
354
328
|
block_command: block_call
|
355
329
|
| block_call call_op2 operation2 command_args
|
356
330
|
{
|
357
|
-
|
331
|
+
blk, _, msg, args = val
|
332
|
+
result = new_call(blk, msg.to_sym, args).line blk.line
|
358
333
|
}
|
359
334
|
|
360
335
|
cmd_brace_block: tLBRACE_ARG
|
@@ -374,26 +349,32 @@ rule
|
|
374
349
|
|
375
350
|
fcall: operation
|
376
351
|
{
|
377
|
-
|
352
|
+
msg, = val
|
353
|
+
result = new_call(nil, msg.to_sym).line lexer.lineno
|
378
354
|
}
|
379
355
|
|
380
356
|
command: fcall command_args =tLOWEST
|
381
357
|
{
|
382
|
-
|
358
|
+
call, args = val
|
359
|
+
result = call.concat args.sexp_body
|
383
360
|
}
|
384
361
|
| fcall command_args cmd_brace_block
|
385
362
|
{
|
386
|
-
|
387
|
-
if val[2] then
|
388
|
-
block_dup_check result, val[2]
|
363
|
+
call, args, block = val
|
389
364
|
|
390
|
-
|
365
|
+
result = call.concat args.sexp_body
|
366
|
+
|
367
|
+
if block then
|
368
|
+
block_dup_check result, block
|
369
|
+
|
370
|
+
result, operation = block, result
|
391
371
|
result.insert 1, operation
|
392
372
|
end
|
393
373
|
}
|
394
374
|
| primary_value call_op operation2 command_args =tLOWEST
|
395
375
|
{
|
396
|
-
|
376
|
+
lhs, callop, op, args = val
|
377
|
+
result = new_call lhs, op.to_sym, args, callop
|
397
378
|
}
|
398
379
|
| primary_value call_op operation2 command_args cmd_brace_block
|
399
380
|
{
|
@@ -425,7 +406,9 @@ rule
|
|
425
406
|
}
|
426
407
|
| kYIELD command_args
|
427
408
|
{
|
428
|
-
|
409
|
+
(_, line), args = val
|
410
|
+
result = new_yield args
|
411
|
+
result.line line # TODO: push to new_yield
|
429
412
|
}
|
430
413
|
| k_return call_args
|
431
414
|
{
|
@@ -434,8 +417,8 @@ rule
|
|
434
417
|
}
|
435
418
|
| kBREAK call_args
|
436
419
|
{
|
437
|
-
line = val
|
438
|
-
result = s(:break, ret_args(
|
420
|
+
(_, line), args = val
|
421
|
+
result = s(:break, ret_args(args)).line line
|
439
422
|
}
|
440
423
|
| kNEXT call_args
|
441
424
|
{
|
@@ -452,56 +435,79 @@ rule
|
|
452
435
|
mlhs_inner: mlhs_basic
|
453
436
|
| tLPAREN mlhs_inner rparen
|
454
437
|
{
|
455
|
-
|
438
|
+
_, arg, _ = val
|
439
|
+
l = arg.line
|
440
|
+
|
441
|
+
result = s(:masgn, s(:array, arg).line(l)).line l
|
456
442
|
}
|
457
443
|
|
458
444
|
mlhs_basic: mlhs_head
|
459
445
|
{
|
460
|
-
|
446
|
+
head, = val
|
447
|
+
result = s(:masgn, head).line head.line
|
461
448
|
}
|
462
449
|
| mlhs_head mlhs_item
|
463
450
|
{
|
464
|
-
|
451
|
+
lhs, rhs = val
|
452
|
+
result = s(:masgn, lhs << rhs.compact).line lhs.line
|
465
453
|
}
|
466
454
|
| mlhs_head tSTAR mlhs_node
|
467
455
|
{
|
468
|
-
|
456
|
+
head, _, tail = val
|
457
|
+
head << s(:splat, tail).line(tail.line)
|
458
|
+
result = s(:masgn, head).line head.line
|
469
459
|
}
|
470
460
|
| mlhs_head tSTAR mlhs_node tCOMMA mlhs_post
|
471
461
|
{
|
472
462
|
ary1, _, splat, _, ary2 = val
|
473
463
|
|
474
|
-
result = list_append ary1, s(:splat, splat)
|
464
|
+
result = list_append ary1, s(:splat, splat).line(splat.line)
|
475
465
|
result.concat ary2.sexp_body
|
476
|
-
result = s(:masgn, result)
|
466
|
+
result = s(:masgn, result).line result.line
|
477
467
|
}
|
478
468
|
| mlhs_head tSTAR
|
479
469
|
{
|
480
|
-
|
470
|
+
head, _ = val
|
471
|
+
l = head.line
|
472
|
+
result = s(:masgn, head << s(:splat).line(l)).line l
|
481
473
|
}
|
482
474
|
| mlhs_head tSTAR tCOMMA mlhs_post
|
483
475
|
{
|
484
|
-
|
485
|
-
ary
|
486
|
-
|
476
|
+
head, _, _, post = val
|
477
|
+
ary = list_append head, s(:splat).line(head.line)
|
478
|
+
ary.concat post.sexp_body
|
479
|
+
result = s(:masgn, ary).line ary.line
|
487
480
|
}
|
488
481
|
| tSTAR mlhs_node
|
489
482
|
{
|
490
|
-
|
483
|
+
_, node = val
|
484
|
+
l = node.line
|
485
|
+
splat = s(:splat, node).line l
|
486
|
+
ary = s(:array, splat).line l
|
487
|
+
result = s(:masgn, ary).line l
|
491
488
|
}
|
492
489
|
| tSTAR mlhs_node tCOMMA mlhs_post
|
493
490
|
{
|
494
|
-
|
495
|
-
|
496
|
-
|
491
|
+
_, node, _, post = val
|
492
|
+
|
493
|
+
splat = s(:splat, node).line node.line
|
494
|
+
ary = s(:array, splat).line splat.line
|
495
|
+
ary.concat post.sexp_body
|
496
|
+
result = s(:masgn, ary).line ary.line
|
497
497
|
}
|
498
498
|
| tSTAR
|
499
499
|
{
|
500
|
-
|
500
|
+
l = lexer.lineno
|
501
|
+
result = s(:masgn, s(:array, s(:splat).line(l)).line(l)).line l
|
501
502
|
}
|
502
503
|
| tSTAR tCOMMA mlhs_post
|
503
504
|
{
|
504
|
-
|
505
|
+
_, _, post = val
|
506
|
+
l = post.line
|
507
|
+
|
508
|
+
splat = s(:splat).line l
|
509
|
+
ary = s(:array, splat, *post.sexp_body).line l
|
510
|
+
result = s(:masgn, ary).line l
|
505
511
|
}
|
506
512
|
|
507
513
|
mlhs_item: mlhs_node
|
@@ -512,7 +518,8 @@ rule
|
|
512
518
|
|
513
519
|
mlhs_head: mlhs_item tCOMMA
|
514
520
|
{
|
515
|
-
|
521
|
+
lhs, _ = val
|
522
|
+
result = s(:array, lhs).line lhs.line
|
516
523
|
}
|
517
524
|
| mlhs_head mlhs_item tCOMMA
|
518
525
|
{
|
@@ -521,7 +528,8 @@ rule
|
|
521
528
|
|
522
529
|
mlhs_post: mlhs_item
|
523
530
|
{
|
524
|
-
|
531
|
+
item, = val
|
532
|
+
result = s(:array, item).line item.line
|
525
533
|
}
|
526
534
|
| mlhs_post tCOMMA mlhs_item
|
527
535
|
{
|
@@ -546,7 +554,8 @@ rule
|
|
546
554
|
}
|
547
555
|
| primary_value tCOLON2 tIDENTIFIER
|
548
556
|
{
|
549
|
-
|
557
|
+
recv, _, id = val
|
558
|
+
result = new_attrasgn recv, id
|
550
559
|
}
|
551
560
|
| primary_value call_op tCONSTANT
|
552
561
|
{
|
@@ -559,7 +568,10 @@ rule
|
|
559
568
|
yyerror "dynamic constant assignment"
|
560
569
|
end
|
561
570
|
|
562
|
-
|
571
|
+
expr, _, id = val
|
572
|
+
l = expr.line
|
573
|
+
|
574
|
+
result = s(:const, s(:colon2, expr, id.to_sym).line(l), nil).line l
|
563
575
|
}
|
564
576
|
| tCOLON3 tCONSTANT
|
565
577
|
{
|
@@ -568,7 +580,10 @@ rule
|
|
568
580
|
yyerror "dynamic constant assignment"
|
569
581
|
end
|
570
582
|
|
571
|
-
|
583
|
+
_, id = val
|
584
|
+
l = lexer.lineno
|
585
|
+
|
586
|
+
result = s(:const, nil, s(:colon3, id.to_sym).line(l)).line l
|
572
587
|
}
|
573
588
|
| backref
|
574
589
|
{
|
@@ -577,24 +592,31 @@ rule
|
|
577
592
|
|
578
593
|
lhs: user_variable
|
579
594
|
{
|
595
|
+
line = lexer.lineno
|
580
596
|
result = self.assignable val[0]
|
597
|
+
result.line = line
|
581
598
|
}
|
582
599
|
| keyword_variable
|
583
600
|
{
|
601
|
+
line = lexer.lineno
|
584
602
|
result = self.assignable val[0]
|
603
|
+
result.line = line
|
585
604
|
debug20 9, val, result
|
586
605
|
}
|
587
606
|
| primary_value tLBRACK2 opt_call_args rbracket
|
588
607
|
{
|
589
|
-
|
608
|
+
lhs, _, args, _ = val
|
609
|
+
result = self.aryset lhs, args
|
590
610
|
}
|
591
611
|
| primary_value call_op tIDENTIFIER # REFACTOR
|
592
612
|
{
|
593
|
-
|
613
|
+
lhs, op, id = val
|
614
|
+
result = new_attrasgn lhs, id, op
|
594
615
|
}
|
595
616
|
| primary_value tCOLON2 tIDENTIFIER
|
596
617
|
{
|
597
|
-
|
618
|
+
lhs, _, id = val
|
619
|
+
result = new_attrasgn lhs, id
|
598
620
|
}
|
599
621
|
| primary_value call_op tCONSTANT # REFACTOR?
|
600
622
|
{
|
@@ -602,21 +624,27 @@ rule
|
|
602
624
|
}
|
603
625
|
| primary_value tCOLON2 tCONSTANT
|
604
626
|
{
|
627
|
+
expr, _, id = val
|
628
|
+
|
605
629
|
if (self.in_def || self.in_single > 0) then
|
606
630
|
debug20 10
|
607
631
|
yyerror "dynamic constant assignment"
|
608
632
|
end
|
609
633
|
|
610
|
-
|
634
|
+
l = expr.line
|
635
|
+
result = s(:const, s(:colon2, expr, id.to_sym).line(l)).line l
|
611
636
|
}
|
612
637
|
| tCOLON3 tCONSTANT
|
613
638
|
{
|
639
|
+
_, id = val
|
640
|
+
|
614
641
|
if (self.in_def || self.in_single > 0) then
|
615
642
|
debug20 11
|
616
643
|
yyerror "dynamic constant assignment"
|
617
644
|
end
|
618
645
|
|
619
|
-
|
646
|
+
l = lexer.lineno
|
647
|
+
result = s(:const, s(:colon3, id.to_sym).line(l)).line l
|
620
648
|
}
|
621
649
|
| backref
|
622
650
|
{
|
@@ -631,7 +659,8 @@ rule
|
|
631
659
|
|
632
660
|
cpath: tCOLON3 cname
|
633
661
|
{
|
634
|
-
|
662
|
+
_, name = val
|
663
|
+
result = s(:colon3, name.to_sym).line lexer.lineno
|
635
664
|
}
|
636
665
|
| cname
|
637
666
|
{
|
@@ -639,7 +668,10 @@ rule
|
|
639
668
|
}
|
640
669
|
| primary_value tCOLON2 cname
|
641
670
|
{
|
642
|
-
|
671
|
+
pval, _, name = val
|
672
|
+
|
673
|
+
result = s(:colon2, pval, name.to_sym)
|
674
|
+
result.line pval.line
|
643
675
|
}
|
644
676
|
|
645
677
|
fname: tIDENTIFIER | tCONSTANT | tFID
|
@@ -660,7 +692,8 @@ rule
|
|
660
692
|
|
661
693
|
fitem: fsym
|
662
694
|
{
|
663
|
-
|
695
|
+
id, = val
|
696
|
+
result = s(:lit, id.to_sym).line lexer.lineno
|
664
697
|
}
|
665
698
|
| dsym
|
666
699
|
|
@@ -683,9 +716,8 @@ rule
|
|
683
716
|
| tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2
|
684
717
|
| tSTAR | tDIVIDE | tPERCENT | tPOW | tDSTAR | tBANG | tTILDE
|
685
718
|
| tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2
|
686
|
-
#
|
719
|
+
# TODO: tUBANG dead?
|
687
720
|
| tUBANG
|
688
|
-
#endif
|
689
721
|
|
690
722
|
reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND
|
691
723
|
| kALIAS | kAND | kBEGIN | kBREAK | kCASE
|
@@ -707,8 +739,7 @@ rule
|
|
707
739
|
}
|
708
740
|
| primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg_rhs
|
709
741
|
{
|
710
|
-
|
711
|
-
result = s(:op_asgn1, val[0], val[2], val[4].to_sym, val[5])
|
742
|
+
result = new_op_asgn1 val
|
712
743
|
}
|
713
744
|
| primary_value call_op tIDENTIFIER tOP_ASGN arg_rhs
|
714
745
|
{
|
@@ -720,7 +751,9 @@ rule
|
|
720
751
|
}
|
721
752
|
| primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg_rhs
|
722
753
|
{
|
723
|
-
|
754
|
+
lhs, _, id, op, rhs = val
|
755
|
+
|
756
|
+
result = s(:op_asgn, lhs, rhs, id.to_sym, op.to_sym).line lhs.line
|
724
757
|
}
|
725
758
|
| primary_value tCOLON2 tCONSTANT tOP_ASGN arg_rhs
|
726
759
|
{
|
@@ -750,34 +783,20 @@ rule
|
|
750
783
|
{
|
751
784
|
v1, v2 = val[0], val[2]
|
752
785
|
if v1.node_type == :lit and v2.node_type == :lit and Integer === v1.last and Integer === v2.last then
|
753
|
-
result = s(:lit, (v1.last)..(v2.last))
|
786
|
+
result = s(:lit, (v1.last)..(v2.last)).line v1.line
|
754
787
|
else
|
755
|
-
result = s(:dot2, v1, v2)
|
788
|
+
result = s(:dot2, v1, v2).line v1.line
|
756
789
|
end
|
757
790
|
}
|
758
791
|
| arg tDOT3 arg
|
759
792
|
{
|
760
793
|
v1, v2 = val[0], val[2]
|
761
794
|
if v1.node_type == :lit and v2.node_type == :lit and Integer === v1.last and Integer === v2.last then
|
762
|
-
result = s(:lit, (v1.last)...(v2.last))
|
795
|
+
result = s(:lit, (v1.last)...(v2.last)).line v1.line
|
763
796
|
else
|
764
|
-
result = s(:dot3, v1, v2)
|
797
|
+
result = s(:dot3, v1, v2).line v1.line
|
765
798
|
end
|
766
799
|
}
|
767
|
-
#if V >= 26
|
768
|
-
| arg tDOT2
|
769
|
-
{
|
770
|
-
v1, v2 = val[0], nil
|
771
|
-
|
772
|
-
result = s(:dot2, v1, v2)
|
773
|
-
}
|
774
|
-
| arg tDOT3
|
775
|
-
{
|
776
|
-
v1, v2 = val[0], nil
|
777
|
-
|
778
|
-
result = s(:dot3, v1, v2)
|
779
|
-
}
|
780
|
-
#endif
|
781
800
|
| arg tPLUS arg
|
782
801
|
{
|
783
802
|
result = new_call val[0], :+, argl(val[2])
|
@@ -802,21 +821,18 @@ rule
|
|
802
821
|
{
|
803
822
|
result = new_call val[0], :**, argl(val[2])
|
804
823
|
}
|
805
|
-
#if V == 20
|
806
824
|
| tUMINUS_NUM tINTEGER tPOW arg
|
807
825
|
{
|
808
|
-
|
826
|
+
lit = s(:lit, val[1]).line lexer.lineno
|
827
|
+
result = new_call(new_call(lit, :"**", argl(val[3])), :"-@")
|
809
828
|
}
|
810
829
|
| tUMINUS_NUM tFLOAT tPOW arg
|
811
|
-
#else
|
812
|
-
| tUMINUS_NUM simple_numeric tPOW arg
|
813
|
-
#endif
|
814
830
|
{
|
815
|
-
|
816
|
-
|
831
|
+
lit = s(:lit, val[1]).line lexer.lineno
|
832
|
+
result = new_call(new_call(lit, :"**", argl(val[3])), :"-@")
|
833
|
+
|
817
834
|
## TODO: why is this 2.0 only?
|
818
835
|
debug20 12, val, result
|
819
|
-
#endif
|
820
836
|
}
|
821
837
|
| tUPLUS arg
|
822
838
|
{
|
@@ -857,15 +873,19 @@ rule
|
|
857
873
|
}
|
858
874
|
| arg tMATCH arg
|
859
875
|
{
|
860
|
-
|
876
|
+
lhs, _, rhs = val
|
877
|
+
result = new_match lhs, rhs
|
861
878
|
}
|
862
879
|
| arg tNMATCH arg
|
863
880
|
{
|
864
|
-
|
881
|
+
lhs, _, rhs = val
|
882
|
+
result = s(:not, new_match(lhs, rhs)).line lhs.line
|
865
883
|
}
|
866
884
|
| tBANG arg
|
867
885
|
{
|
868
|
-
|
886
|
+
_, arg = val
|
887
|
+
result = new_call arg, :"!"
|
888
|
+
result.line arg.line
|
869
889
|
}
|
870
890
|
| tTILDE arg
|
871
891
|
{
|
@@ -893,11 +913,13 @@ rule
|
|
893
913
|
}
|
894
914
|
| kDEFINED opt_nl arg
|
895
915
|
{
|
896
|
-
|
916
|
+
(_, line), _, arg = val
|
917
|
+
result = s(:defined, arg).line line
|
897
918
|
}
|
898
919
|
| arg tEH arg opt_nl tCOLON arg
|
899
920
|
{
|
900
|
-
|
921
|
+
c, _, t, _, _, f = val
|
922
|
+
result = s(:if, c, t, f).line c.line
|
901
923
|
}
|
902
924
|
| primary
|
903
925
|
|
@@ -940,28 +962,25 @@ rule
|
|
940
962
|
arg_rhs: arg =tOP_ASGN
|
941
963
|
| arg kRESCUE_MOD arg
|
942
964
|
{
|
943
|
-
body, _, resbody = val
|
965
|
+
body, (_, line), resbody = val
|
944
966
|
body = value_expr body
|
945
967
|
resbody = remove_begin resbody
|
946
|
-
|
968
|
+
|
969
|
+
ary = s(:array).line line
|
970
|
+
result = new_rescue(body, new_resbody(ary, resbody))
|
947
971
|
}
|
948
972
|
|
949
973
|
paren_args: tLPAREN2 opt_call_args rparen
|
950
974
|
{
|
951
|
-
|
975
|
+
_, args, _ = val
|
976
|
+
result = args
|
952
977
|
}
|
953
978
|
|
954
979
|
opt_paren_args: none
|
955
980
|
| paren_args
|
956
981
|
|
957
982
|
opt_call_args: none
|
958
|
-
{
|
959
|
-
result = val[0]
|
960
|
-
}
|
961
983
|
| call_args
|
962
|
-
{
|
963
|
-
result = val[0]
|
964
|
-
}
|
965
984
|
| args tCOMMA
|
966
985
|
{
|
967
986
|
result = args val
|
@@ -983,17 +1002,14 @@ rule
|
|
983
1002
|
| args opt_block_arg
|
984
1003
|
{
|
985
1004
|
result = call_args val
|
986
|
-
result = self.arg_blk_pass val[0], val[1]
|
987
1005
|
}
|
988
1006
|
| assocs opt_block_arg
|
989
1007
|
{
|
990
|
-
result = call_args [array_to_hash(val[0])]
|
991
|
-
result = self.arg_blk_pass result, val[1]
|
1008
|
+
result = call_args [array_to_hash(val[0]), val[1]]
|
992
1009
|
}
|
993
1010
|
| args tCOMMA assocs opt_block_arg
|
994
1011
|
{
|
995
|
-
result = call_args [val[0], array_to_hash(val[2])]
|
996
|
-
result = self.arg_blk_pass result, val[3]
|
1012
|
+
result = call_args [val[0], array_to_hash(val[2]), val[3]]
|
997
1013
|
}
|
998
1014
|
| block_arg
|
999
1015
|
{
|
@@ -1001,17 +1017,45 @@ rule
|
|
1001
1017
|
}
|
1002
1018
|
|
1003
1019
|
command_args: {
|
1004
|
-
|
1020
|
+
# parse26.y line 2200
|
1021
|
+
|
1022
|
+
# If call_args starts with a open paren '(' or
|
1023
|
+
# '[', look-ahead reading of the letters calls
|
1024
|
+
# CMDARG_PUSH(0), but the push must be done
|
1025
|
+
# after CMDARG_PUSH(1). So this code makes them
|
1026
|
+
# consistent by first cancelling the premature
|
1027
|
+
# CMDARG_PUSH(0), doing CMDARG_PUSH(1), and
|
1028
|
+
# finally redoing CMDARG_PUSH(0).
|
1029
|
+
|
1030
|
+
result = yychar = self.last_token_type.first
|
1031
|
+
lookahead = [:tLPAREN, :tLPAREN_ARG, :tLPAREN2, :tLBRACK, :tLBRACK2].include?(yychar)
|
1032
|
+
lexer.cmdarg.pop if lookahead
|
1033
|
+
lexer.cmdarg.push true
|
1034
|
+
lexer.cmdarg.push false if lookahead
|
1005
1035
|
}
|
1006
1036
|
call_args
|
1007
1037
|
{
|
1008
|
-
|
1009
|
-
|
1038
|
+
yychar, args = val
|
1039
|
+
|
1040
|
+
# call_args can be followed by tLBRACE_ARG (that
|
1041
|
+
# does CMDARG_PUSH(0) in the lexer) but the push
|
1042
|
+
# must be done after CMDARG_POP() in the parser.
|
1043
|
+
# So this code does CMDARG_POP() to pop 0 pushed
|
1044
|
+
# by tLBRACE_ARG, CMDARG_POP() to pop 1 pushed
|
1045
|
+
# by command_args, and CMDARG_PUSH(0) to restore
|
1046
|
+
# back the flag set by tLBRACE_ARG.
|
1047
|
+
|
1048
|
+
lookahead = [:tLBRACE_ARG].include?(yychar)
|
1049
|
+
lexer.cmdarg.pop if lookahead
|
1050
|
+
lexer.cmdarg.pop
|
1051
|
+
lexer.cmdarg.push false if lookahead
|
1052
|
+
result = args
|
1010
1053
|
}
|
1011
1054
|
|
1012
1055
|
block_arg: tAMPER arg_value
|
1013
1056
|
{
|
1014
|
-
|
1057
|
+
_, arg = val
|
1058
|
+
result = s(:block_pass, arg).line arg.line
|
1015
1059
|
}
|
1016
1060
|
|
1017
1061
|
opt_block_arg: tCOMMA block_arg
|
@@ -1022,43 +1066,43 @@ rule
|
|
1022
1066
|
|
1023
1067
|
args: arg_value
|
1024
1068
|
{
|
1025
|
-
|
1069
|
+
arg, = val
|
1070
|
+
lineno = arg.line || lexer.lineno # HACK
|
1071
|
+
|
1072
|
+
result = s(:array, arg).line lineno
|
1026
1073
|
}
|
1027
1074
|
| tSTAR arg_value
|
1028
1075
|
{
|
1029
|
-
|
1076
|
+
_, arg = val
|
1077
|
+
result = s(:array, s(:splat, arg).line(arg.line)).line arg.line
|
1030
1078
|
}
|
1031
1079
|
| args tCOMMA arg_value
|
1032
1080
|
{
|
1033
|
-
|
1081
|
+
args, _, id = val
|
1082
|
+
result = self.list_append args, id
|
1034
1083
|
}
|
1035
1084
|
| args tCOMMA tSTAR arg_value
|
1036
1085
|
{
|
1037
|
-
|
1086
|
+
# TODO: the line number from tSTAR has been dropped
|
1087
|
+
args, _, _, id = val
|
1088
|
+
line = lexer.lineno
|
1089
|
+
result = self.list_append args, s(:splat, id).line(line)
|
1038
1090
|
}
|
1039
1091
|
|
1040
|
-
#if V >= 21
|
1041
|
-
mrhs_arg: mrhs
|
1042
|
-
{
|
1043
|
-
result = new_masgn_arg val[0]
|
1044
|
-
}
|
1045
|
-
| arg_value
|
1046
|
-
{
|
1047
|
-
result = new_masgn_arg val[0], :wrap
|
1048
|
-
}
|
1049
|
-
|
1050
|
-
#endif
|
1051
1092
|
mrhs: args tCOMMA arg_value
|
1052
1093
|
{
|
1053
1094
|
result = val[0] << val[2]
|
1054
1095
|
}
|
1055
1096
|
| args tCOMMA tSTAR arg_value
|
1056
1097
|
{
|
1057
|
-
|
1098
|
+
# TODO: make all tXXXX terminals include lexer.lineno
|
1099
|
+
arg, _, _, splat = val
|
1100
|
+
result = self.arg_concat arg, splat
|
1058
1101
|
}
|
1059
1102
|
| tSTAR arg_value
|
1060
1103
|
{
|
1061
|
-
|
1104
|
+
_, arg = val
|
1105
|
+
result = s(:splat, arg).line arg.line
|
1062
1106
|
}
|
1063
1107
|
|
1064
1108
|
primary: literal
|
@@ -1073,65 +1117,65 @@ rule
|
|
1073
1117
|
| backref
|
1074
1118
|
| tFID
|
1075
1119
|
{
|
1076
|
-
|
1120
|
+
msg, = val
|
1121
|
+
result = new_call nil, msg.to_sym
|
1077
1122
|
}
|
1078
1123
|
| k_begin
|
1079
1124
|
{
|
1125
|
+
lexer.cmdarg.push false
|
1080
1126
|
result = self.lexer.lineno
|
1081
|
-
# TODO:
|
1082
|
-
# $<val>1 = cmdarg_stack;
|
1083
|
-
# CMDARG_SET(0);
|
1084
1127
|
}
|
1085
1128
|
bodystmt k_end
|
1086
1129
|
{
|
1087
|
-
|
1088
|
-
|
1089
|
-
result = s(:nil)
|
1090
|
-
else
|
1091
|
-
result = s(:begin, val[2])
|
1092
|
-
end
|
1093
|
-
|
1094
|
-
result.line = val[1]
|
1130
|
+
lexer.cmdarg.pop
|
1131
|
+
result = new_begin val
|
1095
1132
|
}
|
1096
|
-
| tLPAREN_ARG
|
1133
|
+
| tLPAREN_ARG
|
1097
1134
|
{
|
1098
|
-
|
1099
|
-
|
1135
|
+
lexer.lex_state = EXPR_ENDARG
|
1136
|
+
result = lexer.lineno
|
1100
1137
|
}
|
1101
|
-
|
1138
|
+
rparen
|
1102
1139
|
{
|
1103
|
-
|
1104
|
-
|
1105
|
-
# lexer.cmdarg.stack.replace [false] # TODO add api for these
|
1140
|
+
_, line, _ = val
|
1141
|
+
result = s(:begin).line line
|
1106
1142
|
}
|
1143
|
+
| tLPAREN_ARG
|
1107
1144
|
stmt
|
1108
1145
|
{
|
1109
1146
|
lexer.lex_state = EXPR_ENDARG
|
1110
1147
|
}
|
1111
1148
|
rparen
|
1112
1149
|
{
|
1113
|
-
_,
|
1114
|
-
warning "(...) interpreted as grouped expression"
|
1115
|
-
lexer.cmdarg.restore cmdarg
|
1150
|
+
_, stmt, _, _, = val
|
1151
|
+
# warning "(...) interpreted as grouped expression"
|
1116
1152
|
result = stmt
|
1117
1153
|
}
|
1118
1154
|
| tLPAREN compstmt tRPAREN
|
1119
1155
|
{
|
1120
|
-
|
1156
|
+
_, stmt, _ = val
|
1157
|
+
result = stmt
|
1158
|
+
result ||= s(:nil).line lexer.lineno
|
1121
1159
|
result.paren = true
|
1122
1160
|
}
|
1123
1161
|
| primary_value tCOLON2 tCONSTANT
|
1124
1162
|
{
|
1125
|
-
|
1163
|
+
expr, _, id = val
|
1164
|
+
|
1165
|
+
result = s(:colon2, expr, id.to_sym).line expr.line
|
1126
1166
|
}
|
1127
1167
|
| tCOLON3 tCONSTANT
|
1128
1168
|
{
|
1129
|
-
|
1169
|
+
_, id = val
|
1170
|
+
|
1171
|
+
result = s(:colon3, id.to_sym).line lexer.lineno
|
1130
1172
|
}
|
1131
|
-
| tLBRACK aref_args tRBRACK
|
1173
|
+
| tLBRACK { result = lexer.lineno } aref_args tRBRACK
|
1132
1174
|
{
|
1133
|
-
|
1175
|
+
_, line, args, _ = val
|
1176
|
+
result = args || s(:array)
|
1134
1177
|
result.sexp_type = :array # aref_args is :args
|
1178
|
+
result.line line
|
1135
1179
|
}
|
1136
1180
|
| tLBRACE
|
1137
1181
|
{
|
@@ -1143,7 +1187,8 @@ rule
|
|
1143
1187
|
}
|
1144
1188
|
| k_return
|
1145
1189
|
{
|
1146
|
-
|
1190
|
+
(_, line), = val
|
1191
|
+
result = s(:return).line line
|
1147
1192
|
}
|
1148
1193
|
| kYIELD tLPAREN2 call_args rparen
|
1149
1194
|
{
|
@@ -1159,11 +1204,14 @@ rule
|
|
1159
1204
|
}
|
1160
1205
|
| kDEFINED opt_nl tLPAREN2 expr rparen
|
1161
1206
|
{
|
1162
|
-
|
1207
|
+
(_, line), _, _, arg, _ = val
|
1208
|
+
|
1209
|
+
result = s(:defined, arg).line line
|
1163
1210
|
}
|
1164
1211
|
| kNOT tLPAREN2 expr rparen
|
1165
1212
|
{
|
1166
|
-
|
1213
|
+
_, _, lhs, _ = val
|
1214
|
+
result = new_call lhs, :"!"
|
1167
1215
|
}
|
1168
1216
|
| kNOT tLPAREN2 rparen
|
1169
1217
|
{
|
@@ -1171,11 +1219,11 @@ rule
|
|
1171
1219
|
}
|
1172
1220
|
| fcall brace_block
|
1173
1221
|
{
|
1174
|
-
|
1175
|
-
|
1222
|
+
call, iter = val
|
1223
|
+
|
1176
1224
|
iter.insert 1, call
|
1177
1225
|
result = iter
|
1178
|
-
call.line = iter.line
|
1226
|
+
# FIX: probably not: call.line = iter.line
|
1179
1227
|
}
|
1180
1228
|
| method_call
|
1181
1229
|
| method_call brace_block
|
@@ -1283,66 +1331,82 @@ rule
|
|
1283
1331
|
}
|
1284
1332
|
| k_def fname
|
1285
1333
|
{
|
1286
|
-
result =
|
1334
|
+
result = self.in_def
|
1287
1335
|
|
1288
|
-
self.
|
1289
|
-
self.in_def = true
|
1336
|
+
self.in_def = true # group = local_push
|
1290
1337
|
self.env.extend
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1338
|
+
lexer.cmdarg.push false
|
1339
|
+
lexer.cond.push false
|
1340
|
+
|
1341
|
+
self.comments.push self.lexer.comments
|
1294
1342
|
}
|
1295
|
-
f_arglist bodystmt k_end
|
1343
|
+
f_arglist bodystmt { result = lexer.lineno } k_end
|
1296
1344
|
{
|
1297
|
-
in_def
|
1345
|
+
in_def = val[2]
|
1298
1346
|
|
1299
1347
|
result = new_defn val
|
1300
1348
|
|
1301
|
-
lexer.
|
1349
|
+
lexer.cond.pop # group = local_pop
|
1350
|
+
lexer.cmdarg.pop
|
1302
1351
|
self.env.unextend
|
1303
1352
|
self.in_def = in_def
|
1353
|
+
|
1304
1354
|
self.lexer.comments # we don't care about comments in the body
|
1305
1355
|
}
|
1306
1356
|
| k_def singleton dot_or_colon
|
1307
1357
|
{
|
1308
|
-
self.comments.push self.lexer.comments
|
1309
1358
|
lexer.lex_state = EXPR_FNAME
|
1310
1359
|
}
|
1311
1360
|
fname
|
1312
1361
|
{
|
1313
|
-
self.
|
1362
|
+
result = [self.in_def, lexer.lineno]
|
1363
|
+
|
1364
|
+
self.in_single += 1 # TODO: remove?
|
1365
|
+
|
1366
|
+
self.in_def = true # local_push
|
1314
1367
|
self.env.extend
|
1315
|
-
lexer.
|
1316
|
-
|
1317
|
-
|
1368
|
+
lexer.cmdarg.push false
|
1369
|
+
lexer.cond.push false
|
1370
|
+
|
1371
|
+
lexer.lex_state = EXPR_ENDFN|EXPR_LABEL
|
1372
|
+
self.comments.push self.lexer.comments
|
1318
1373
|
}
|
1319
1374
|
f_arglist bodystmt k_end
|
1320
1375
|
{
|
1321
|
-
|
1322
|
-
result = new_defs val
|
1323
|
-
result[3].line line
|
1376
|
+
_, _recv, _, _, _name, (in_def, _lineno), _args, _body, _ = val
|
1324
1377
|
|
1325
|
-
|
1378
|
+
result = new_defs val
|
1326
1379
|
|
1380
|
+
lexer.cond.pop # group = local_pop
|
1381
|
+
lexer.cmdarg.pop
|
1327
1382
|
self.env.unextend
|
1383
|
+
self.in_def = in_def
|
1384
|
+
|
1328
1385
|
self.in_single -= 1
|
1386
|
+
|
1387
|
+
# TODO: restore cur_arg ? what's cur_arg?
|
1388
|
+
|
1329
1389
|
self.lexer.comments # we don't care about comments in the body
|
1330
1390
|
}
|
1331
1391
|
| kBREAK
|
1332
1392
|
{
|
1333
|
-
|
1393
|
+
(_, line), = val
|
1394
|
+
result = s(:break).line line
|
1334
1395
|
}
|
1335
1396
|
| kNEXT
|
1336
1397
|
{
|
1337
|
-
|
1398
|
+
(_, line), = val
|
1399
|
+
result = s(:next).line line
|
1338
1400
|
}
|
1339
1401
|
| kREDO
|
1340
1402
|
{
|
1341
|
-
|
1403
|
+
(_, line), = val
|
1404
|
+
result = s(:redo).line line
|
1342
1405
|
}
|
1343
1406
|
| kRETRY
|
1344
1407
|
{
|
1345
|
-
|
1408
|
+
(_, line), = val
|
1409
|
+
result = s(:retry).line line
|
1346
1410
|
}
|
1347
1411
|
|
1348
1412
|
primary_value: primary
|
@@ -1381,7 +1445,9 @@ rule
|
|
1381
1445
|
if_tail: opt_else
|
1382
1446
|
| k_elsif expr_value then compstmt if_tail
|
1383
1447
|
{
|
1384
|
-
|
1448
|
+
(_, line), c, _, t, rest = val
|
1449
|
+
|
1450
|
+
result = s(:if, c, t, rest).line line
|
1385
1451
|
}
|
1386
1452
|
|
1387
1453
|
opt_else: none
|
@@ -1404,7 +1470,9 @@ rule
|
|
1404
1470
|
|
1405
1471
|
f_marg_list: f_marg
|
1406
1472
|
{
|
1407
|
-
|
1473
|
+
sym, = val
|
1474
|
+
|
1475
|
+
result = s(:array, sym).line lexer.lineno
|
1408
1476
|
}
|
1409
1477
|
| f_marg_list tCOMMA f_marg
|
1410
1478
|
{
|
@@ -1478,7 +1546,9 @@ rule
|
|
1478
1546
|
}
|
1479
1547
|
| f_block_arg
|
1480
1548
|
{
|
1481
|
-
|
1549
|
+
line = lexer.lineno
|
1550
|
+
result = call_args val # TODO: push line down
|
1551
|
+
result.line line
|
1482
1552
|
}
|
1483
1553
|
|
1484
1554
|
opt_block_args_tail: tCOMMA block_args_tail
|
@@ -1509,7 +1579,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1509
1579
|
}
|
1510
1580
|
| f_arg tCOMMA
|
1511
1581
|
{
|
1512
|
-
result = args
|
1582
|
+
result = args(val) << nil
|
1513
1583
|
}
|
1514
1584
|
| f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail
|
1515
1585
|
{
|
@@ -1561,7 +1631,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1561
1631
|
}
|
1562
1632
|
| tOROP
|
1563
1633
|
{
|
1564
|
-
result = s(:args)
|
1634
|
+
result = s(:args).line lexer.lineno
|
1565
1635
|
}
|
1566
1636
|
| tPIPE block_param opt_bv_decl tPIPE
|
1567
1637
|
{
|
@@ -1586,34 +1656,33 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1586
1656
|
|
1587
1657
|
bvar: tIDENTIFIER
|
1588
1658
|
{
|
1589
|
-
|
1659
|
+
id, = val
|
1660
|
+
line = lexer.lineno
|
1661
|
+
result = s(:shadow, id.to_sym).line line
|
1590
1662
|
}
|
1591
1663
|
| f_bad_arg
|
1592
1664
|
|
1593
1665
|
lambda: {
|
1594
1666
|
self.env.extend :dynamic
|
1595
|
-
result =
|
1596
|
-
|
1597
|
-
result = lexer.lpar_beg
|
1667
|
+
result = [lexer.lineno, lexer.lpar_beg]
|
1598
1668
|
lexer.paren_nest += 1
|
1599
1669
|
lexer.lpar_beg = lexer.paren_nest
|
1600
1670
|
}
|
1601
1671
|
f_larglist
|
1602
1672
|
{
|
1603
|
-
|
1673
|
+
lexer.cmdarg.push false
|
1604
1674
|
}
|
1605
1675
|
lambda_body
|
1606
1676
|
{
|
1607
|
-
lpar, args,
|
1677
|
+
(line, lpar), args, _cmdarg, body = val
|
1608
1678
|
lexer.lpar_beg = lpar
|
1609
1679
|
|
1610
|
-
lexer.cmdarg.
|
1611
|
-
lexer.cmdarg.lexpop
|
1680
|
+
lexer.cmdarg.pop
|
1612
1681
|
|
1613
|
-
call =
|
1682
|
+
call = s(:lambda).line line
|
1614
1683
|
result = new_iter call, args, body
|
1615
|
-
result.line =
|
1616
|
-
self.env.unextend
|
1684
|
+
result.line = line
|
1685
|
+
self.env.unextend # TODO: dynapush & dynapop
|
1617
1686
|
}
|
1618
1687
|
|
1619
1688
|
f_larglist: tLPAREN2 f_args opt_bv_decl rparen
|
@@ -1637,8 +1706,8 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1637
1706
|
|
1638
1707
|
do_block: k_do_block do_body kEND
|
1639
1708
|
{
|
1640
|
-
|
1641
|
-
result =
|
1709
|
+
(_, line), iter, _ = val
|
1710
|
+
result = iter.line line
|
1642
1711
|
}
|
1643
1712
|
|
1644
1713
|
block_call: command do_block
|
@@ -1652,8 +1721,10 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1652
1721
|
|
1653
1722
|
val = invert_block_call val if inverted? val
|
1654
1723
|
|
1655
|
-
|
1656
|
-
|
1724
|
+
cmd, blk = val
|
1725
|
+
|
1726
|
+
result = blk
|
1727
|
+
result.insert 1, cmd
|
1657
1728
|
}
|
1658
1729
|
| block_call call_op2 operation2 opt_paren_args
|
1659
1730
|
{
|
@@ -1684,8 +1755,10 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1684
1755
|
}
|
1685
1756
|
paren_args
|
1686
1757
|
{
|
1687
|
-
args =
|
1688
|
-
|
1758
|
+
call, lineno, args = val
|
1759
|
+
|
1760
|
+
result = call.concat args.sexp_body if args
|
1761
|
+
result.line lineno
|
1689
1762
|
}
|
1690
1763
|
| primary_value call_op operation2 opt_paren_args
|
1691
1764
|
{
|
@@ -1713,7 +1786,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1713
1786
|
}
|
1714
1787
|
| kSUPER
|
1715
1788
|
{
|
1716
|
-
result = s(:zsuper)
|
1789
|
+
result = s(:zsuper).line lexer.lineno
|
1717
1790
|
}
|
1718
1791
|
| primary_value tLBRACK2 opt_call_args rbracket
|
1719
1792
|
{
|
@@ -1762,19 +1835,15 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1762
1835
|
}
|
1763
1836
|
|
1764
1837
|
do_body: { self.env.extend :dynamic; result = self.lexer.lineno }
|
1765
|
-
{
|
1838
|
+
{ lexer.cmdarg.push false }
|
1766
1839
|
opt_block_param
|
1767
|
-
#if V >= 25
|
1768
|
-
bodystmt
|
1769
|
-
#else
|
1770
1840
|
compstmt
|
1771
|
-
#endif
|
1772
1841
|
{
|
1773
|
-
line,
|
1842
|
+
line, _cmdarg, param, cmpstmt = val
|
1774
1843
|
|
1775
1844
|
result = new_do_body param, cmpstmt, line
|
1845
|
+
lexer.cmdarg.pop
|
1776
1846
|
self.env.unextend
|
1777
|
-
lexer.cmdarg.restore cmdarg
|
1778
1847
|
}
|
1779
1848
|
|
1780
1849
|
case_body: k_when
|
@@ -1795,7 +1864,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1795
1864
|
(_, line), klasses, var, _, body, rest = val
|
1796
1865
|
|
1797
1866
|
klasses ||= s(:array)
|
1798
|
-
klasses << new_assign(var, s(:gvar, :"$!")) if var
|
1867
|
+
klasses << new_assign(var, s(:gvar, :"$!").line(var.line)) if var
|
1799
1868
|
klasses.line line
|
1800
1869
|
|
1801
1870
|
result = new_resbody(klasses, body)
|
@@ -1808,7 +1877,8 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1808
1877
|
|
1809
1878
|
exc_list: arg_value
|
1810
1879
|
{
|
1811
|
-
|
1880
|
+
arg, = val
|
1881
|
+
result = s(:array, arg).line arg.line
|
1812
1882
|
}
|
1813
1883
|
| mrhs
|
1814
1884
|
| none
|
@@ -1821,26 +1891,31 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1821
1891
|
|
1822
1892
|
opt_ensure: k_ensure compstmt
|
1823
1893
|
{
|
1824
|
-
_, body = val
|
1894
|
+
(_, line), body = val
|
1825
1895
|
|
1826
|
-
result = body || s(:nil)
|
1896
|
+
result = body || s(:nil).line(line)
|
1827
1897
|
}
|
1828
1898
|
| none
|
1829
1899
|
|
1830
1900
|
literal: numeric
|
1831
1901
|
{
|
1902
|
+
line = lexer.lineno
|
1832
1903
|
result = s(:lit, val[0])
|
1904
|
+
result.line = line
|
1833
1905
|
}
|
1834
1906
|
| symbol
|
1835
1907
|
{
|
1908
|
+
line = lexer.lineno
|
1836
1909
|
result = s(:lit, val[0])
|
1910
|
+
result.line = line
|
1837
1911
|
}
|
1838
1912
|
| dsym
|
1839
1913
|
|
1840
1914
|
strings: string
|
1841
1915
|
{
|
1842
|
-
|
1843
|
-
|
1916
|
+
str, = val
|
1917
|
+
str = s(:dstr, str.value) if str.sexp_type == :evstr
|
1918
|
+
result = str
|
1844
1919
|
}
|
1845
1920
|
|
1846
1921
|
string: tCHAR
|
@@ -1855,7 +1930,11 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1855
1930
|
|
1856
1931
|
string1: tSTRING_BEG string_contents tSTRING_END
|
1857
1932
|
{
|
1858
|
-
|
1933
|
+
_, str, (_, func) = val
|
1934
|
+
|
1935
|
+
str = dedent str if func =~ RubyLexer::STR_FUNC_ICNTNT
|
1936
|
+
|
1937
|
+
result = str
|
1859
1938
|
}
|
1860
1939
|
| tSTRING
|
1861
1940
|
{
|
@@ -1864,7 +1943,8 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1864
1943
|
|
1865
1944
|
xstring: tXSTRING_BEG xstring_contents tSTRING_END
|
1866
1945
|
{
|
1867
|
-
result = new_xstring val
|
1946
|
+
result = new_xstring val
|
1947
|
+
# TODO: dedent?!?! SERIOUSLY?!?
|
1868
1948
|
}
|
1869
1949
|
|
1870
1950
|
regexp: tREGEXP_BEG regexp_contents tREGEXP_END
|
@@ -1874,7 +1954,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1874
1954
|
|
1875
1955
|
words: tWORDS_BEG tSPACE tSTRING_END
|
1876
1956
|
{
|
1877
|
-
result = s(:array)
|
1957
|
+
result = s(:array).line lexer.lineno
|
1878
1958
|
}
|
1879
1959
|
| tWORDS_BEG word_list tSTRING_END
|
1880
1960
|
{
|
@@ -1898,25 +1978,28 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1898
1978
|
|
1899
1979
|
symbols: tSYMBOLS_BEG tSPACE tSTRING_END
|
1900
1980
|
{
|
1901
|
-
result = s(:array)
|
1981
|
+
result = s(:array).line lexer.lineno
|
1902
1982
|
}
|
1903
|
-
| tSYMBOLS_BEG symbol_list tSTRING_END
|
1983
|
+
| tSYMBOLS_BEG { result = lexer.lineno } symbol_list tSTRING_END
|
1904
1984
|
{
|
1905
|
-
|
1985
|
+
_, line, list, _, = val
|
1986
|
+
list.line = line
|
1987
|
+
result = list
|
1906
1988
|
}
|
1907
1989
|
|
1908
1990
|
symbol_list: none
|
1909
1991
|
{
|
1910
|
-
result = new_symbol_list
|
1992
|
+
result = new_symbol_list.line lexer.lineno
|
1911
1993
|
}
|
1912
1994
|
| symbol_list word tSPACE
|
1913
1995
|
{
|
1914
|
-
|
1996
|
+
list, * = val
|
1997
|
+
result = list.dup << new_symbol_list_entry(val)
|
1915
1998
|
}
|
1916
1999
|
|
1917
2000
|
qwords: tQWORDS_BEG tSPACE tSTRING_END
|
1918
2001
|
{
|
1919
|
-
result = s(:array)
|
2002
|
+
result = s(:array).line lexer.lineno
|
1920
2003
|
}
|
1921
2004
|
| tQWORDS_BEG qword_list tSTRING_END
|
1922
2005
|
{
|
@@ -1925,7 +2008,7 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1925
2008
|
|
1926
2009
|
qsymbols: tQSYMBOLS_BEG tSPACE tSTRING_END
|
1927
2010
|
{
|
1928
|
-
result = s(:array)
|
2011
|
+
result = s(:array).line lexer.lineno # FIX
|
1929
2012
|
}
|
1930
2013
|
| tQSYMBOLS_BEG qsym_list tSTRING_END
|
1931
2014
|
{
|
@@ -1952,11 +2035,12 @@ opt_block_args_tail: tCOMMA block_args_tail
|
|
1952
2035
|
|
1953
2036
|
string_contents: none
|
1954
2037
|
{
|
1955
|
-
result = s(:str, "")
|
2038
|
+
result = s(:str, "").line lexer.lineno
|
1956
2039
|
}
|
1957
2040
|
| string_contents string_content
|
1958
2041
|
{
|
1959
|
-
|
2042
|
+
v1, v2 = val
|
2043
|
+
result = literal_concat v1, v2
|
1960
2044
|
}
|
1961
2045
|
|
1962
2046
|
xstring_contents: none
|
@@ -1965,7 +2049,8 @@ xstring_contents: none
|
|
1965
2049
|
}
|
1966
2050
|
| xstring_contents string_content
|
1967
2051
|
{
|
1968
|
-
|
2052
|
+
v1, v2 = val
|
2053
|
+
result = literal_concat v1, v2
|
1969
2054
|
}
|
1970
2055
|
|
1971
2056
|
regexp_contents: none
|
@@ -1974,7 +2059,8 @@ regexp_contents: none
|
|
1974
2059
|
}
|
1975
2060
|
| regexp_contents string_content
|
1976
2061
|
{
|
1977
|
-
|
2062
|
+
v1, v2 = val
|
2063
|
+
result = literal_concat v1, v2
|
1978
2064
|
}
|
1979
2065
|
|
1980
2066
|
string_content: tSTRING_CONTENT
|
@@ -1990,19 +2076,22 @@ regexp_contents: none
|
|
1990
2076
|
}
|
1991
2077
|
string_dvar
|
1992
2078
|
{
|
1993
|
-
|
1994
|
-
|
2079
|
+
_, strterm, str = val
|
2080
|
+
lexer.lex_strterm = strterm
|
2081
|
+
result = s(:evstr, str).line str.line
|
1995
2082
|
}
|
1996
2083
|
| tSTRING_DBEG
|
1997
2084
|
{
|
1998
2085
|
result = [lexer.lex_strterm,
|
1999
2086
|
lexer.brace_nest,
|
2000
2087
|
lexer.string_nest, # TODO: remove
|
2001
|
-
lexer.cond.store,
|
2002
|
-
lexer.cmdarg.store,
|
2003
2088
|
lexer.lex_state,
|
2089
|
+
lexer.lineno,
|
2004
2090
|
]
|
2005
2091
|
|
2092
|
+
lexer.cmdarg.push false
|
2093
|
+
lexer.cond.push false
|
2094
|
+
|
2006
2095
|
lexer.lex_strterm = nil
|
2007
2096
|
lexer.brace_nest = 0
|
2008
2097
|
lexer.string_nest = 0
|
@@ -2014,14 +2103,15 @@ regexp_contents: none
|
|
2014
2103
|
{
|
2015
2104
|
_, memo, stmt, _ = val
|
2016
2105
|
|
2017
|
-
lex_strterm, brace_nest, string_nest,
|
2106
|
+
lex_strterm, brace_nest, string_nest, oldlex_state, line = memo
|
2107
|
+
# TODO: heredoc_indent
|
2018
2108
|
|
2019
2109
|
lexer.lex_strterm = lex_strterm
|
2020
2110
|
lexer.brace_nest = brace_nest
|
2021
2111
|
lexer.string_nest = string_nest
|
2022
2112
|
|
2023
|
-
lexer.
|
2024
|
-
lexer.
|
2113
|
+
lexer.cmdarg.pop
|
2114
|
+
lexer.cond.pop
|
2025
2115
|
|
2026
2116
|
lexer.lex_state = oldlex_state
|
2027
2117
|
|
@@ -2031,19 +2121,19 @@ regexp_contents: none
|
|
2031
2121
|
when :str, :dstr, :evstr then
|
2032
2122
|
result = stmt
|
2033
2123
|
else
|
2034
|
-
result = s(:evstr, stmt)
|
2124
|
+
result = s(:evstr, stmt).line line
|
2035
2125
|
end
|
2036
2126
|
when nil then
|
2037
|
-
result = s(:evstr)
|
2127
|
+
result = s(:evstr).line line
|
2038
2128
|
else
|
2039
2129
|
debug20 25
|
2040
2130
|
raise "unknown string body: #{stmt.inspect}"
|
2041
2131
|
end
|
2042
2132
|
}
|
2043
2133
|
|
2044
|
-
string_dvar: tGVAR { result = s(:gvar, val[0].to_sym) }
|
2045
|
-
| tIVAR { result = s(:ivar, val[0].to_sym) }
|
2046
|
-
| tCVAR { result = s(:cvar, val[0].to_sym) }
|
2134
|
+
string_dvar: tGVAR { result = s(:gvar, val[0].to_sym).line lexer.lineno }
|
2135
|
+
| tIVAR { result = s(:ivar, val[0].to_sym).line lexer.lineno }
|
2136
|
+
| tCVAR { result = s(:cvar, val[0].to_sym).line lexer.lineno }
|
2047
2137
|
| backref
|
2048
2138
|
|
2049
2139
|
symbol: tSYMBEG sym
|
@@ -2060,67 +2150,55 @@ regexp_contents: none
|
|
2060
2150
|
|
2061
2151
|
dsym: tSYMBEG xstring_contents tSTRING_END
|
2062
2152
|
{
|
2153
|
+
_, result, _ = val
|
2154
|
+
|
2063
2155
|
lexer.lex_state = EXPR_END
|
2064
|
-
result = val[1]
|
2065
2156
|
|
2066
|
-
result ||= s(:str, "")
|
2157
|
+
result ||= s(:str, "").line lexer.lineno
|
2067
2158
|
|
2068
2159
|
case result.sexp_type
|
2069
2160
|
when :dstr then
|
2070
2161
|
result.sexp_type = :dsym
|
2071
2162
|
when :str then
|
2072
|
-
result = s(:lit, result.last.to_sym)
|
2163
|
+
result = s(:lit, result.last.to_sym).line result.line
|
2073
2164
|
when :evstr then
|
2074
|
-
result = s(:dsym, "", result)
|
2165
|
+
result = s(:dsym, "", result).line result.line
|
2075
2166
|
else
|
2076
2167
|
debug20 26, val, result
|
2077
2168
|
end
|
2078
2169
|
}
|
2079
2170
|
|
2080
|
-
#if V == 20
|
2081
2171
|
numeric: tINTEGER
|
2082
2172
|
| tFLOAT
|
2083
2173
|
| tUMINUS_NUM tINTEGER =tLOWEST
|
2084
|
-
#else
|
2085
|
-
numeric: simple_numeric
|
2086
|
-
| tUMINUS_NUM simple_numeric
|
2087
|
-
#endif
|
2088
2174
|
{
|
2089
2175
|
result = -val[1] # TODO: pt_testcase
|
2090
|
-
#if V == 20
|
2091
2176
|
}
|
2092
2177
|
| tUMINUS_NUM tFLOAT =tLOWEST
|
2093
2178
|
{
|
2094
2179
|
result = -val[1] # TODO: pt_testcase
|
2095
|
-
#endif
|
2096
2180
|
}
|
2097
2181
|
|
2098
|
-
#if V >= 21
|
2099
|
-
simple_numeric: tINTEGER
|
2100
|
-
| tFLOAT
|
2101
|
-
| tRATIONAL
|
2102
|
-
| tIMAGINARY
|
2103
|
-
|
2104
|
-
#endif
|
2105
2182
|
user_variable: tIDENTIFIER
|
2106
2183
|
| tIVAR
|
2107
2184
|
| tGVAR
|
2108
2185
|
| tCONSTANT
|
2109
2186
|
| tCVAR
|
2110
2187
|
|
2111
|
-
keyword_variable: kNIL { result = s(:nil)
|
2112
|
-
| kSELF { result = s(:self)
|
2113
|
-
| kTRUE { result = s(:true)
|
2114
|
-
| kFALSE { result = s(:false) }
|
2115
|
-
| k__FILE__ { result = s(:str, self.file) }
|
2116
|
-
| k__LINE__ { result = s(:lit, lexer.lineno) }
|
2188
|
+
keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
|
2189
|
+
| kSELF { result = s(:self).line lexer.lineno }
|
2190
|
+
| kTRUE { result = s(:true).line lexer.lineno }
|
2191
|
+
| kFALSE { result = s(:false).line lexer.lineno }
|
2192
|
+
| k__FILE__ { result = s(:str, self.file).line lexer.lineno }
|
2193
|
+
| k__LINE__ { result = s(:lit, lexer.lineno).line lexer.lineno }
|
2117
2194
|
| k__ENCODING__
|
2118
2195
|
{
|
2196
|
+
l = lexer.lineno
|
2119
2197
|
result =
|
2120
2198
|
if defined? Encoding then
|
2121
|
-
s(:colon2, s(:const, :Encoding), :UTF_8)
|
2199
|
+
s(:colon2, s(:const, :Encoding).line(l), :UTF_8).line l
|
2122
2200
|
else
|
2123
|
-
s(:str, "Unsupported!")
|
2201
|
+
s(:str, "Unsupported!").line l
|
2124
2202
|
end
|
2125
2203
|
}
|
2126
2204
|
|
@@ -2145,8 +2223,8 @@ keyword_variable: kNIL { result = s(:nil) }
|
|
2145
2223
|
debug20 29, val, result
|
2146
2224
|
}
|
2147
2225
|
|
2148
|
-
backref: tNTH_REF { result = s(:nth_ref, val[0]) }
|
2149
|
-
| tBACK_REF { result = s(:back_ref, val[0]) }
|
2226
|
+
backref: tNTH_REF { result = s(:nth_ref, val[0]).line lexer.lineno }
|
2227
|
+
| tBACK_REF { result = s(:back_ref, val[0]).line lexer.lineno }
|
2150
2228
|
|
2151
2229
|
superclass: tLT
|
2152
2230
|
{
|
@@ -2293,30 +2371,21 @@ keyword_variable: kNIL { result = s(:nil) }
|
|
2293
2371
|
result = identifier
|
2294
2372
|
}
|
2295
2373
|
|
2296
|
-
#if V >= 22
|
2297
|
-
f_arg_asgn: f_norm_arg
|
2298
|
-
|
2299
|
-
f_arg_item: f_arg_asgn
|
2300
|
-
| tLPAREN f_margs rparen
|
2301
|
-
{
|
2302
|
-
result = val[1]
|
2303
|
-
}
|
2304
|
-
#else
|
2305
2374
|
f_arg_item: f_norm_arg
|
2306
2375
|
| tLPAREN f_margs rparen
|
2307
2376
|
{
|
2308
2377
|
result = val[1]
|
2309
2378
|
}
|
2310
|
-
#endif
|
2311
2379
|
|
2312
2380
|
f_arg: f_arg_item
|
2313
2381
|
{
|
2314
|
-
|
2382
|
+
arg, = val
|
2383
|
+
|
2384
|
+
case arg
|
2315
2385
|
when Symbol then
|
2316
|
-
result = s(:args)
|
2317
|
-
result << val[0]
|
2386
|
+
result = s(:args, arg).line lexer.lineno
|
2318
2387
|
when Sexp then
|
2319
|
-
result =
|
2388
|
+
result = arg
|
2320
2389
|
else
|
2321
2390
|
debug20 32
|
2322
2391
|
raise "Unknown f_arg type: #{val.inspect}"
|
@@ -2329,61 +2398,33 @@ keyword_variable: kNIL { result = s(:nil) }
|
|
2329
2398
|
if list.sexp_type == :args then
|
2330
2399
|
result = list
|
2331
2400
|
else
|
2332
|
-
result = s(:args, list)
|
2401
|
+
result = s(:args, list).line list.line
|
2333
2402
|
end
|
2334
2403
|
|
2335
2404
|
result << item
|
2336
2405
|
}
|
2337
2406
|
|
2338
|
-
#if V == 20
|
2339
2407
|
f_kw: tLABEL arg_value
|
2340
|
-
#else
|
2341
|
-
f_label: tLABEL
|
2342
|
-
|
2343
|
-
f_kw: f_label arg_value
|
2344
|
-
#endif
|
2345
2408
|
{
|
2346
|
-
# TODO:
|
2347
|
-
label,
|
2348
|
-
identifier = label.to_sym
|
2349
|
-
self.env[identifier] = :lvar
|
2409
|
+
# TODO: new_kw_arg
|
2410
|
+
(label, line), arg = val
|
2350
2411
|
|
2351
|
-
result = s(:array, s(:kwarg, identifier, val[1]))
|
2352
|
-
}
|
2353
|
-
#if V >= 21
|
2354
|
-
| f_label
|
2355
|
-
{
|
2356
|
-
label, _ = val[0] # TODO: fix lineno?
|
2357
2412
|
identifier = label.to_sym
|
2358
2413
|
self.env[identifier] = :lvar
|
2359
2414
|
|
2360
|
-
|
2415
|
+
kwarg = s(:kwarg, identifier, arg).line line
|
2416
|
+
result = s(:array, kwarg).line line
|
2361
2417
|
}
|
2362
|
-
#endif
|
2363
2418
|
|
2364
|
-
#if V == 20
|
2365
2419
|
f_block_kw: tLABEL primary_value
|
2366
|
-
#else
|
2367
|
-
f_block_kw: f_label primary_value
|
2368
|
-
#endif
|
2369
|
-
{
|
2370
|
-
# TODO: call_args
|
2371
|
-
label, _ = val[0] # TODO: fix lineno?
|
2372
|
-
identifier = label.to_sym
|
2373
|
-
self.env[identifier] = :lvar
|
2374
|
-
|
2375
|
-
result = s(:array, s(:kwarg, identifier, val[1]))
|
2376
|
-
}
|
2377
|
-
#if V >= 21
|
2378
|
-
| f_label
|
2379
2420
|
{
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2421
|
+
# TODO: new_kw_arg
|
2422
|
+
(label, line), expr = val
|
2423
|
+
id = label.to_sym
|
2424
|
+
self.env[id] = :lvar
|
2383
2425
|
|
2384
|
-
result = s(:array, s(:kwarg,
|
2426
|
+
result = s(:array, s(:kwarg, id, expr).line(line)).line line
|
2385
2427
|
}
|
2386
|
-
#endif
|
2387
2428
|
|
2388
2429
|
f_block_kwarg: f_block_kw
|
2389
2430
|
| f_block_kwarg tCOMMA f_block_kw
|
@@ -2412,42 +2453,33 @@ keyword_variable: kNIL { result = s(:nil) }
|
|
2412
2453
|
result = :"**"
|
2413
2454
|
}
|
2414
2455
|
|
2415
|
-
#if V == 20
|
2416
2456
|
f_opt: tIDENTIFIER tEQL arg_value
|
2417
|
-
#elif V == 21
|
2418
|
-
f_opt: f_norm_arg tEQL arg_value
|
2419
|
-
#else
|
2420
|
-
f_opt: f_arg_asgn tEQL arg_value
|
2421
|
-
#endif
|
2422
2457
|
{
|
2423
2458
|
result = self.assignable val[0], val[2]
|
2424
2459
|
# TODO: detect duplicate names
|
2425
2460
|
}
|
2426
2461
|
|
2427
|
-
#if V == 20
|
2428
2462
|
f_block_opt: tIDENTIFIER tEQL primary_value
|
2429
|
-
#elif V == 21
|
2430
|
-
f_block_opt: f_norm_arg tEQL primary_value
|
2431
|
-
#else
|
2432
|
-
f_block_opt: f_arg_asgn tEQL primary_value
|
2433
|
-
#endif
|
2434
2463
|
{
|
2435
2464
|
result = self.assignable val[0], val[2]
|
2436
2465
|
}
|
2437
2466
|
|
2438
2467
|
f_block_optarg: f_block_opt
|
2439
2468
|
{
|
2440
|
-
|
2469
|
+
optblk, = val
|
2470
|
+
result = s(:block, optblk).line optblk.line
|
2441
2471
|
}
|
2442
2472
|
| f_block_optarg tCOMMA f_block_opt
|
2443
2473
|
{
|
2444
|
-
|
2445
|
-
result
|
2474
|
+
optarg, _, optblk = val
|
2475
|
+
result = optarg
|
2476
|
+
result << optblk
|
2446
2477
|
}
|
2447
2478
|
|
2448
2479
|
f_optarg: f_opt
|
2449
2480
|
{
|
2450
|
-
|
2481
|
+
opt, = val
|
2482
|
+
result = s(:block, opt).line opt.line
|
2451
2483
|
}
|
2452
2484
|
| f_optarg tCOMMA f_opt
|
2453
2485
|
{
|
@@ -2501,14 +2533,11 @@ keyword_variable: kNIL { result = s(:nil) }
|
|
2501
2533
|
result.sexp_type == :lit
|
2502
2534
|
}
|
2503
2535
|
|
2504
|
-
assoc_list: none
|
2536
|
+
assoc_list: none
|
2505
2537
|
{
|
2506
|
-
result = s(:array)
|
2507
|
-
}
|
2508
|
-
| assocs trailer # [!nil]
|
2509
|
-
{
|
2510
|
-
result = val[0]
|
2538
|
+
result = s(:array).line lexer.lineno
|
2511
2539
|
}
|
2540
|
+
| assocs trailer
|
2512
2541
|
|
2513
2542
|
assocs: assoc
|
2514
2543
|
| assocs tCOMMA assoc
|
@@ -2522,24 +2551,21 @@ keyword_variable: kNIL { result = s(:nil) }
|
|
2522
2551
|
|
2523
2552
|
assoc: arg_value tASSOC arg_value
|
2524
2553
|
{
|
2525
|
-
|
2554
|
+
v1, _, v2 = val
|
2555
|
+
result = s(:array, v1, v2).line v1.line
|
2526
2556
|
}
|
2527
2557
|
| tLABEL arg_value
|
2528
2558
|
{
|
2529
|
-
(label,
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
| tSTRING_BEG string_contents tLABEL_END arg_value
|
2534
|
-
{
|
2535
|
-
_, sym, _, value = val
|
2536
|
-
sym.sexp_type = :dsym
|
2537
|
-
result = s(:array, sym, value)
|
2559
|
+
(label, line), arg = val
|
2560
|
+
|
2561
|
+
lit = s(:lit, label.to_sym).line line
|
2562
|
+
result = s(:array, lit, arg).line line
|
2538
2563
|
}
|
2539
|
-
#endif
|
2540
2564
|
| tDSTAR arg_value
|
2541
2565
|
{
|
2542
|
-
|
2566
|
+
_, arg = val
|
2567
|
+
line = arg.line
|
2568
|
+
result = s(:array, s(:kwsplat, arg).line(line)).line line
|
2543
2569
|
}
|
2544
2570
|
|
2545
2571
|
operation: tIDENTIFIER | tCONSTANT | tFID
|
@@ -2547,9 +2573,6 @@ keyword_variable: kNIL { result = s(:nil) }
|
|
2547
2573
|
operation3: tIDENTIFIER | tFID | op
|
2548
2574
|
dot_or_colon: tDOT | tCOLON2
|
2549
2575
|
call_op: tDOT
|
2550
|
-
#if V >= 23
|
2551
|
-
| tLONELY # TODO: rename tANDDOT?
|
2552
|
-
#endif
|
2553
2576
|
|
2554
2577
|
call_op2: call_op
|
2555
2578
|
| tCOLON2
|