@appthreat/atom 2.1.18 → 2.2.0
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.0-classpath.jar +0 -0
- package/plugins/lib/{io.appthreat.atom-2.1.18.jar → io.appthreat.atom-2.2.0.jar} +0 -0
- package/plugins/lib/{io.appthreat.c2cpg_3-2.3.8.jar → io.appthreat.c2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.dataflowengineoss_3-2.3.8.jar → io.appthreat.dataflowengineoss_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.javasrc2cpg_3-2.3.8.jar → io.appthreat.javasrc2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.jimple2cpg_3-2.3.8.jar → io.appthreat.jimple2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.jssrc2cpg_3-2.3.8.jar → io.appthreat.jssrc2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.php2atom_3-2.3.8.jar → io.appthreat.php2atom_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.pysrc2cpg_3-2.3.8.jar → io.appthreat.pysrc2cpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.ruby2atom_3-2.3.8.jar → io.appthreat.ruby2atom_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.semanticcpg_3-2.3.8.jar → io.appthreat.semanticcpg_3-2.4.1.jar} +0 -0
- package/plugins/lib/{io.appthreat.x2cpg_3-2.3.8.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.18-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,64 +0,0 @@
|
|
|
1
|
-
<?php declare(strict_types=1);
|
|
2
|
-
|
|
3
|
-
namespace PhpParser\Internal;
|
|
4
|
-
|
|
5
|
-
use PhpParser\Node;
|
|
6
|
-
use PhpParser\Node\Expr;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* This node is used internally by the format-preserving pretty printer to print anonymous classes.
|
|
10
|
-
*
|
|
11
|
-
* The normal anonymous class structure violates assumptions about the order of token offsets.
|
|
12
|
-
* Namely, the constructor arguments are part of the Expr\New_ node and follow the class node, even
|
|
13
|
-
* though they are actually interleaved with them. This special node type is used temporarily to
|
|
14
|
-
* restore a sane token offset order.
|
|
15
|
-
*
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
18
|
-
class PrintableNewAnonClassNode extends Expr
|
|
19
|
-
{
|
|
20
|
-
/** @var Node\AttributeGroup[] PHP attribute groups */
|
|
21
|
-
public $attrGroups;
|
|
22
|
-
/** @var int Modifiers */
|
|
23
|
-
public $flags;
|
|
24
|
-
/** @var Node\Arg[] Arguments */
|
|
25
|
-
public $args;
|
|
26
|
-
/** @var null|Node\Name Name of extended class */
|
|
27
|
-
public $extends;
|
|
28
|
-
/** @var Node\Name[] Names of implemented interfaces */
|
|
29
|
-
public $implements;
|
|
30
|
-
/** @var Node\Stmt[] Statements */
|
|
31
|
-
public $stmts;
|
|
32
|
-
|
|
33
|
-
public function __construct(
|
|
34
|
-
array $attrGroups, int $flags, array $args, Node\Name $extends = null, array $implements,
|
|
35
|
-
array $stmts, array $attributes
|
|
36
|
-
) {
|
|
37
|
-
parent::__construct($attributes);
|
|
38
|
-
$this->attrGroups = $attrGroups;
|
|
39
|
-
$this->flags = $flags;
|
|
40
|
-
$this->args = $args;
|
|
41
|
-
$this->extends = $extends;
|
|
42
|
-
$this->implements = $implements;
|
|
43
|
-
$this->stmts = $stmts;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
public static function fromNewNode(Expr\New_ $newNode) {
|
|
47
|
-
$class = $newNode->class;
|
|
48
|
-
assert($class instanceof Node\Stmt\Class_);
|
|
49
|
-
// We don't assert that $class->name is null here, to allow consumers to assign unique names
|
|
50
|
-
// to anonymous classes for their own purposes. We simplify ignore the name here.
|
|
51
|
-
return new self(
|
|
52
|
-
$class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements,
|
|
53
|
-
$class->stmts, $newNode->getAttributes()
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
public function getType() : string {
|
|
58
|
-
return 'Expr_PrintableNewAnonClass';
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public function getSubNodeNames() : array {
|
|
62
|
-
return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts'];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
<?php declare(strict_types=1);
|
|
2
|
-
|
|
3
|
-
namespace PhpParser\Internal;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Provides operations on token streams, for use by pretty printer.
|
|
7
|
-
*
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
class TokenStream
|
|
11
|
-
{
|
|
12
|
-
/** @var array Tokens (in token_get_all format) */
|
|
13
|
-
private $tokens;
|
|
14
|
-
/** @var int[] Map from position to indentation */
|
|
15
|
-
private $indentMap;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Create token stream instance.
|
|
19
|
-
*
|
|
20
|
-
* @param array $tokens Tokens in token_get_all() format
|
|
21
|
-
*/
|
|
22
|
-
public function __construct(array $tokens) {
|
|
23
|
-
$this->tokens = $tokens;
|
|
24
|
-
$this->indentMap = $this->calcIndentMap();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Whether the given position is immediately surrounded by parenthesis.
|
|
29
|
-
*
|
|
30
|
-
* @param int $startPos Start position
|
|
31
|
-
* @param int $endPos End position
|
|
32
|
-
*
|
|
33
|
-
* @return bool
|
|
34
|
-
*/
|
|
35
|
-
public function haveParens(int $startPos, int $endPos) : bool {
|
|
36
|
-
return $this->haveTokenImmediatelyBefore($startPos, '(')
|
|
37
|
-
&& $this->haveTokenImmediatelyAfter($endPos, ')');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Whether the given position is immediately surrounded by braces.
|
|
42
|
-
*
|
|
43
|
-
* @param int $startPos Start position
|
|
44
|
-
* @param int $endPos End position
|
|
45
|
-
*
|
|
46
|
-
* @return bool
|
|
47
|
-
*/
|
|
48
|
-
public function haveBraces(int $startPos, int $endPos) : bool {
|
|
49
|
-
return ($this->haveTokenImmediatelyBefore($startPos, '{')
|
|
50
|
-
|| $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN))
|
|
51
|
-
&& $this->haveTokenImmediatelyAfter($endPos, '}');
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Check whether the position is directly preceded by a certain token type.
|
|
56
|
-
*
|
|
57
|
-
* During this check whitespace and comments are skipped.
|
|
58
|
-
*
|
|
59
|
-
* @param int $pos Position before which the token should occur
|
|
60
|
-
* @param int|string $expectedTokenType Token to check for
|
|
61
|
-
*
|
|
62
|
-
* @return bool Whether the expected token was found
|
|
63
|
-
*/
|
|
64
|
-
public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool {
|
|
65
|
-
$tokens = $this->tokens;
|
|
66
|
-
$pos--;
|
|
67
|
-
for (; $pos >= 0; $pos--) {
|
|
68
|
-
$tokenType = $tokens[$pos][0];
|
|
69
|
-
if ($tokenType === $expectedTokenType) {
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
if ($tokenType !== \T_WHITESPACE
|
|
73
|
-
&& $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) {
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Check whether the position is directly followed by a certain token type.
|
|
82
|
-
*
|
|
83
|
-
* During this check whitespace and comments are skipped.
|
|
84
|
-
*
|
|
85
|
-
* @param int $pos Position after which the token should occur
|
|
86
|
-
* @param int|string $expectedTokenType Token to check for
|
|
87
|
-
*
|
|
88
|
-
* @return bool Whether the expected token was found
|
|
89
|
-
*/
|
|
90
|
-
public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool {
|
|
91
|
-
$tokens = $this->tokens;
|
|
92
|
-
$pos++;
|
|
93
|
-
for (; $pos < \count($tokens); $pos++) {
|
|
94
|
-
$tokenType = $tokens[$pos][0];
|
|
95
|
-
if ($tokenType === $expectedTokenType) {
|
|
96
|
-
return true;
|
|
97
|
-
}
|
|
98
|
-
if ($tokenType !== \T_WHITESPACE
|
|
99
|
-
&& $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) {
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
public function skipLeft(int $pos, $skipTokenType) {
|
|
107
|
-
$tokens = $this->tokens;
|
|
108
|
-
|
|
109
|
-
$pos = $this->skipLeftWhitespace($pos);
|
|
110
|
-
if ($skipTokenType === \T_WHITESPACE) {
|
|
111
|
-
return $pos;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if ($tokens[$pos][0] !== $skipTokenType) {
|
|
115
|
-
// Shouldn't happen. The skip token MUST be there
|
|
116
|
-
throw new \Exception('Encountered unexpected token');
|
|
117
|
-
}
|
|
118
|
-
$pos--;
|
|
119
|
-
|
|
120
|
-
return $this->skipLeftWhitespace($pos);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
public function skipRight(int $pos, $skipTokenType) {
|
|
124
|
-
$tokens = $this->tokens;
|
|
125
|
-
|
|
126
|
-
$pos = $this->skipRightWhitespace($pos);
|
|
127
|
-
if ($skipTokenType === \T_WHITESPACE) {
|
|
128
|
-
return $pos;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if ($tokens[$pos][0] !== $skipTokenType) {
|
|
132
|
-
// Shouldn't happen. The skip token MUST be there
|
|
133
|
-
throw new \Exception('Encountered unexpected token');
|
|
134
|
-
}
|
|
135
|
-
$pos++;
|
|
136
|
-
|
|
137
|
-
return $this->skipRightWhitespace($pos);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Return first non-whitespace token position smaller or equal to passed position.
|
|
142
|
-
*
|
|
143
|
-
* @param int $pos Token position
|
|
144
|
-
* @return int Non-whitespace token position
|
|
145
|
-
*/
|
|
146
|
-
public function skipLeftWhitespace(int $pos) {
|
|
147
|
-
$tokens = $this->tokens;
|
|
148
|
-
for (; $pos >= 0; $pos--) {
|
|
149
|
-
$type = $tokens[$pos][0];
|
|
150
|
-
if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) {
|
|
151
|
-
break;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return $pos;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Return first non-whitespace position greater or equal to passed position.
|
|
159
|
-
*
|
|
160
|
-
* @param int $pos Token position
|
|
161
|
-
* @return int Non-whitespace token position
|
|
162
|
-
*/
|
|
163
|
-
public function skipRightWhitespace(int $pos) {
|
|
164
|
-
$tokens = $this->tokens;
|
|
165
|
-
for ($count = \count($tokens); $pos < $count; $pos++) {
|
|
166
|
-
$type = $tokens[$pos][0];
|
|
167
|
-
if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) {
|
|
168
|
-
break;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return $pos;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
public function findRight(int $pos, $findTokenType) {
|
|
175
|
-
$tokens = $this->tokens;
|
|
176
|
-
for ($count = \count($tokens); $pos < $count; $pos++) {
|
|
177
|
-
$type = $tokens[$pos][0];
|
|
178
|
-
if ($type === $findTokenType) {
|
|
179
|
-
return $pos;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return -1;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Whether the given position range contains a certain token type.
|
|
187
|
-
*
|
|
188
|
-
* @param int $startPos Starting position (inclusive)
|
|
189
|
-
* @param int $endPos Ending position (exclusive)
|
|
190
|
-
* @param int|string $tokenType Token type to look for
|
|
191
|
-
* @return bool Whether the token occurs in the given range
|
|
192
|
-
*/
|
|
193
|
-
public function haveTokenInRange(int $startPos, int $endPos, $tokenType) {
|
|
194
|
-
$tokens = $this->tokens;
|
|
195
|
-
for ($pos = $startPos; $pos < $endPos; $pos++) {
|
|
196
|
-
if ($tokens[$pos][0] === $tokenType) {
|
|
197
|
-
return true;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
return false;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
public function haveBracesInRange(int $startPos, int $endPos) {
|
|
204
|
-
return $this->haveTokenInRange($startPos, $endPos, '{')
|
|
205
|
-
|| $this->haveTokenInRange($startPos, $endPos, T_CURLY_OPEN)
|
|
206
|
-
|| $this->haveTokenInRange($startPos, $endPos, '}');
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
public function haveTagInRange(int $startPos, int $endPos): bool {
|
|
210
|
-
return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG)
|
|
211
|
-
|| $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Get indentation before token position.
|
|
216
|
-
*
|
|
217
|
-
* @param int $pos Token position
|
|
218
|
-
*
|
|
219
|
-
* @return int Indentation depth (in spaces)
|
|
220
|
-
*/
|
|
221
|
-
public function getIndentationBefore(int $pos) : int {
|
|
222
|
-
return $this->indentMap[$pos];
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Get the code corresponding to a token offset range, optionally adjusted for indentation.
|
|
227
|
-
*
|
|
228
|
-
* @param int $from Token start position (inclusive)
|
|
229
|
-
* @param int $to Token end position (exclusive)
|
|
230
|
-
* @param int $indent By how much the code should be indented (can be negative as well)
|
|
231
|
-
*
|
|
232
|
-
* @return string Code corresponding to token range, adjusted for indentation
|
|
233
|
-
*/
|
|
234
|
-
public function getTokenCode(int $from, int $to, int $indent) : string {
|
|
235
|
-
$tokens = $this->tokens;
|
|
236
|
-
$result = '';
|
|
237
|
-
for ($pos = $from; $pos < $to; $pos++) {
|
|
238
|
-
$token = $tokens[$pos];
|
|
239
|
-
if (\is_array($token)) {
|
|
240
|
-
$type = $token[0];
|
|
241
|
-
$content = $token[1];
|
|
242
|
-
if ($type === \T_CONSTANT_ENCAPSED_STRING || $type === \T_ENCAPSED_AND_WHITESPACE) {
|
|
243
|
-
$result .= $content;
|
|
244
|
-
} else {
|
|
245
|
-
// TODO Handle non-space indentation
|
|
246
|
-
if ($indent < 0) {
|
|
247
|
-
$result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $content);
|
|
248
|
-
} elseif ($indent > 0) {
|
|
249
|
-
$result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $content);
|
|
250
|
-
} else {
|
|
251
|
-
$result .= $content;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
} else {
|
|
255
|
-
$result .= $token;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return $result;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Precalculate the indentation at every token position.
|
|
263
|
-
*
|
|
264
|
-
* @return int[] Token position to indentation map
|
|
265
|
-
*/
|
|
266
|
-
private function calcIndentMap() {
|
|
267
|
-
$indentMap = [];
|
|
268
|
-
$indent = 0;
|
|
269
|
-
foreach ($this->tokens as $token) {
|
|
270
|
-
$indentMap[] = $indent;
|
|
271
|
-
|
|
272
|
-
if ($token[0] === \T_WHITESPACE) {
|
|
273
|
-
$content = $token[1];
|
|
274
|
-
$newlinePos = \strrpos($content, "\n");
|
|
275
|
-
if (false !== $newlinePos) {
|
|
276
|
-
$indent = \strlen($content) - $newlinePos - 1;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// Add a sentinel for one past end of the file
|
|
282
|
-
$indentMap[] = $indent;
|
|
283
|
-
|
|
284
|
-
return $indentMap;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
<?php declare(strict_types=1);
|
|
2
|
-
|
|
3
|
-
namespace PhpParser;
|
|
4
|
-
|
|
5
|
-
class JsonDecoder
|
|
6
|
-
{
|
|
7
|
-
/** @var \ReflectionClass[] Node type to reflection class map */
|
|
8
|
-
private $reflectionClassCache;
|
|
9
|
-
|
|
10
|
-
public function decode(string $json) {
|
|
11
|
-
$value = json_decode($json, true);
|
|
12
|
-
if (json_last_error()) {
|
|
13
|
-
throw new \RuntimeException('JSON decoding error: ' . json_last_error_msg());
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return $this->decodeRecursive($value);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private function decodeRecursive($value) {
|
|
20
|
-
if (\is_array($value)) {
|
|
21
|
-
if (isset($value['nodeType'])) {
|
|
22
|
-
if ($value['nodeType'] === 'Comment' || $value['nodeType'] === 'Comment_Doc') {
|
|
23
|
-
return $this->decodeComment($value);
|
|
24
|
-
}
|
|
25
|
-
return $this->decodeNode($value);
|
|
26
|
-
}
|
|
27
|
-
return $this->decodeArray($value);
|
|
28
|
-
}
|
|
29
|
-
return $value;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
private function decodeArray(array $array) : array {
|
|
33
|
-
$decodedArray = [];
|
|
34
|
-
foreach ($array as $key => $value) {
|
|
35
|
-
$decodedArray[$key] = $this->decodeRecursive($value);
|
|
36
|
-
}
|
|
37
|
-
return $decodedArray;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
private function decodeNode(array $value) : Node {
|
|
41
|
-
$nodeType = $value['nodeType'];
|
|
42
|
-
if (!\is_string($nodeType)) {
|
|
43
|
-
throw new \RuntimeException('Node type must be a string');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
$reflectionClass = $this->reflectionClassFromNodeType($nodeType);
|
|
47
|
-
/** @var Node $node */
|
|
48
|
-
$node = $reflectionClass->newInstanceWithoutConstructor();
|
|
49
|
-
|
|
50
|
-
if (isset($value['attributes'])) {
|
|
51
|
-
if (!\is_array($value['attributes'])) {
|
|
52
|
-
throw new \RuntimeException('Attributes must be an array');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
$node->setAttributes($this->decodeArray($value['attributes']));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
foreach ($value as $name => $subNode) {
|
|
59
|
-
if ($name === 'nodeType' || $name === 'attributes') {
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
$node->$name = $this->decodeRecursive($subNode);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return $node;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
private function decodeComment(array $value) : Comment {
|
|
70
|
-
$className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class;
|
|
71
|
-
if (!isset($value['text'])) {
|
|
72
|
-
throw new \RuntimeException('Comment must have text');
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return new $className(
|
|
76
|
-
$value['text'],
|
|
77
|
-
$value['line'] ?? -1, $value['filePos'] ?? -1, $value['tokenPos'] ?? -1,
|
|
78
|
-
$value['endLine'] ?? -1, $value['endFilePos'] ?? -1, $value['endTokenPos'] ?? -1
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass {
|
|
83
|
-
if (!isset($this->reflectionClassCache[$nodeType])) {
|
|
84
|
-
$className = $this->classNameFromNodeType($nodeType);
|
|
85
|
-
$this->reflectionClassCache[$nodeType] = new \ReflectionClass($className);
|
|
86
|
-
}
|
|
87
|
-
return $this->reflectionClassCache[$nodeType];
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
private function classNameFromNodeType(string $nodeType) : string {
|
|
91
|
-
$className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\');
|
|
92
|
-
if (class_exists($className)) {
|
|
93
|
-
return $className;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
$className .= '_';
|
|
97
|
-
if (class_exists($className)) {
|
|
98
|
-
return $className;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
throw new \RuntimeException("Unknown node type \"$nodeType\"");
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
<?php declare(strict_types=1);
|
|
2
|
-
|
|
3
|
-
namespace PhpParser\Lexer;
|
|
4
|
-
|
|
5
|
-
use PhpParser\Error;
|
|
6
|
-
use PhpParser\ErrorHandler;
|
|
7
|
-
use PhpParser\Lexer;
|
|
8
|
-
use PhpParser\Lexer\TokenEmulator\AttributeEmulator;
|
|
9
|
-
use PhpParser\Lexer\TokenEmulator\EnumTokenEmulator;
|
|
10
|
-
use PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator;
|
|
11
|
-
use PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator;
|
|
12
|
-
use PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator;
|
|
13
|
-
use PhpParser\Lexer\TokenEmulator\FnTokenEmulator;
|
|
14
|
-
use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator;
|
|
15
|
-
use PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator;
|
|
16
|
-
use PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator;
|
|
17
|
-
use PhpParser\Lexer\TokenEmulator\ReadonlyFunctionTokenEmulator;
|
|
18
|
-
use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator;
|
|
19
|
-
use PhpParser\Lexer\TokenEmulator\ReverseEmulator;
|
|
20
|
-
use PhpParser\Lexer\TokenEmulator\TokenEmulator;
|
|
21
|
-
|
|
22
|
-
class Emulative extends Lexer
|
|
23
|
-
{
|
|
24
|
-
const PHP_7_3 = '7.3dev';
|
|
25
|
-
const PHP_7_4 = '7.4dev';
|
|
26
|
-
const PHP_8_0 = '8.0dev';
|
|
27
|
-
const PHP_8_1 = '8.1dev';
|
|
28
|
-
const PHP_8_2 = '8.2dev';
|
|
29
|
-
|
|
30
|
-
/** @var mixed[] Patches used to reverse changes introduced in the code */
|
|
31
|
-
private $patches = [];
|
|
32
|
-
|
|
33
|
-
/** @var TokenEmulator[] */
|
|
34
|
-
private $emulators = [];
|
|
35
|
-
|
|
36
|
-
/** @var string */
|
|
37
|
-
private $targetPhpVersion;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @param mixed[] $options Lexer options. In addition to the usual options,
|
|
41
|
-
* accepts a 'phpVersion' string that specifies the
|
|
42
|
-
* version to emulate. Defaults to newest supported.
|
|
43
|
-
*/
|
|
44
|
-
public function __construct(array $options = [])
|
|
45
|
-
{
|
|
46
|
-
$this->targetPhpVersion = $options['phpVersion'] ?? Emulative::PHP_8_2;
|
|
47
|
-
unset($options['phpVersion']);
|
|
48
|
-
|
|
49
|
-
parent::__construct($options);
|
|
50
|
-
|
|
51
|
-
$emulators = [
|
|
52
|
-
new FlexibleDocStringEmulator(),
|
|
53
|
-
new FnTokenEmulator(),
|
|
54
|
-
new MatchTokenEmulator(),
|
|
55
|
-
new CoaleseEqualTokenEmulator(),
|
|
56
|
-
new NumericLiteralSeparatorEmulator(),
|
|
57
|
-
new NullsafeTokenEmulator(),
|
|
58
|
-
new AttributeEmulator(),
|
|
59
|
-
new EnumTokenEmulator(),
|
|
60
|
-
new ReadonlyTokenEmulator(),
|
|
61
|
-
new ExplicitOctalEmulator(),
|
|
62
|
-
new ReadonlyFunctionTokenEmulator(),
|
|
63
|
-
];
|
|
64
|
-
|
|
65
|
-
// Collect emulators that are relevant for the PHP version we're running
|
|
66
|
-
// and the PHP version we're targeting for emulation.
|
|
67
|
-
foreach ($emulators as $emulator) {
|
|
68
|
-
$emulatorPhpVersion = $emulator->getPhpVersion();
|
|
69
|
-
if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) {
|
|
70
|
-
$this->emulators[] = $emulator;
|
|
71
|
-
} else if ($this->isReverseEmulationNeeded($emulatorPhpVersion)) {
|
|
72
|
-
$this->emulators[] = new ReverseEmulator($emulator);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
public function startLexing(string $code, ErrorHandler $errorHandler = null) {
|
|
78
|
-
$emulators = array_filter($this->emulators, function($emulator) use($code) {
|
|
79
|
-
return $emulator->isEmulationNeeded($code);
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
if (empty($emulators)) {
|
|
83
|
-
// Nothing to emulate, yay
|
|
84
|
-
parent::startLexing($code, $errorHandler);
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
$this->patches = [];
|
|
89
|
-
foreach ($emulators as $emulator) {
|
|
90
|
-
$code = $emulator->preprocessCode($code, $this->patches);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
$collector = new ErrorHandler\Collecting();
|
|
94
|
-
parent::startLexing($code, $collector);
|
|
95
|
-
$this->sortPatches();
|
|
96
|
-
$this->fixupTokens();
|
|
97
|
-
|
|
98
|
-
$errors = $collector->getErrors();
|
|
99
|
-
if (!empty($errors)) {
|
|
100
|
-
$this->fixupErrors($errors);
|
|
101
|
-
foreach ($errors as $error) {
|
|
102
|
-
$errorHandler->handleError($error);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
foreach ($emulators as $emulator) {
|
|
107
|
-
$this->tokens = $emulator->emulate($code, $this->tokens);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
private function isForwardEmulationNeeded(string $emulatorPhpVersion): bool {
|
|
112
|
-
return version_compare(\PHP_VERSION, $emulatorPhpVersion, '<')
|
|
113
|
-
&& version_compare($this->targetPhpVersion, $emulatorPhpVersion, '>=');
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
private function isReverseEmulationNeeded(string $emulatorPhpVersion): bool {
|
|
117
|
-
return version_compare(\PHP_VERSION, $emulatorPhpVersion, '>=')
|
|
118
|
-
&& version_compare($this->targetPhpVersion, $emulatorPhpVersion, '<');
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
private function sortPatches()
|
|
122
|
-
{
|
|
123
|
-
// Patches may be contributed by different emulators.
|
|
124
|
-
// Make sure they are sorted by increasing patch position.
|
|
125
|
-
usort($this->patches, function($p1, $p2) {
|
|
126
|
-
return $p1[0] <=> $p2[0];
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
private function fixupTokens()
|
|
131
|
-
{
|
|
132
|
-
if (\count($this->patches) === 0) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Load first patch
|
|
137
|
-
$patchIdx = 0;
|
|
138
|
-
|
|
139
|
-
list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx];
|
|
140
|
-
|
|
141
|
-
// We use a manual loop over the tokens, because we modify the array on the fly
|
|
142
|
-
$pos = 0;
|
|
143
|
-
for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) {
|
|
144
|
-
$token = $this->tokens[$i];
|
|
145
|
-
if (\is_string($token)) {
|
|
146
|
-
if ($patchPos === $pos) {
|
|
147
|
-
// Only support replacement for string tokens.
|
|
148
|
-
assert($patchType === 'replace');
|
|
149
|
-
$this->tokens[$i] = $patchText;
|
|
150
|
-
|
|
151
|
-
// Fetch the next patch
|
|
152
|
-
$patchIdx++;
|
|
153
|
-
if ($patchIdx >= \count($this->patches)) {
|
|
154
|
-
// No more patches, we're done
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx];
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
$pos += \strlen($token);
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
$len = \strlen($token[1]);
|
|
165
|
-
$posDelta = 0;
|
|
166
|
-
while ($patchPos >= $pos && $patchPos < $pos + $len) {
|
|
167
|
-
$patchTextLen = \strlen($patchText);
|
|
168
|
-
if ($patchType === 'remove') {
|
|
169
|
-
if ($patchPos === $pos && $patchTextLen === $len) {
|
|
170
|
-
// Remove token entirely
|
|
171
|
-
array_splice($this->tokens, $i, 1, []);
|
|
172
|
-
$i--;
|
|
173
|
-
$c--;
|
|
174
|
-
} else {
|
|
175
|
-
// Remove from token string
|
|
176
|
-
$this->tokens[$i][1] = substr_replace(
|
|
177
|
-
$token[1], '', $patchPos - $pos + $posDelta, $patchTextLen
|
|
178
|
-
);
|
|
179
|
-
$posDelta -= $patchTextLen;
|
|
180
|
-
}
|
|
181
|
-
} elseif ($patchType === 'add') {
|
|
182
|
-
// Insert into the token string
|
|
183
|
-
$this->tokens[$i][1] = substr_replace(
|
|
184
|
-
$token[1], $patchText, $patchPos - $pos + $posDelta, 0
|
|
185
|
-
);
|
|
186
|
-
$posDelta += $patchTextLen;
|
|
187
|
-
} else if ($patchType === 'replace') {
|
|
188
|
-
// Replace inside the token string
|
|
189
|
-
$this->tokens[$i][1] = substr_replace(
|
|
190
|
-
$token[1], $patchText, $patchPos - $pos + $posDelta, $patchTextLen
|
|
191
|
-
);
|
|
192
|
-
} else {
|
|
193
|
-
assert(false);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// Fetch the next patch
|
|
197
|
-
$patchIdx++;
|
|
198
|
-
if ($patchIdx >= \count($this->patches)) {
|
|
199
|
-
// No more patches, we're done
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx];
|
|
204
|
-
|
|
205
|
-
// Multiple patches may apply to the same token. Reload the current one to check
|
|
206
|
-
// If the new patch applies
|
|
207
|
-
$token = $this->tokens[$i];
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
$pos += $len;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// A patch did not apply
|
|
214
|
-
assert(false);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Fixup line and position information in errors.
|
|
219
|
-
*
|
|
220
|
-
* @param Error[] $errors
|
|
221
|
-
*/
|
|
222
|
-
private function fixupErrors(array $errors) {
|
|
223
|
-
foreach ($errors as $error) {
|
|
224
|
-
$attrs = $error->getAttributes();
|
|
225
|
-
|
|
226
|
-
$posDelta = 0;
|
|
227
|
-
$lineDelta = 0;
|
|
228
|
-
foreach ($this->patches as $patch) {
|
|
229
|
-
list($patchPos, $patchType, $patchText) = $patch;
|
|
230
|
-
if ($patchPos >= $attrs['startFilePos']) {
|
|
231
|
-
// No longer relevant
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
if ($patchType === 'add') {
|
|
236
|
-
$posDelta += strlen($patchText);
|
|
237
|
-
$lineDelta += substr_count($patchText, "\n");
|
|
238
|
-
} else if ($patchType === 'remove') {
|
|
239
|
-
$posDelta -= strlen($patchText);
|
|
240
|
-
$lineDelta -= substr_count($patchText, "\n");
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
$attrs['startFilePos'] += $posDelta;
|
|
245
|
-
$attrs['endFilePos'] += $posDelta;
|
|
246
|
-
$attrs['startLine'] += $lineDelta;
|
|
247
|
-
$attrs['endLine'] += $lineDelta;
|
|
248
|
-
$error->setAttributes($attrs);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|