@appthreat/atom 2.0.25 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -6
- package/package.json +5 -4
- package/plugins/bin/atom +1 -1
- package/plugins/bin/atom.bat +1 -1
- package/plugins/bin/bundler +14 -0
- package/plugins/bin/ruby_ast_gen +14 -0
- package/plugins/composer/InstalledVersions.php +7 -4
- package/plugins/composer/installed.php +6 -6
- package/plugins/lib/{com.github.javaparser.javaparser-core-3.26.2.jar → com.github.javaparser.javaparser-core-3.26.3.jar} +0 -0
- package/plugins/lib/{com.github.javaparser.javaparser-symbol-solver-core-3.26.2.jar → com.github.javaparser.javaparser-symbol-solver-core-3.26.3.jar} +0 -0
- package/plugins/lib/{com.google.guava.guava-33.3.0-jre.jar → com.google.guava.guava-33.3.1-jre.jar} +0 -0
- package/plugins/lib/{commons-io.commons-io-2.17.0.jar → commons-io.commons-io-2.18.0.jar} +0 -0
- package/plugins/lib/io.appthreat.atom-2.1.1-classpath.jar +0 -0
- package/plugins/lib/io.appthreat.atom-2.1.1.jar +0 -0
- package/plugins/lib/io.appthreat.c2cpg_3-2.3.0.jar +0 -0
- package/plugins/lib/io.appthreat.dataflowengineoss_3-2.3.0.jar +0 -0
- package/plugins/lib/io.appthreat.javasrc2cpg_3-2.3.0.jar +0 -0
- package/plugins/lib/io.appthreat.jimple2cpg_3-2.3.0.jar +0 -0
- package/plugins/lib/io.appthreat.jssrc2cpg_3-2.3.0.jar +0 -0
- package/plugins/lib/{io.appthreat.php2atom_3-2.2.3.jar → io.appthreat.php2atom_3-2.3.0.jar} +0 -0
- package/plugins/lib/io.appthreat.pysrc2cpg_3-2.3.0.jar +0 -0
- package/plugins/lib/io.appthreat.ruby2atom_3-2.3.0.jar +0 -0
- package/plugins/lib/io.appthreat.semanticcpg_3-2.3.0.jar +0 -0
- package/plugins/lib/io.appthreat.x2cpg_3-2.3.0.jar +0 -0
- package/plugins/lib/net.java.dev.jna.jna-5.15.0.jar +0 -0
- package/plugins/lib/net.java.dev.jna.jna-platform-5.15.0.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.contenttype-3.9.600.jar +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.core.filesystem-1.11.0.jar → org.eclipse.platform.org.eclipse.core.filesystem-1.11.100.jar} +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.core.jobs-3.15.300.jar → org.eclipse.platform.org.eclipse.core.jobs-3.15.400.jar} +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.core.resources-3.21.0.jar → org.eclipse.platform.org.eclipse.core.resources-3.22.0.jar} +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.core.runtime-3.31.100.jar → org.eclipse.platform.org.eclipse.core.runtime-3.32.0.jar} +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.equinox.app-1.7.200.jar +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.equinox.common-3.19.100.jar → org.eclipse.platform.org.eclipse.equinox.common-3.19.200.jar} +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.equinox.preferences-3.11.200.jar +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.equinox.registry-3.12.100.jar → org.eclipse.platform.org.eclipse.equinox.registry-3.12.200.jar} +0 -0
- package/plugins/lib/{org.eclipse.platform.org.eclipse.osgi-3.21.0.jar → org.eclipse.platform.org.eclipse.osgi-3.22.0.jar} +0 -0
- package/plugins/lib/{org.scala-lang.modules.scala-asm-9.7.0-scala-2.jar → org.scala-lang.modules.scala-asm-9.7.1-scala-1.jar} +0 -0
- package/plugins/lib/org.scala-lang.modules.scala-parallel-collections_3-1.1.0.jar +0 -0
- package/plugins/lib/{org.scala-lang.scala-library-2.13.14.jar → org.scala-lang.scala-library-2.13.15.jar} +0 -0
- package/plugins/lib/org.scala-lang.scala3-library_3-3.6.2.jar +0 -0
- package/plugins/rubyastgen/.bundle/config +5 -0
- package/plugins/rubyastgen/Gemfile +11 -0
- package/plugins/rubyastgen/Gemfile.lock +31 -0
- package/plugins/rubyastgen/bundle/bundler/setup.rb +42 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/racc +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/ruby-parse +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/ruby-rewrite +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/ruby_ast_gen +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/.rspec +3 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/Gemfile +13 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/LICENSE.txt +213 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/README.md +46 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/Rakefile +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/bin/console +11 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/bin/setup +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/exe/ruby_ast_gen +59 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/lib/ruby_ast_gen/node_handling.rb +236 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/lib/ruby_ast_gen/version.rb +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/lib/ruby_ast_gen.rb +139 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/ruby_ast_gen.gemspec +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/sig/ruby_ast_gen.rbs +3 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/spec/ruby_ast_gen_spec.rb +93 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/spec/spec_helper.rb +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-1c6e88faec50/update_version.rb +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/gem.build_complete +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/gem_make.out +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/racc/cparse.so +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.2/LICENSE.MIT +20 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.2/README.YARD.md +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.2/lib/ast/node.rb +268 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.2/lib/ast/processor/mixin.rb +288 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.2/lib/ast/processor.rb +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.2/lib/ast/sexp.rb +30 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.2/lib/ast.rb +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/BSDL +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/COPYING +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/Gemfile +10 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/README.md +69 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/Rakefile +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/bin/console +14 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/bin/setup +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/lib/ostruct.rb +489 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/ostruct.gemspec +24 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/LICENSE.txt +26 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/bin/ruby-parse +7 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/bin/ruby-rewrite +7 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/gauntlet_parser.rb +123 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/all.rb +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ast/node.rb +40 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ast/processor.rb +293 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/base.rb +291 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/builders/default.rb +2338 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/clobbering_error.rb +13 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/color.rb +32 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/context.rb +49 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/current.rb +137 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/current_arg_stack.rb +46 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/deprecation.rb +13 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/diagnostic/engine.rb +104 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/diagnostic.rb +163 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/lexer/dedenter.rb +88 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/lexer/explanation.rb +55 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/lexer/literal.rb +284 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/lexer/stack_state.rb +49 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/lexer-F0.rb +12922 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/lexer-F1.rb +14875 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/lexer-strings.rb +5424 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/macruby.rb +9634 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/max_numparam_stack.rb +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/messages.rb +125 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/meta.rb +40 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/rewriter.rb +105 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby18.rb +9272 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby19.rb +9558 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby20.rb +10229 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby21.rb +10203 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby22.rb +10302 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby23.rb +10322 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby24.rb +10454 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby25.rb +10374 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby26.rb +10352 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby27.rb +11947 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby28.rb +8047 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby30.rb +12243 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby31.rb +12716 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby32.rb +12704 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby33.rb +12589 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/ruby34.rb +12589 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/rubymotion.rb +9515 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/runner/ruby_parse.rb +157 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/runner/ruby_rewrite.rb +101 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/runner.rb +294 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/buffer.rb +369 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/comment/associator.rb +233 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/comment.rb +134 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/collection.rb +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/condition.rb +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/constant.rb +32 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/definition.rb +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/for.rb +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/heredoc.rb +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/index.rb +33 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/keyword.rb +20 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/method_definition.rb +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/objc_kwarg.rb +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/operator.rb +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/rescue_body.rb +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/send.rb +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/ternary.rb +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/variable.rb +31 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map.rb +186 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/range.rb +326 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/rewriter/action.rb +44 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/rewriter.rb +513 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/tree_rewriter/action.rb +243 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/tree_rewriter.rb +431 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/static_environment.rb +134 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/syntax_error.rb +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/tree_rewriter.rb +133 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/unknown_encoding_in_magic_comment_error.rb +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/variables_stack.rb +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/version.rb +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser.rb +91 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/parser.gemspec +43 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/BSDL +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/COPYING +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ChangeLog +846 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/README.ja.rdoc +58 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/README.rdoc +60 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/TODO +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/bin/racc +320 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/en/grammar.en.rdoc +218 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/en/grammar2.en.rdoc +219 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/command.ja.html +99 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/debug.ja.rdoc +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/grammar.ja.rdoc +348 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/index.ja.html +10 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/parser.ja.rdoc +125 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/usage.ja.html +414 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +273 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/cparse.c +840 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/extconf.rb +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/compat.rb +33 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/debugflags.rb +60 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/exception.rb +16 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/grammar.rb +1191 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/grammarfileparser.rb +667 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/info.rb +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/iset.rb +92 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/logfilegenerator.rb +212 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/parser-text.rb +644 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/parser.rb +630 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/parserfilegenerator.rb +473 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/sourcetext.rb +35 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/state.rb +976 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/statetransitiontable.rb +311 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/static.rb +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc.rb +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/ast-2.4.2.gemspec +30 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/ostruct-0.6.1.gemspec +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/parser-3.3.6.0.gemspec +37 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/racc-1.8.1.gemspec +28 -0
- package/plugins/rubyastgen/setup.sh +6 -0
- package/rbastgen.js +50 -0
- package/utils.mjs +11 -1
- package/plugins/lib/io.appthreat.atom-2.0.25-classpath.jar +0 -0
- package/plugins/lib/io.appthreat.atom-2.0.25.jar +0 -0
- package/plugins/lib/io.appthreat.c2cpg_3-2.2.3.jar +0 -0
- package/plugins/lib/io.appthreat.dataflowengineoss_3-2.2.3.jar +0 -0
- package/plugins/lib/io.appthreat.javasrc2cpg_3-2.2.3.jar +0 -0
- package/plugins/lib/io.appthreat.jimple2cpg_3-2.2.3.jar +0 -0
- package/plugins/lib/io.appthreat.jssrc2cpg_3-2.2.3.jar +0 -0
- package/plugins/lib/io.appthreat.pysrc2cpg_3-2.2.3.jar +0 -0
- package/plugins/lib/io.appthreat.semanticcpg_3-2.2.3.jar +0 -0
- package/plugins/lib/io.appthreat.x2cpg_3-2.2.3.jar +0 -0
- package/plugins/lib/net.java.dev.jna.jna-5.14.0.jar +0 -0
- package/plugins/lib/net.java.dev.jna.jna-platform-5.14.0.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.core.contenttype-3.9.400.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.equinox.app-1.7.100.jar +0 -0
- package/plugins/lib/org.eclipse.platform.org.eclipse.equinox.preferences-3.11.100.jar +0 -0
- package/plugins/lib/org.scala-lang.modules.scala-parallel-collections_3-1.0.4.jar +0 -0
- package/plugins/lib/org.scala-lang.scala3-library_3-3.5.2.jar +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
##
|
|
7
|
+
# A comment in the source code.
|
|
8
|
+
#
|
|
9
|
+
# @!attribute [r] text
|
|
10
|
+
# @return [String]
|
|
11
|
+
#
|
|
12
|
+
# @!attribute [r] location
|
|
13
|
+
# @return [Parser::Source::Range]
|
|
14
|
+
#
|
|
15
|
+
# @api public
|
|
16
|
+
#
|
|
17
|
+
class Comment
|
|
18
|
+
attr_reader :text
|
|
19
|
+
|
|
20
|
+
attr_reader :location
|
|
21
|
+
alias_method :loc, :location
|
|
22
|
+
|
|
23
|
+
##
|
|
24
|
+
# Associate `comments` with `ast` nodes by their corresponding node.
|
|
25
|
+
#
|
|
26
|
+
# @param [Parser::AST::Node] ast
|
|
27
|
+
# @param [Array<Comment>] comments
|
|
28
|
+
# @return [Hash<Parser::AST::Node, Array<Comment>>]
|
|
29
|
+
# @see Parser::Source::Comment::Associator#associate
|
|
30
|
+
# @deprecated Use {associate_locations}.
|
|
31
|
+
#
|
|
32
|
+
def self.associate(ast, comments)
|
|
33
|
+
associator = Associator.new(ast, comments)
|
|
34
|
+
associator.associate
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
##
|
|
38
|
+
# Associate `comments` with `ast` nodes by their location in the
|
|
39
|
+
# source.
|
|
40
|
+
#
|
|
41
|
+
# @param [Parser::AST::Node] ast
|
|
42
|
+
# @param [Array<Comment>] comments
|
|
43
|
+
# @return [Hash<Parser::Source::Map, Array<Comment>>]
|
|
44
|
+
# @see Parser::Source::Comment::Associator#associate_locations
|
|
45
|
+
#
|
|
46
|
+
def self.associate_locations(ast, comments)
|
|
47
|
+
associator = Associator.new(ast, comments)
|
|
48
|
+
associator.associate_locations
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
##
|
|
52
|
+
# Associate `comments` with `ast` nodes using identity.
|
|
53
|
+
#
|
|
54
|
+
# @param [Parser::AST::Node] ast
|
|
55
|
+
# @param [Array<Comment>] comments
|
|
56
|
+
# @return [Hash<Parser::Source::Node, Array<Comment>>]
|
|
57
|
+
# @see Parser::Source::Comment::Associator#associate_by_identity
|
|
58
|
+
#
|
|
59
|
+
def self.associate_by_identity(ast, comments)
|
|
60
|
+
associator = Associator.new(ast, comments)
|
|
61
|
+
associator.associate_by_identity
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
##
|
|
65
|
+
# @param [Parser::Source::Range] range
|
|
66
|
+
#
|
|
67
|
+
def initialize(range)
|
|
68
|
+
@location = Parser::Source::Map.new(range)
|
|
69
|
+
@text = range.source.freeze
|
|
70
|
+
|
|
71
|
+
freeze
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
##
|
|
75
|
+
# Type of this comment.
|
|
76
|
+
#
|
|
77
|
+
# * Inline comments correspond to `:inline`:
|
|
78
|
+
#
|
|
79
|
+
# # whatever
|
|
80
|
+
#
|
|
81
|
+
# * Block comments correspond to `:document`:
|
|
82
|
+
#
|
|
83
|
+
# =begin
|
|
84
|
+
# hi i am a document
|
|
85
|
+
# =end
|
|
86
|
+
#
|
|
87
|
+
# @return [Symbol]
|
|
88
|
+
#
|
|
89
|
+
def type
|
|
90
|
+
if text.start_with?("#".freeze)
|
|
91
|
+
:inline
|
|
92
|
+
elsif text.start_with?("=begin".freeze)
|
|
93
|
+
:document
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
##
|
|
98
|
+
# @see #type
|
|
99
|
+
# @return [Boolean] true if this is an inline comment.
|
|
100
|
+
#
|
|
101
|
+
def inline?
|
|
102
|
+
type == :inline
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
##
|
|
106
|
+
# @see #type
|
|
107
|
+
# @return [Boolean] true if this is a block comment.
|
|
108
|
+
#
|
|
109
|
+
def document?
|
|
110
|
+
type == :document
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
##
|
|
114
|
+
# Compares comments. Two comments are equal if they
|
|
115
|
+
# correspond to the same source range.
|
|
116
|
+
#
|
|
117
|
+
# @param [Object] other
|
|
118
|
+
# @return [Boolean]
|
|
119
|
+
#
|
|
120
|
+
def ==(other)
|
|
121
|
+
other.is_a?(Source::Comment) &&
|
|
122
|
+
@location == other.location
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
##
|
|
126
|
+
# @return [String] a human-readable representation of this comment
|
|
127
|
+
#
|
|
128
|
+
def inspect
|
|
129
|
+
"#<Parser::Source::Comment #{@location.expression.to_s} #{text.inspect}>"
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
end
|
|
134
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/collection.rb
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Collection < Map
|
|
7
|
+
attr_reader :begin
|
|
8
|
+
attr_reader :end
|
|
9
|
+
|
|
10
|
+
def initialize(begin_l, end_l, expression_l)
|
|
11
|
+
@begin, @end = begin_l, end_l
|
|
12
|
+
|
|
13
|
+
super(expression_l)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
end
|
|
18
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/condition.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Condition < Map
|
|
7
|
+
attr_reader :keyword
|
|
8
|
+
attr_reader :begin
|
|
9
|
+
attr_reader :else
|
|
10
|
+
attr_reader :end
|
|
11
|
+
|
|
12
|
+
def initialize(keyword_l, begin_l, else_l, end_l, expression_l)
|
|
13
|
+
@keyword = keyword_l
|
|
14
|
+
@begin, @else, @end = begin_l, else_l, end_l
|
|
15
|
+
|
|
16
|
+
super(expression_l)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/constant.rb
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Constant < Map
|
|
7
|
+
attr_reader :double_colon
|
|
8
|
+
attr_reader :name
|
|
9
|
+
attr_reader :operator
|
|
10
|
+
|
|
11
|
+
def initialize(double_colon, name, expression)
|
|
12
|
+
@double_colon, @name = double_colon, name
|
|
13
|
+
|
|
14
|
+
super(expression)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
##
|
|
18
|
+
# @api private
|
|
19
|
+
#
|
|
20
|
+
def with_operator(operator_l)
|
|
21
|
+
with { |map| map.update_operator(operator_l) }
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
protected
|
|
25
|
+
|
|
26
|
+
def update_operator(operator_l)
|
|
27
|
+
@operator = operator_l
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
32
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/definition.rb
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Definition < Map
|
|
7
|
+
attr_reader :keyword
|
|
8
|
+
attr_reader :operator
|
|
9
|
+
attr_reader :name
|
|
10
|
+
attr_reader :end
|
|
11
|
+
|
|
12
|
+
def initialize(keyword_l, operator_l, name_l, end_l)
|
|
13
|
+
@keyword = keyword_l
|
|
14
|
+
@operator = operator_l
|
|
15
|
+
@name = name_l
|
|
16
|
+
@end = end_l
|
|
17
|
+
|
|
18
|
+
super(@keyword.join(@end))
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::For < Map
|
|
7
|
+
attr_reader :keyword, :in
|
|
8
|
+
attr_reader :begin, :end
|
|
9
|
+
|
|
10
|
+
def initialize(keyword_l, in_l, begin_l, end_l, expression_l)
|
|
11
|
+
@keyword, @in = keyword_l, in_l
|
|
12
|
+
@begin, @end = begin_l, end_l
|
|
13
|
+
|
|
14
|
+
super(expression_l)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/heredoc.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Heredoc < Map
|
|
7
|
+
attr_reader :heredoc_body
|
|
8
|
+
attr_reader :heredoc_end
|
|
9
|
+
|
|
10
|
+
def initialize(begin_l, body_l, end_l)
|
|
11
|
+
@heredoc_body = body_l
|
|
12
|
+
@heredoc_end = end_l
|
|
13
|
+
|
|
14
|
+
super(begin_l)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/index.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Index < Map
|
|
7
|
+
attr_reader :begin
|
|
8
|
+
attr_reader :end
|
|
9
|
+
attr_reader :operator
|
|
10
|
+
|
|
11
|
+
def initialize(begin_l, end_l, expression_l)
|
|
12
|
+
@begin, @end = begin_l, end_l
|
|
13
|
+
@operator = nil
|
|
14
|
+
|
|
15
|
+
super(expression_l)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
##
|
|
19
|
+
# @api private
|
|
20
|
+
#
|
|
21
|
+
def with_operator(operator_l)
|
|
22
|
+
with { |map| map.update_operator(operator_l) }
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
protected
|
|
26
|
+
|
|
27
|
+
def update_operator(operator_l)
|
|
28
|
+
@operator = operator_l
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/keyword.rb
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Keyword < Map
|
|
7
|
+
attr_reader :keyword
|
|
8
|
+
attr_reader :begin
|
|
9
|
+
attr_reader :end
|
|
10
|
+
|
|
11
|
+
def initialize(keyword_l, begin_l, end_l, expression_l)
|
|
12
|
+
@keyword = keyword_l
|
|
13
|
+
@begin, @end = begin_l, end_l
|
|
14
|
+
|
|
15
|
+
super(expression_l)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::MethodDefinition < Map
|
|
7
|
+
attr_reader :keyword
|
|
8
|
+
attr_reader :operator
|
|
9
|
+
attr_reader :name
|
|
10
|
+
attr_reader :end
|
|
11
|
+
attr_reader :assignment
|
|
12
|
+
|
|
13
|
+
def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l)
|
|
14
|
+
@keyword = keyword_l
|
|
15
|
+
@operator = operator_l
|
|
16
|
+
@name = name_l
|
|
17
|
+
@end = end_l
|
|
18
|
+
@assignment = assignment_l
|
|
19
|
+
|
|
20
|
+
super(@keyword.join(end_l || body_l))
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/objc_kwarg.rb
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::ObjcKwarg < Map
|
|
7
|
+
attr_reader :keyword
|
|
8
|
+
attr_reader :operator
|
|
9
|
+
attr_reader :argument
|
|
10
|
+
|
|
11
|
+
def initialize(keyword_l, operator_l, argument_l, expression_l)
|
|
12
|
+
@keyword, @operator, @argument = keyword_l, operator_l, argument_l
|
|
13
|
+
|
|
14
|
+
super(expression_l)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::RescueBody < Map
|
|
7
|
+
attr_reader :keyword
|
|
8
|
+
attr_reader :assoc
|
|
9
|
+
attr_reader :begin
|
|
10
|
+
|
|
11
|
+
def initialize(keyword_l, assoc_l, begin_l, expression_l)
|
|
12
|
+
@keyword = keyword_l
|
|
13
|
+
@assoc = assoc_l
|
|
14
|
+
@begin = begin_l
|
|
15
|
+
|
|
16
|
+
super(expression_l)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/send.rb
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Send < Map
|
|
7
|
+
attr_reader :dot
|
|
8
|
+
attr_reader :selector
|
|
9
|
+
attr_reader :operator
|
|
10
|
+
attr_reader :begin
|
|
11
|
+
attr_reader :end
|
|
12
|
+
|
|
13
|
+
def initialize(dot_l, selector_l, begin_l, end_l, expression_l)
|
|
14
|
+
@dot = dot_l
|
|
15
|
+
@selector = selector_l
|
|
16
|
+
@begin, @end = begin_l, end_l
|
|
17
|
+
|
|
18
|
+
super(expression_l)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
##
|
|
22
|
+
# @api private
|
|
23
|
+
#
|
|
24
|
+
def with_operator(operator_l)
|
|
25
|
+
with { |map| map.update_operator(operator_l) }
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
protected
|
|
29
|
+
|
|
30
|
+
def update_operator(operator_l)
|
|
31
|
+
@operator = operator_l
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/ternary.rb
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Ternary < Map
|
|
7
|
+
attr_reader :question
|
|
8
|
+
attr_reader :colon
|
|
9
|
+
|
|
10
|
+
def initialize(question_l, colon_l, expression_l)
|
|
11
|
+
@question, @colon = question_l, colon_l
|
|
12
|
+
|
|
13
|
+
super(expression_l)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
end
|
|
18
|
+
end
|
package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.6.0/lib/parser/source/map/variable.rb
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
class Map::Variable < Map
|
|
7
|
+
attr_reader :name
|
|
8
|
+
attr_reader :operator
|
|
9
|
+
|
|
10
|
+
def initialize(name_l, expression_l=name_l)
|
|
11
|
+
@name = name_l
|
|
12
|
+
|
|
13
|
+
super(expression_l)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
##
|
|
17
|
+
# @api private
|
|
18
|
+
#
|
|
19
|
+
def with_operator(operator_l)
|
|
20
|
+
with { |map| map.update_operator(operator_l) }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
protected
|
|
24
|
+
|
|
25
|
+
def update_operator(operator_l)
|
|
26
|
+
@operator = operator_l
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Parser
|
|
4
|
+
module Source
|
|
5
|
+
|
|
6
|
+
##
|
|
7
|
+
# {Map} relates AST nodes to the source code they were parsed from.
|
|
8
|
+
# More specifically, a {Map} or its subclass contains a set of ranges:
|
|
9
|
+
#
|
|
10
|
+
# * `expression`: smallest range which includes all source corresponding
|
|
11
|
+
# to the node and all `expression` ranges of its children.
|
|
12
|
+
# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges
|
|
13
|
+
# pointing to various interesting tokens corresponding to the node.
|
|
14
|
+
#
|
|
15
|
+
# Note that the {Map::Heredoc} map is the only one whose `expression` does
|
|
16
|
+
# not include other ranges. It only covers the heredoc marker (`<<HERE`),
|
|
17
|
+
# not the here document itself.
|
|
18
|
+
#
|
|
19
|
+
# All ranges except `expression` are defined by {Map} subclasses.
|
|
20
|
+
#
|
|
21
|
+
# Ranges (except `expression`) can be `nil` if the corresponding token is
|
|
22
|
+
# not present in source. For example, a hash may not have opening/closing
|
|
23
|
+
# braces, and so would its source map.
|
|
24
|
+
#
|
|
25
|
+
# p Parser::CurrentRuby.parse('[1 => 2]').children[0].loc
|
|
26
|
+
# # => <Parser::Source::Map::Collection:0x007f5492b547d8
|
|
27
|
+
# # @end=nil, @begin=nil,
|
|
28
|
+
# # @expression=#<Source::Range (string) 1...7>>
|
|
29
|
+
#
|
|
30
|
+
# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source
|
|
31
|
+
# code tokens. For example, the entry
|
|
32
|
+
#
|
|
33
|
+
# (array (int 1) (int 2))
|
|
34
|
+
#
|
|
35
|
+
# "[1, 2]"
|
|
36
|
+
# ^ begin
|
|
37
|
+
# ^ end
|
|
38
|
+
# ~~~~~~ expression
|
|
39
|
+
#
|
|
40
|
+
# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`,
|
|
41
|
+
# then `node.loc` responds to `begin`, `end` and `expression`, and
|
|
42
|
+
# `node.loc.begin` returns a range pointing at the opening bracket, and so on.
|
|
43
|
+
#
|
|
44
|
+
# If you want to write code polymorphic by the source map (i.e. accepting
|
|
45
|
+
# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to
|
|
46
|
+
# check whether the map features the range you need. Concrete {Map}
|
|
47
|
+
# subclasses may not be preserved between versions, but their interfaces
|
|
48
|
+
# will be kept compatible.
|
|
49
|
+
#
|
|
50
|
+
# You can visualize the source maps with `ruby-parse -E` command-line tool.
|
|
51
|
+
#
|
|
52
|
+
# @example
|
|
53
|
+
# require 'parser/current'
|
|
54
|
+
#
|
|
55
|
+
# p Parser::CurrentRuby.parse('[1, 2]').loc
|
|
56
|
+
# # => #<Parser::Source::Map::Collection:0x007f14b80eccd8
|
|
57
|
+
# # @end=#<Source::Range (string) 5...6>,
|
|
58
|
+
# # @begin=#<Source::Range (string) 0...1>,
|
|
59
|
+
# # @expression=#<Source::Range (string) 0...6>>
|
|
60
|
+
#
|
|
61
|
+
# @!attribute [r] node
|
|
62
|
+
# The node that is described by this map. Nodes and maps have 1:1 correspondence.
|
|
63
|
+
# @return [Parser::AST::Node]
|
|
64
|
+
#
|
|
65
|
+
# @!attribute [r] expression
|
|
66
|
+
# @return [Range]
|
|
67
|
+
#
|
|
68
|
+
# @api public
|
|
69
|
+
#
|
|
70
|
+
class Map
|
|
71
|
+
attr_reader :node
|
|
72
|
+
attr_reader :expression
|
|
73
|
+
|
|
74
|
+
##
|
|
75
|
+
# @param [Range] expression
|
|
76
|
+
def initialize(expression)
|
|
77
|
+
@expression = expression
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
##
|
|
81
|
+
# @api private
|
|
82
|
+
def initialize_copy(other)
|
|
83
|
+
super
|
|
84
|
+
@node = nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
##
|
|
88
|
+
# @api private
|
|
89
|
+
def node=(node)
|
|
90
|
+
@node = node
|
|
91
|
+
freeze
|
|
92
|
+
@node
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
##
|
|
96
|
+
# A shortcut for `self.expression.line`.
|
|
97
|
+
# @return [Integer]
|
|
98
|
+
#
|
|
99
|
+
def line
|
|
100
|
+
@expression.line
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
alias_method :first_line, :line
|
|
104
|
+
|
|
105
|
+
##
|
|
106
|
+
# A shortcut for `self.expression.column`.
|
|
107
|
+
# @return [Integer]
|
|
108
|
+
#
|
|
109
|
+
def column
|
|
110
|
+
@expression.column
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
##
|
|
114
|
+
# A shortcut for `self.expression.last_line`.
|
|
115
|
+
# @return [Integer]
|
|
116
|
+
#
|
|
117
|
+
def last_line
|
|
118
|
+
@expression.last_line
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
##
|
|
122
|
+
# A shortcut for `self.expression.last_column`.
|
|
123
|
+
# @return [Integer]
|
|
124
|
+
#
|
|
125
|
+
def last_column
|
|
126
|
+
@expression.last_column
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
##
|
|
130
|
+
# @api private
|
|
131
|
+
#
|
|
132
|
+
def with_expression(expression_l)
|
|
133
|
+
with { |map| map.update_expression(expression_l) }
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
##
|
|
137
|
+
# Compares source maps.
|
|
138
|
+
# @return [Boolean]
|
|
139
|
+
#
|
|
140
|
+
def ==(other)
|
|
141
|
+
other.class == self.class &&
|
|
142
|
+
instance_variables.map do |ivar|
|
|
143
|
+
instance_variable_get(ivar) ==
|
|
144
|
+
other.send(:instance_variable_get, ivar)
|
|
145
|
+
end.reduce(:&)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
##
|
|
149
|
+
# Converts this source map to a hash with keys corresponding to
|
|
150
|
+
# ranges. For example, if called on an instance of {Collection},
|
|
151
|
+
# which adds the `begin` and `end` ranges, the resulting hash
|
|
152
|
+
# will contain keys `:expression`, `:begin` and `:end`.
|
|
153
|
+
#
|
|
154
|
+
# @example
|
|
155
|
+
# require 'parser/current'
|
|
156
|
+
#
|
|
157
|
+
# p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash
|
|
158
|
+
# # => {
|
|
159
|
+
# # :begin => #<Source::Range (string) 0...1>,
|
|
160
|
+
# # :end => #<Source::Range (string) 5...6>,
|
|
161
|
+
# # :expression => #<Source::Range (string) 0...6>
|
|
162
|
+
# # }
|
|
163
|
+
#
|
|
164
|
+
# @return [Hash<Symbol, Parser::Source::Range>]
|
|
165
|
+
#
|
|
166
|
+
def to_hash
|
|
167
|
+
instance_variables.inject({}) do |hash, ivar|
|
|
168
|
+
next hash if ivar.to_sym == :@node
|
|
169
|
+
hash[ivar[1..-1].to_sym] = instance_variable_get(ivar)
|
|
170
|
+
hash
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
protected
|
|
175
|
+
|
|
176
|
+
def with(&block)
|
|
177
|
+
dup.tap(&block)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
def update_expression(expression_l)
|
|
181
|
+
@expression = expression_l
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
end
|
|
186
|
+
end
|