@appthreat/atom 2.1.19 → 2.2.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/{plugins/composer/LICENSE → LICENSE} +6 -6
- package/README.md +2 -2
- package/index.js +4 -8
- package/package.json +20 -13
- package/packages/atom-parsetools/LICENSE +21 -0
- package/{astgen.js → packages/atom-parsetools/astgen.js} +1 -1
- package/packages/atom-parsetools/index.js +1 -0
- package/{phpastgen.js → packages/atom-parsetools/phpastgen.js} +1 -1
- package/{rbastgen.js → packages/atom-parsetools/rbastgen.js} +1 -1
- package/{scalasem.js → packages/atom-parsetools/scalasem.js} +1 -1
- package/plugins/bin/atom +1 -1
- package/plugins/bin/atom.bat +1 -1
- package/plugins/lib/io.appthreat.atom-2.2.1-classpath.jar +0 -0
- package/plugins/lib/{io.appthreat.atom-2.1.19.jar → io.appthreat.atom-2.2.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.c2cpg_3-2.3.10.jar → io.appthreat.c2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.dataflowengineoss_3-2.3.10.jar → io.appthreat.dataflowengineoss_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.javasrc2cpg_3-2.3.10.jar → io.appthreat.javasrc2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.jimple2cpg_3-2.3.10.jar → io.appthreat.jimple2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.jssrc2cpg_3-2.3.10.jar → io.appthreat.jssrc2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.php2atom_3-2.3.10.jar → io.appthreat.php2atom_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.pysrc2cpg_3-2.3.10.jar → io.appthreat.pysrc2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.ruby2atom_3-2.3.10.jar → io.appthreat.ruby2atom_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.semanticcpg_3-2.3.10.jar → io.appthreat.semanticcpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.x2cpg_3-2.3.10.jar → io.appthreat.x2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.circe.circe-core_3-0.14.12.jar → io.circe.circe-core_3-0.14.13.jar} +0 -0
- package/plugins/lib/{io.circe.circe-generic_3-0.14.12.jar → io.circe.circe-generic_3-0.14.13.jar} +0 -0
- package/plugins/lib/{io.circe.circe-jawn_3-0.14.12.jar → io.circe.circe-jawn_3-0.14.13.jar} +0 -0
- package/plugins/lib/{io.circe.circe-numbers_3-0.14.12.jar → io.circe.circe-numbers_3-0.14.13.jar} +0 -0
- package/plugins/lib/{io.circe.circe-parser_3-0.14.12.jar → io.circe.circe-parser_3-0.14.13.jar} +0 -0
- package/plugins/lib/{org.scala-lang.scala3-library_3-3.6.2.jar → org.scala-lang.scala3-library_3-3.6.4.jar} +0 -0
- package/plugins/autoload.php +0 -22
- package/plugins/bin/bundler +0 -14
- package/plugins/bin/php-parse +0 -119
- package/plugins/bin/ruby_ast_gen +0 -14
- package/plugins/composer/ClassLoader.php +0 -579
- package/plugins/composer/InstalledVersions.php +0 -396
- package/plugins/composer/autoload_classmap.php +0 -260
- package/plugins/composer/autoload_namespaces.php +0 -9
- package/plugins/composer/autoload_psr4.php +0 -10
- package/plugins/composer/autoload_real.php +0 -36
- package/plugins/composer/autoload_static.php +0 -286
- package/plugins/composer/installed.json +0 -65
- package/plugins/composer/installed.php +0 -32
- package/plugins/lib/io.appthreat.atom-2.1.19-classpath.jar +0 -0
- package/plugins/nikic/php-parser/LICENSE +0 -29
- package/plugins/nikic/php-parser/README.md +0 -225
- package/plugins/nikic/php-parser/bin/php-parse +0 -205
- package/plugins/nikic/php-parser/composer.json +0 -41
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php +0 -148
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Class_.php +0 -146
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +0 -43
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +0 -85
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +0 -117
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +0 -73
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Function_.php +0 -67
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +0 -93
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Method.php +0 -146
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +0 -45
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Param.php +0 -168
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Property.php +0 -161
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +0 -64
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +0 -148
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +0 -78
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Use_.php +0 -49
- package/plugins/nikic/php-parser/lib/PhpParser/Builder.php +0 -13
- package/plugins/nikic/php-parser/lib/PhpParser/BuilderFactory.php +0 -399
- package/plugins/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +0 -335
- package/plugins/nikic/php-parser/lib/PhpParser/Comment/Doc.php +0 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Comment.php +0 -239
- package/plugins/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php +0 -6
- package/plugins/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php +0 -229
- package/plugins/nikic/php-parser/lib/PhpParser/Error.php +0 -180
- package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php +0 -46
- package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +0 -18
- package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler.php +0 -13
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php +0 -27
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/Differ.php +0 -164
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +0 -64
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +0 -286
- package/plugins/nikic/php-parser/lib/PhpParser/JsonDecoder.php +0 -103
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +0 -251
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +0 -56
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +0 -47
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +0 -31
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +0 -44
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +0 -76
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +0 -23
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +0 -62
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +0 -23
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +0 -67
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +0 -105
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php +0 -31
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +0 -36
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +0 -36
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +0 -25
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer.php +0 -560
- package/plugins/nikic/php-parser/lib/PhpParser/NameContext.php +0 -285
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Arg.php +0 -46
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Attribute.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +0 -29
- package/plugins/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +0 -14
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Const_.php +0 -37
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +0 -41
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +0 -79
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +0 -40
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +0 -39
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +0 -17
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php +0 -12
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +0 -26
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +0 -36
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +0 -79
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +0 -31
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +0 -31
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +0 -39
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +0 -39
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +0 -35
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +0 -31
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +0 -45
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +0 -41
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +0 -45
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +0 -35
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +0 -35
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +0 -46
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +0 -36
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +0 -38
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr.php +0 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +0 -43
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Identifier.php +0 -75
- package/plugins/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +0 -31
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +0 -50
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +0 -50
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Name.php +0 -254
- package/plugins/nikic/php-parser/lib/PhpParser/Node/NullableType.php +0 -28
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Param.php +0 -60
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +0 -77
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +0 -31
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +0 -80
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +0 -16
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +0 -28
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +0 -157
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar.php +0 -7
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +0 -41
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +0 -85
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +0 -109
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +0 -161
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +0 -137
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +0 -37
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +0 -40
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +0 -33
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +0 -43
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +0 -47
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +0 -77
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +0 -31
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +0 -39
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +0 -43
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +0 -37
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +0 -31
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +0 -38
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +0 -17
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +0 -91
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +0 -37
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +0 -38
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +0 -13
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +0 -32
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +0 -38
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +0 -30
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +0 -52
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +0 -47
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +0 -34
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt.php +0 -9
- package/plugins/nikic/php-parser/lib/PhpParser/Node/UnionType.php +0 -28
- package/plugins/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +0 -17
- package/plugins/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php +0 -27
- package/plugins/nikic/php-parser/lib/PhpParser/Node.php +0 -151
- package/plugins/nikic/php-parser/lib/PhpParser/NodeAbstract.php +0 -178
- package/plugins/nikic/php-parser/lib/PhpParser/NodeDumper.php +0 -206
- package/plugins/nikic/php-parser/lib/PhpParser/NodeFinder.php +0 -81
- package/plugins/nikic/php-parser/lib/PhpParser/NodeTraverser.php +0 -291
- package/plugins/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +0 -29
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +0 -20
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +0 -48
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +0 -50
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +0 -260
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +0 -52
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +0 -41
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor.php +0 -72
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +0 -25
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +0 -55
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php5.php +0 -2682
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php7.php +0 -2898
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +0 -148
- package/plugins/nikic/php-parser/lib/PhpParser/Parser.php +0 -18
- package/plugins/nikic/php-parser/lib/PhpParser/ParserAbstract.php +0 -1060
- package/plugins/nikic/php-parser/lib/PhpParser/ParserFactory.php +0 -76
- package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +0 -1126
- package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +0 -1576
- package/plugins/rubyastgen/.bundle/config +0 -5
- package/plugins/rubyastgen/Gemfile +0 -12
- package/plugins/rubyastgen/Gemfile.lock +0 -34
- package/plugins/rubyastgen/bundle/bundler/setup.rb +0 -42
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/racc +0 -29
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/ruby-parse +0 -29
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/ruby-rewrite +0 -29
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/ruby_ast_gen +0 -29
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/.rspec +0 -3
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/Gemfile +0 -10
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/LICENSE.txt +0 -213
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/README.md +0 -46
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/Rakefile +0 -8
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/bin/console +0 -11
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/bin/setup +0 -6
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/exe/ruby_ast_gen +0 -59
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/lib/ruby_ast_gen/node_handling.rb +0 -232
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/lib/ruby_ast_gen/version.rb +0 -5
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/lib/ruby_ast_gen.rb +0 -140
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/ruby_ast_gen.gemspec +0 -25
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/spec/ruby_ast_gen_spec.rb +0 -175
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/spec/spec_helper.rb +0 -15
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/update_version.rb +0 -36
- 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 +0 -18
- 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.3/LICENSE.MIT +0 -20
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/README.YARD.md +0 -12
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast/node.rb +0 -268
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast/processor/mixin.rb +0 -288
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast/processor.rb +0 -12
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast/sexp.rb +0 -30
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast.rb +0 -17
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/BSDL +0 -22
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/COPYING +0 -56
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/Gemfile +0 -10
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/README.md +0 -69
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/Rakefile +0 -18
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/bin/console +0 -14
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/bin/setup +0 -8
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/lib/ostruct.rb +0 -489
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/ostruct.gemspec +0 -24
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/LICENSE.txt +0 -26
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/bin/ruby-parse +0 -7
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/bin/ruby-rewrite +0 -7
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/gauntlet_parser.rb +0 -123
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/all.rb +0 -17
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ast/node.rb +0 -40
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ast/processor.rb +0 -293
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/base.rb +0 -294
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/builders/default.rb +0 -2351
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/clobbering_error.rb +0 -13
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/color.rb +0 -32
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/context.rb +0 -51
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/current.rb +0 -146
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/current_arg_stack.rb +0 -46
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/deprecation.rb +0 -13
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/diagnostic/engine.rb +0 -104
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/diagnostic.rb +0 -163
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer/dedenter.rb +0 -88
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer/explanation.rb +0 -55
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer/literal.rb +0 -284
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer/stack_state.rb +0 -49
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer-F0.rb +0 -12931
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer-F1.rb +0 -14884
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer-strings.rb +0 -5433
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/macruby.rb +0 -9634
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/max_numparam_stack.rb +0 -56
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/messages.rb +0 -125
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/meta.rb +0 -48
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/rewriter.rb +0 -105
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby18.rb +0 -9272
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby19.rb +0 -9558
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby20.rb +0 -10229
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby21.rb +0 -10203
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby22.rb +0 -10302
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby23.rb +0 -10322
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby24.rb +0 -10454
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby25.rb +0 -10374
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby26.rb +0 -10352
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby27.rb +0 -11948
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby30.rb +0 -12244
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby31.rb +0 -12717
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby32.rb +0 -12705
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby33.rb +0 -12590
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby34.rb +0 -12597
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/rubymotion.rb +0 -9515
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/runner/ruby_parse.rb +0 -157
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/runner/ruby_rewrite.rb +0 -101
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/runner.rb +0 -299
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/buffer.rb +0 -369
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/comment/associator.rb +0 -233
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/comment.rb +0 -134
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/collection.rb +0 -18
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/condition.rb +0 -21
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/constant.rb +0 -32
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/definition.rb +0 -23
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/for.rb +0 -19
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/heredoc.rb +0 -19
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/index.rb +0 -33
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/keyword.rb +0 -20
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/method_definition.rb +0 -25
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/objc_kwarg.rb +0 -19
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/operator.rb +0 -17
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/rescue_body.rb +0 -21
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/send.rb +0 -36
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/ternary.rb +0 -18
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/variable.rb +0 -31
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map.rb +0 -186
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/range.rb +0 -326
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/rewriter/action.rb +0 -44
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/rewriter.rb +0 -513
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/tree_rewriter/action.rb +0 -243
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/tree_rewriter.rb +0 -431
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/static_environment.rb +0 -134
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/syntax_error.rb +0 -21
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/tree_rewriter.rb +0 -133
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/unknown_encoding_in_magic_comment_error.rb +0 -15
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/variables_stack.rb +0 -36
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/version.rb +0 -5
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser.rb +0 -91
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/parser.gemspec +0 -43
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/BSDL +0 -22
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/COPYING +0 -56
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ChangeLog +0 -846
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/README.ja.rdoc +0 -58
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/README.rdoc +0 -60
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/TODO +0 -5
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/bin/racc +0 -320
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/en/grammar.en.rdoc +0 -218
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/en/grammar2.en.rdoc +0 -219
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/command.ja.html +0 -99
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/debug.ja.rdoc +0 -36
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/grammar.ja.rdoc +0 -348
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/index.ja.html +0 -10
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/parser.ja.rdoc +0 -125
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/usage.ja.html +0 -414
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +0 -273
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/cparse.c +0 -840
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/extconf.rb +0 -8
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/compat.rb +0 -33
- 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 +0 -60
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/exception.rb +0 -16
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/grammar.rb +0 -1191
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/grammarfileparser.rb +0 -667
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/info.rb +0 -18
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/iset.rb +0 -92
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/logfilegenerator.rb +0 -212
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/parser-text.rb +0 -644
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/parser.rb +0 -630
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/parserfilegenerator.rb +0 -473
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/sourcetext.rb +0 -35
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/state.rb +0 -976
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/statetransitiontable.rb +0 -311
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/static.rb +0 -5
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc.rb +0 -6
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/ast-2.4.3.gemspec +0 -29
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/ostruct-0.6.1.gemspec +0 -21
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/parser-3.3.8.0.gemspec +0 -37
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/racc-1.8.1.gemspec +0 -28
- package/plugins/rubyastgen/setup.ps1 +0 -4
- package/plugins/rubyastgen/setup.sh +0 -6
- package/utils.mjs +0 -139
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# OpenStruct [](https://badge.fury.io/rb/ostruct) [](https://stdgems.org/ostruct/) [](https://github.com/ruby/ostruct/actions?query=workflow%3Atest)
|
|
2
|
-
|
|
3
|
-
An OpenStruct is a data structure, similar to a Hash, that allows the definition of arbitrary attributes with their accompanying values. This is accomplished by using Ruby's metaprogramming to define methods on the class itself.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
The `ostruct` library comes pre-packaged with Ruby. No installation is necessary.
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
```ruby
|
|
12
|
-
require "ostruct"
|
|
13
|
-
|
|
14
|
-
person = OpenStruct.new
|
|
15
|
-
person.name = "John Smith"
|
|
16
|
-
person.age = 70
|
|
17
|
-
|
|
18
|
-
person.name # => "John Smith"
|
|
19
|
-
person.age # => 70
|
|
20
|
-
person.address # => nil
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
An OpenStruct employs a Hash internally to store the attributes and values and can even be initialized with one:
|
|
24
|
-
|
|
25
|
-
```ruby
|
|
26
|
-
australia = OpenStruct.new(:country => "Australia", :capital => "Canberra")
|
|
27
|
-
# => #<OpenStruct country="Australia", capital="Canberra">
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Hash keys with spaces or characters that could normally not be used for method calls (e.g. <code>()[]*</code>) will not be immediately available on the OpenStruct object as a method for retrieval or assignment, but can still be reached through the Object#send method.
|
|
31
|
-
|
|
32
|
-
```ruby
|
|
33
|
-
measurements = OpenStruct.new("length (in inches)" => 24)
|
|
34
|
-
measurements.send("length (in inches)") # => 24
|
|
35
|
-
|
|
36
|
-
message = OpenStruct.new(:queued? => true)
|
|
37
|
-
message.queued? # => true
|
|
38
|
-
message.send("queued?=", false)
|
|
39
|
-
message.queued? # => false
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Removing the presence of an attribute requires the execution of the delete_field method as setting the property value to +nil+ will not remove the attribute.
|
|
43
|
-
|
|
44
|
-
```ruby
|
|
45
|
-
first_pet = OpenStruct.new(:name => "Rowdy", :owner => "John Smith")
|
|
46
|
-
second_pet = OpenStruct.new(:name => "Rowdy")
|
|
47
|
-
|
|
48
|
-
first_pet.owner = nil
|
|
49
|
-
first_pet # => #<OpenStruct name="Rowdy", owner=nil>
|
|
50
|
-
first_pet == second_pet # => false
|
|
51
|
-
|
|
52
|
-
first_pet.delete_field(:owner)
|
|
53
|
-
first_pet # => #<OpenStruct name="Rowdy">
|
|
54
|
-
first_pet == second_pet # => true
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Development
|
|
58
|
-
|
|
59
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
60
|
-
|
|
61
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
62
|
-
|
|
63
|
-
## Contributing
|
|
64
|
-
|
|
65
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/ostruct.
|
|
66
|
-
|
|
67
|
-
## License
|
|
68
|
-
|
|
69
|
-
The gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
task :release do
|
|
2
|
-
cur = `git branch --show-current`.chomp
|
|
3
|
-
if cur != 'master'
|
|
4
|
-
puts 'Release only from master branch'
|
|
5
|
-
exit(-1)
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
require "bundler/gem_tasks"
|
|
10
|
-
require "rake/testtask"
|
|
11
|
-
|
|
12
|
-
Rake::TestTask.new(:test) do |t|
|
|
13
|
-
t.libs << "test/lib"
|
|
14
|
-
t.ruby_opts << "-rhelper"
|
|
15
|
-
t.test_files = FileList["test/**/test_*.rb"]
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
task :default => [:test]
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require "bundler/setup"
|
|
4
|
-
require "ostruct"
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
# require "pry"
|
|
11
|
-
# Pry.start
|
|
12
|
-
|
|
13
|
-
require "irb"
|
|
14
|
-
IRB.start(__FILE__)
|
|
@@ -1,489 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
#
|
|
3
|
-
# = ostruct.rb: OpenStruct implementation
|
|
4
|
-
#
|
|
5
|
-
# Author:: Yukihiro Matsumoto
|
|
6
|
-
# Documentation:: Gavin Sinclair
|
|
7
|
-
#
|
|
8
|
-
# OpenStruct allows the creation of data objects with arbitrary attributes.
|
|
9
|
-
# See OpenStruct for an example.
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
#
|
|
13
|
-
# An OpenStruct is a data structure, similar to a Hash, that allows the
|
|
14
|
-
# definition of arbitrary attributes with their accompanying values. This is
|
|
15
|
-
# accomplished by using Ruby's metaprogramming to define methods on the class
|
|
16
|
-
# itself.
|
|
17
|
-
#
|
|
18
|
-
# == Examples
|
|
19
|
-
#
|
|
20
|
-
# require "ostruct"
|
|
21
|
-
#
|
|
22
|
-
# person = OpenStruct.new
|
|
23
|
-
# person.name = "John Smith"
|
|
24
|
-
# person.age = 70
|
|
25
|
-
#
|
|
26
|
-
# person.name # => "John Smith"
|
|
27
|
-
# person.age # => 70
|
|
28
|
-
# person.address # => nil
|
|
29
|
-
#
|
|
30
|
-
# An OpenStruct employs a Hash internally to store the attributes and values
|
|
31
|
-
# and can even be initialized with one:
|
|
32
|
-
#
|
|
33
|
-
# australia = OpenStruct.new(:country => "Australia", :capital => "Canberra")
|
|
34
|
-
# # => #<OpenStruct country="Australia", capital="Canberra">
|
|
35
|
-
#
|
|
36
|
-
# Hash keys with spaces or characters that could normally not be used for
|
|
37
|
-
# method calls (e.g. <code>()[]*</code>) will not be immediately available
|
|
38
|
-
# on the OpenStruct object as a method for retrieval or assignment, but can
|
|
39
|
-
# still be reached through the Object#send method or using [].
|
|
40
|
-
#
|
|
41
|
-
# measurements = OpenStruct.new("length (in inches)" => 24)
|
|
42
|
-
# measurements[:"length (in inches)"] # => 24
|
|
43
|
-
# measurements.send("length (in inches)") # => 24
|
|
44
|
-
#
|
|
45
|
-
# message = OpenStruct.new(:queued? => true)
|
|
46
|
-
# message.queued? # => true
|
|
47
|
-
# message.send("queued?=", false)
|
|
48
|
-
# message.queued? # => false
|
|
49
|
-
#
|
|
50
|
-
# Removing the presence of an attribute requires the execution of the
|
|
51
|
-
# delete_field method as setting the property value to +nil+ will not
|
|
52
|
-
# remove the attribute.
|
|
53
|
-
#
|
|
54
|
-
# first_pet = OpenStruct.new(:name => "Rowdy", :owner => "John Smith")
|
|
55
|
-
# second_pet = OpenStruct.new(:name => "Rowdy")
|
|
56
|
-
#
|
|
57
|
-
# first_pet.owner = nil
|
|
58
|
-
# first_pet # => #<OpenStruct name="Rowdy", owner=nil>
|
|
59
|
-
# first_pet == second_pet # => false
|
|
60
|
-
#
|
|
61
|
-
# first_pet.delete_field(:owner)
|
|
62
|
-
# first_pet # => #<OpenStruct name="Rowdy">
|
|
63
|
-
# first_pet == second_pet # => true
|
|
64
|
-
#
|
|
65
|
-
# Ractor compatibility: A frozen OpenStruct with shareable values is itself shareable.
|
|
66
|
-
#
|
|
67
|
-
# == Caveats
|
|
68
|
-
#
|
|
69
|
-
# An OpenStruct utilizes Ruby's method lookup structure to find and define the
|
|
70
|
-
# necessary methods for properties. This is accomplished through the methods
|
|
71
|
-
# method_missing and define_singleton_method.
|
|
72
|
-
#
|
|
73
|
-
# This should be a consideration if there is a concern about the performance of
|
|
74
|
-
# the objects that are created, as there is much more overhead in the setting
|
|
75
|
-
# of these properties compared to using a Hash or a Struct.
|
|
76
|
-
# Creating an open struct from a small Hash and accessing a few of the
|
|
77
|
-
# entries can be 200 times slower than accessing the hash directly.
|
|
78
|
-
#
|
|
79
|
-
# This is a potential security issue; building OpenStruct from untrusted user data
|
|
80
|
-
# (e.g. JSON web request) may be susceptible to a "symbol denial of service" attack
|
|
81
|
-
# since the keys create methods and names of methods are never garbage collected.
|
|
82
|
-
#
|
|
83
|
-
# This may also be the source of incompatibilities between Ruby versions:
|
|
84
|
-
#
|
|
85
|
-
# o = OpenStruct.new
|
|
86
|
-
# o.then # => nil in Ruby < 2.6, enumerator for Ruby >= 2.6
|
|
87
|
-
#
|
|
88
|
-
# Builtin methods may be overwritten this way, which may be a source of bugs
|
|
89
|
-
# or security issues:
|
|
90
|
-
#
|
|
91
|
-
# o = OpenStruct.new
|
|
92
|
-
# o.methods # => [:to_h, :marshal_load, :marshal_dump, :each_pair, ...
|
|
93
|
-
# o.methods = [:foo, :bar]
|
|
94
|
-
# o.methods # => [:foo, :bar]
|
|
95
|
-
#
|
|
96
|
-
# To help remedy clashes, OpenStruct uses only protected/private methods ending with <code>!</code>
|
|
97
|
-
# and defines aliases for builtin public methods by adding a <code>!</code>:
|
|
98
|
-
#
|
|
99
|
-
# o = OpenStruct.new(make: 'Bentley', class: :luxury)
|
|
100
|
-
# o.class # => :luxury
|
|
101
|
-
# o.class! # => OpenStruct
|
|
102
|
-
#
|
|
103
|
-
# It is recommended (but not enforced) to not use fields ending in <code>!</code>;
|
|
104
|
-
# Note that a subclass' methods may not be overwritten, nor can OpenStruct's own methods
|
|
105
|
-
# ending with <code>!</code>.
|
|
106
|
-
#
|
|
107
|
-
# For all these reasons, consider not using OpenStruct at all.
|
|
108
|
-
#
|
|
109
|
-
class OpenStruct
|
|
110
|
-
VERSION = "0.6.1"
|
|
111
|
-
|
|
112
|
-
HAS_PERFORMANCE_WARNINGS = begin
|
|
113
|
-
Warning[:performance]
|
|
114
|
-
true
|
|
115
|
-
rescue NoMethodError, ArgumentError
|
|
116
|
-
false
|
|
117
|
-
end
|
|
118
|
-
private_constant :HAS_PERFORMANCE_WARNINGS
|
|
119
|
-
|
|
120
|
-
#
|
|
121
|
-
# Creates a new OpenStruct object. By default, the resulting OpenStruct
|
|
122
|
-
# object will have no attributes.
|
|
123
|
-
#
|
|
124
|
-
# The optional +hash+, if given, will generate attributes and values
|
|
125
|
-
# (can be a Hash, an OpenStruct or a Struct).
|
|
126
|
-
# For example:
|
|
127
|
-
#
|
|
128
|
-
# require "ostruct"
|
|
129
|
-
# hash = { "country" => "Australia", :capital => "Canberra" }
|
|
130
|
-
# data = OpenStruct.new(hash)
|
|
131
|
-
#
|
|
132
|
-
# data # => #<OpenStruct country="Australia", capital="Canberra">
|
|
133
|
-
#
|
|
134
|
-
def initialize(hash=nil)
|
|
135
|
-
if HAS_PERFORMANCE_WARNINGS && Warning[:performance]
|
|
136
|
-
warn "OpenStruct use is discouraged for performance reasons", uplevel: 1, category: :performance
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
if hash
|
|
140
|
-
update_to_values!(hash)
|
|
141
|
-
else
|
|
142
|
-
@table = {}
|
|
143
|
-
end
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# Duplicates an OpenStruct object's Hash table.
|
|
147
|
-
private def initialize_clone(orig) # :nodoc:
|
|
148
|
-
super # clones the singleton class for us
|
|
149
|
-
@table = @table.dup unless @table.frozen?
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
private def initialize_dup(orig) # :nodoc:
|
|
153
|
-
super
|
|
154
|
-
update_to_values!(@table)
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
private def update_to_values!(hash) # :nodoc:
|
|
158
|
-
@table = {}
|
|
159
|
-
hash.each_pair do |k, v|
|
|
160
|
-
set_ostruct_member_value!(k, v)
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
#
|
|
165
|
-
# call-seq:
|
|
166
|
-
# ostruct.to_h -> hash
|
|
167
|
-
# ostruct.to_h {|name, value| block } -> hash
|
|
168
|
-
#
|
|
169
|
-
# Converts the OpenStruct to a hash with keys representing
|
|
170
|
-
# each attribute (as symbols) and their corresponding values.
|
|
171
|
-
#
|
|
172
|
-
# If a block is given, the results of the block on each pair of
|
|
173
|
-
# the receiver will be used as pairs.
|
|
174
|
-
#
|
|
175
|
-
# require "ostruct"
|
|
176
|
-
# data = OpenStruct.new("country" => "Australia", :capital => "Canberra")
|
|
177
|
-
# data.to_h # => {:country => "Australia", :capital => "Canberra" }
|
|
178
|
-
# data.to_h {|name, value| [name.to_s, value.upcase] }
|
|
179
|
-
# # => {"country" => "AUSTRALIA", "capital" => "CANBERRA" }
|
|
180
|
-
#
|
|
181
|
-
if {test: :to_h}.to_h{ [:works, true] }[:works] # RUBY_VERSION < 2.6 compatibility
|
|
182
|
-
def to_h(&block)
|
|
183
|
-
if block
|
|
184
|
-
@table.to_h(&block)
|
|
185
|
-
else
|
|
186
|
-
@table.dup
|
|
187
|
-
end
|
|
188
|
-
end
|
|
189
|
-
else
|
|
190
|
-
def to_h(&block)
|
|
191
|
-
if block
|
|
192
|
-
@table.map(&block).to_h
|
|
193
|
-
else
|
|
194
|
-
@table.dup
|
|
195
|
-
end
|
|
196
|
-
end
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
#
|
|
200
|
-
# :call-seq:
|
|
201
|
-
# ostruct.each_pair {|name, value| block } -> ostruct
|
|
202
|
-
# ostruct.each_pair -> Enumerator
|
|
203
|
-
#
|
|
204
|
-
# Yields all attributes (as symbols) along with the corresponding values
|
|
205
|
-
# or returns an enumerator if no block is given.
|
|
206
|
-
#
|
|
207
|
-
# require "ostruct"
|
|
208
|
-
# data = OpenStruct.new("country" => "Australia", :capital => "Canberra")
|
|
209
|
-
# data.each_pair.to_a # => [[:country, "Australia"], [:capital, "Canberra"]]
|
|
210
|
-
#
|
|
211
|
-
def each_pair
|
|
212
|
-
return to_enum(__method__) { @table.size } unless defined?(yield)
|
|
213
|
-
@table.each_pair{|p| yield p}
|
|
214
|
-
self
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
#
|
|
218
|
-
# Provides marshalling support for use by the Marshal library.
|
|
219
|
-
#
|
|
220
|
-
def marshal_dump # :nodoc:
|
|
221
|
-
@table
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
#
|
|
225
|
-
# Provides marshalling support for use by the Marshal library.
|
|
226
|
-
#
|
|
227
|
-
alias_method :marshal_load, :update_to_values! # :nodoc:
|
|
228
|
-
|
|
229
|
-
#
|
|
230
|
-
# Used internally to defined properties on the
|
|
231
|
-
# OpenStruct. It does this by using the metaprogramming function
|
|
232
|
-
# define_singleton_method for both the getter method and the setter method.
|
|
233
|
-
#
|
|
234
|
-
def new_ostruct_member!(name) # :nodoc:
|
|
235
|
-
unless @table.key?(name) || is_method_protected!(name)
|
|
236
|
-
if defined?(::Ractor)
|
|
237
|
-
getter_proc = nil.instance_eval{ Proc.new { @table[name] } }
|
|
238
|
-
setter_proc = nil.instance_eval{ Proc.new {|x| @table[name] = x} }
|
|
239
|
-
::Ractor.make_shareable(getter_proc)
|
|
240
|
-
::Ractor.make_shareable(setter_proc)
|
|
241
|
-
else
|
|
242
|
-
getter_proc = Proc.new { @table[name] }
|
|
243
|
-
setter_proc = Proc.new {|x| @table[name] = x}
|
|
244
|
-
end
|
|
245
|
-
define_singleton_method!(name, &getter_proc)
|
|
246
|
-
define_singleton_method!("#{name}=", &setter_proc)
|
|
247
|
-
end
|
|
248
|
-
end
|
|
249
|
-
private :new_ostruct_member!
|
|
250
|
-
|
|
251
|
-
private def is_method_protected!(name) # :nodoc:
|
|
252
|
-
if !respond_to?(name, true)
|
|
253
|
-
false
|
|
254
|
-
elsif name.match?(/!$/)
|
|
255
|
-
true
|
|
256
|
-
else
|
|
257
|
-
owner = method!(name).owner
|
|
258
|
-
if owner.class == ::Class
|
|
259
|
-
owner < ::OpenStruct
|
|
260
|
-
else
|
|
261
|
-
self.class!.ancestors.any? do |mod|
|
|
262
|
-
return false if mod == ::OpenStruct
|
|
263
|
-
mod == owner
|
|
264
|
-
end
|
|
265
|
-
end
|
|
266
|
-
end
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
def freeze
|
|
270
|
-
@table.freeze
|
|
271
|
-
super
|
|
272
|
-
end
|
|
273
|
-
|
|
274
|
-
private def method_missing(mid, *args) # :nodoc:
|
|
275
|
-
len = args.length
|
|
276
|
-
if mname = mid[/.*(?==\z)/m]
|
|
277
|
-
if len != 1
|
|
278
|
-
raise! ArgumentError, "wrong number of arguments (given #{len}, expected 1)", caller(1)
|
|
279
|
-
end
|
|
280
|
-
set_ostruct_member_value!(mname, args[0])
|
|
281
|
-
elsif len == 0
|
|
282
|
-
@table[mid]
|
|
283
|
-
else
|
|
284
|
-
begin
|
|
285
|
-
super
|
|
286
|
-
rescue NoMethodError => err
|
|
287
|
-
err.backtrace.shift
|
|
288
|
-
raise!
|
|
289
|
-
end
|
|
290
|
-
end
|
|
291
|
-
end
|
|
292
|
-
|
|
293
|
-
#
|
|
294
|
-
# :call-seq:
|
|
295
|
-
# ostruct[name] -> object
|
|
296
|
-
#
|
|
297
|
-
# Returns the value of an attribute, or +nil+ if there is no such attribute.
|
|
298
|
-
#
|
|
299
|
-
# require "ostruct"
|
|
300
|
-
# person = OpenStruct.new("name" => "John Smith", "age" => 70)
|
|
301
|
-
# person[:age] # => 70, same as person.age
|
|
302
|
-
#
|
|
303
|
-
def [](name)
|
|
304
|
-
@table[name.to_sym]
|
|
305
|
-
end
|
|
306
|
-
|
|
307
|
-
#
|
|
308
|
-
# :call-seq:
|
|
309
|
-
# ostruct[name] = obj -> obj
|
|
310
|
-
#
|
|
311
|
-
# Sets the value of an attribute.
|
|
312
|
-
#
|
|
313
|
-
# require "ostruct"
|
|
314
|
-
# person = OpenStruct.new("name" => "John Smith", "age" => 70)
|
|
315
|
-
# person[:age] = 42 # equivalent to person.age = 42
|
|
316
|
-
# person.age # => 42
|
|
317
|
-
#
|
|
318
|
-
def []=(name, value)
|
|
319
|
-
name = name.to_sym
|
|
320
|
-
new_ostruct_member!(name)
|
|
321
|
-
@table[name] = value
|
|
322
|
-
end
|
|
323
|
-
alias_method :set_ostruct_member_value!, :[]=
|
|
324
|
-
private :set_ostruct_member_value!
|
|
325
|
-
|
|
326
|
-
# :call-seq:
|
|
327
|
-
# ostruct.dig(name, *identifiers) -> object
|
|
328
|
-
#
|
|
329
|
-
# Finds and returns the object in nested objects
|
|
330
|
-
# that is specified by +name+ and +identifiers+.
|
|
331
|
-
# The nested objects may be instances of various classes.
|
|
332
|
-
# See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
|
|
333
|
-
#
|
|
334
|
-
# Examples:
|
|
335
|
-
# require "ostruct"
|
|
336
|
-
# address = OpenStruct.new("city" => "Anytown NC", "zip" => 12345)
|
|
337
|
-
# person = OpenStruct.new("name" => "John Smith", "address" => address)
|
|
338
|
-
# person.dig(:address, "zip") # => 12345
|
|
339
|
-
# person.dig(:business_address, "zip") # => nil
|
|
340
|
-
def dig(name, *names)
|
|
341
|
-
begin
|
|
342
|
-
name = name.to_sym
|
|
343
|
-
rescue NoMethodError
|
|
344
|
-
raise! TypeError, "#{name} is not a symbol nor a string"
|
|
345
|
-
end
|
|
346
|
-
@table.dig(name, *names)
|
|
347
|
-
end
|
|
348
|
-
|
|
349
|
-
#
|
|
350
|
-
# Removes the named field from the object and returns the value the field
|
|
351
|
-
# contained if it was defined. You may optionally provide a block.
|
|
352
|
-
# If the field is not defined, the result of the block is returned,
|
|
353
|
-
# or a NameError is raised if no block was given.
|
|
354
|
-
#
|
|
355
|
-
# require "ostruct"
|
|
356
|
-
#
|
|
357
|
-
# person = OpenStruct.new(name: "John", age: 70, pension: 300)
|
|
358
|
-
#
|
|
359
|
-
# person.delete_field!("age") # => 70
|
|
360
|
-
# person # => #<OpenStruct name="John", pension=300>
|
|
361
|
-
#
|
|
362
|
-
# Setting the value to +nil+ will not remove the attribute:
|
|
363
|
-
#
|
|
364
|
-
# person.pension = nil
|
|
365
|
-
# person # => #<OpenStruct name="John", pension=nil>
|
|
366
|
-
#
|
|
367
|
-
# person.delete_field('number') # => NameError
|
|
368
|
-
#
|
|
369
|
-
# person.delete_field('number') { 8675_309 } # => 8675309
|
|
370
|
-
#
|
|
371
|
-
def delete_field(name, &block)
|
|
372
|
-
sym = name.to_sym
|
|
373
|
-
begin
|
|
374
|
-
singleton_class.remove_method(sym, "#{sym}=")
|
|
375
|
-
rescue NameError
|
|
376
|
-
end
|
|
377
|
-
@table.delete(sym) do
|
|
378
|
-
return yield if block
|
|
379
|
-
raise! NameError.new("no field '#{sym}' in #{self}", sym)
|
|
380
|
-
end
|
|
381
|
-
end
|
|
382
|
-
|
|
383
|
-
InspectKey = :__inspect_key__ # :nodoc:
|
|
384
|
-
|
|
385
|
-
#
|
|
386
|
-
# Returns a string containing a detailed summary of the keys and values.
|
|
387
|
-
#
|
|
388
|
-
def inspect
|
|
389
|
-
ids = (Thread.current[InspectKey] ||= [])
|
|
390
|
-
if ids.include?(object_id)
|
|
391
|
-
detail = ' ...'
|
|
392
|
-
else
|
|
393
|
-
ids << object_id
|
|
394
|
-
begin
|
|
395
|
-
detail = @table.map do |key, value|
|
|
396
|
-
" #{key}=#{value.inspect}"
|
|
397
|
-
end.join(',')
|
|
398
|
-
ensure
|
|
399
|
-
ids.pop
|
|
400
|
-
end
|
|
401
|
-
end
|
|
402
|
-
['#<', self.class!, detail, '>'].join
|
|
403
|
-
end
|
|
404
|
-
alias :to_s :inspect
|
|
405
|
-
|
|
406
|
-
attr_reader :table # :nodoc:
|
|
407
|
-
alias table! table
|
|
408
|
-
protected :table!
|
|
409
|
-
|
|
410
|
-
#
|
|
411
|
-
# Compares this object and +other+ for equality. An OpenStruct is equal to
|
|
412
|
-
# +other+ when +other+ is an OpenStruct and the two objects' Hash tables are
|
|
413
|
-
# equal.
|
|
414
|
-
#
|
|
415
|
-
# require "ostruct"
|
|
416
|
-
# first_pet = OpenStruct.new("name" => "Rowdy")
|
|
417
|
-
# second_pet = OpenStruct.new(:name => "Rowdy")
|
|
418
|
-
# third_pet = OpenStruct.new("name" => "Rowdy", :age => nil)
|
|
419
|
-
#
|
|
420
|
-
# first_pet == second_pet # => true
|
|
421
|
-
# first_pet == third_pet # => false
|
|
422
|
-
#
|
|
423
|
-
def ==(other)
|
|
424
|
-
return false unless other.kind_of?(OpenStruct)
|
|
425
|
-
@table == other.table!
|
|
426
|
-
end
|
|
427
|
-
|
|
428
|
-
#
|
|
429
|
-
# Compares this object and +other+ for equality. An OpenStruct is eql? to
|
|
430
|
-
# +other+ when +other+ is an OpenStruct and the two objects' Hash tables are
|
|
431
|
-
# eql?.
|
|
432
|
-
#
|
|
433
|
-
def eql?(other)
|
|
434
|
-
return false unless other.kind_of?(OpenStruct)
|
|
435
|
-
@table.eql?(other.table!)
|
|
436
|
-
end
|
|
437
|
-
|
|
438
|
-
# Computes a hash code for this OpenStruct.
|
|
439
|
-
def hash # :nodoc:
|
|
440
|
-
@table.hash
|
|
441
|
-
end
|
|
442
|
-
|
|
443
|
-
#
|
|
444
|
-
# Provides marshalling support for use by the YAML library.
|
|
445
|
-
#
|
|
446
|
-
def encode_with(coder) # :nodoc:
|
|
447
|
-
@table.each_pair do |key, value|
|
|
448
|
-
coder[key.to_s] = value
|
|
449
|
-
end
|
|
450
|
-
if @table.size == 1 && @table.key?(:table) # support for legacy format
|
|
451
|
-
# in the very unlikely case of a single entry called 'table'
|
|
452
|
-
coder['legacy_support!'] = true # add a bogus second entry
|
|
453
|
-
end
|
|
454
|
-
end
|
|
455
|
-
|
|
456
|
-
#
|
|
457
|
-
# Provides marshalling support for use by the YAML library.
|
|
458
|
-
#
|
|
459
|
-
def init_with(coder) # :nodoc:
|
|
460
|
-
h = coder.map
|
|
461
|
-
if h.size == 1 # support for legacy format
|
|
462
|
-
key, val = h.first
|
|
463
|
-
if key == 'table'
|
|
464
|
-
h = val
|
|
465
|
-
end
|
|
466
|
-
end
|
|
467
|
-
update_to_values!(h)
|
|
468
|
-
end
|
|
469
|
-
|
|
470
|
-
# Make all public methods (builtin or our own) accessible with <code>!</code>:
|
|
471
|
-
give_access = instance_methods
|
|
472
|
-
# See https://github.com/ruby/ostruct/issues/30
|
|
473
|
-
give_access -= %i[instance_exec instance_eval eval] if RUBY_ENGINE == 'jruby'
|
|
474
|
-
give_access.each do |method|
|
|
475
|
-
next if method.match(/\W$/)
|
|
476
|
-
|
|
477
|
-
new_name = "#{method}!"
|
|
478
|
-
alias_method new_name, method
|
|
479
|
-
end
|
|
480
|
-
# Other builtin private methods we use:
|
|
481
|
-
alias_method :raise!, :raise
|
|
482
|
-
private :raise!
|
|
483
|
-
|
|
484
|
-
# See https://github.com/ruby/ostruct/issues/40
|
|
485
|
-
if RUBY_ENGINE != 'jruby'
|
|
486
|
-
alias_method :block_given!, :block_given?
|
|
487
|
-
private :block_given!
|
|
488
|
-
end
|
|
489
|
-
end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
name = File.basename(__FILE__, ".gemspec")
|
|
4
|
-
version = ["lib", Array.new(name.count("-")+1, ".").join("/")].find do |dir|
|
|
5
|
-
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
|
6
|
-
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
|
7
|
-
end rescue nil
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
Gem::Specification.new do |spec|
|
|
11
|
-
spec.name = name
|
|
12
|
-
spec.version = version
|
|
13
|
-
spec.authors = ["Marc-Andre Lafortune"]
|
|
14
|
-
spec.email = ["ruby-core@marc-andre.ca"]
|
|
15
|
-
|
|
16
|
-
spec.summary = %q{Class to build custom data structures, similar to a Hash.}
|
|
17
|
-
spec.description = %q{Class to build custom data structures, similar to a Hash.}
|
|
18
|
-
spec.homepage = "https://github.com/ruby/ostruct"
|
|
19
|
-
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
|
20
|
-
spec.required_ruby_version = ">= 2.5.0"
|
|
21
|
-
|
|
22
|
-
spec.files = [".gitignore", "Gemfile", "COPYING", "BSDL", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/ostruct.rb", "ostruct.gemspec"]
|
|
23
|
-
spec.require_paths = ["lib"]
|
|
24
|
-
end
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2013-2024 parser project contributors
|
|
2
|
-
Copyright (c) 2013-2016 Catherine <whitequark@whitequark.org>
|
|
3
|
-
|
|
4
|
-
Parts of the source are derived from ruby_parser:
|
|
5
|
-
Copyright (c) Ryan Davis, seattle.rb
|
|
6
|
-
|
|
7
|
-
MIT License
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
10
|
-
a copy of this software and associated documentation files (the
|
|
11
|
-
"Software"), to deal in the Software without restriction, including
|
|
12
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
13
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
14
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
15
|
-
the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be
|
|
18
|
-
included in all copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
21
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
22
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
23
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
24
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
25
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
26
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|