@appthreat/atom-parsetools 1.0.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/LICENSE +21 -0
- package/README.md +78 -0
- package/astgen.js +421 -0
- package/index.js +1 -0
- package/package.json +53 -0
- package/phpastgen.js +33 -0
- package/plugins/.gitkeep +0 -0
- package/plugins/autoload.php +22 -0
- package/plugins/bin/bundler +14 -0
- package/plugins/bin/php-parse +119 -0
- package/plugins/bin/ruby_ast_gen +14 -0
- package/plugins/composer/ClassLoader.php +579 -0
- package/plugins/composer/InstalledVersions.php +396 -0
- package/plugins/composer/LICENSE +21 -0
- package/plugins/composer/autoload_classmap.php +260 -0
- package/plugins/composer/autoload_namespaces.php +9 -0
- package/plugins/composer/autoload_psr4.php +10 -0
- package/plugins/composer/autoload_real.php +36 -0
- package/plugins/composer/autoload_static.php +286 -0
- package/plugins/composer/installed.json +65 -0
- package/plugins/composer/installed.php +32 -0
- package/plugins/log4j2.xml +13 -0
- package/plugins/nikic/php-parser/LICENSE +29 -0
- package/plugins/nikic/php-parser/README.md +225 -0
- package/plugins/nikic/php-parser/bin/php-parse +205 -0
- package/plugins/nikic/php-parser/composer.json +41 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php +148 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Class_.php +146 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +43 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +85 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +117 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +73 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Function_.php +67 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +93 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Method.php +146 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +45 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Param.php +168 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Property.php +161 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +64 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +148 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +78 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder/Use_.php +49 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Builder.php +13 -0
- package/plugins/nikic/php-parser/lib/PhpParser/BuilderFactory.php +399 -0
- package/plugins/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +335 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Comment/Doc.php +7 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Comment.php +239 -0
- package/plugins/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php +6 -0
- package/plugins/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php +229 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Error.php +180 -0
- package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php +46 -0
- package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +18 -0
- package/plugins/nikic/php-parser/lib/PhpParser/ErrorHandler.php +13 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php +27 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/Differ.php +164 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +64 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +286 -0
- package/plugins/nikic/php-parser/lib/PhpParser/JsonDecoder.php +103 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +251 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +56 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +47 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +31 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +44 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +76 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +23 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +62 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +23 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +67 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +105 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php +31 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +36 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +36 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +25 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Lexer.php +560 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NameContext.php +285 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Arg.php +46 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Attribute.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +29 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +14 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Const_.php +37 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +41 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +79 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +40 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +39 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +17 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php +12 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +26 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +36 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +79 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +31 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +31 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +39 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +39 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +35 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +31 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +45 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +41 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +45 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +35 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +35 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +46 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +36 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +38 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Expr.php +9 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +43 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Identifier.php +75 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +31 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +50 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +50 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Name.php +254 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/NullableType.php +28 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Param.php +60 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +77 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +31 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +80 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +16 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +28 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +157 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Scalar.php +7 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +41 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +85 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +109 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +161 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +137 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +37 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +40 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +33 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +43 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +47 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +77 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +31 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +39 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +43 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +37 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +31 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +38 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +17 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +91 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +37 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +38 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +13 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +32 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +38 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +30 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +52 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +47 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +34 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/Stmt.php +9 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/UnionType.php +28 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +17 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php +27 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Node.php +151 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeAbstract.php +178 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeDumper.php +206 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeFinder.php +81 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeTraverser.php +291 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +29 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +20 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +48 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +50 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +260 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +52 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +41 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitor.php +72 -0
- package/plugins/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +25 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +55 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php5.php +2682 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Php7.php +2898 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +148 -0
- package/plugins/nikic/php-parser/lib/PhpParser/Parser.php +18 -0
- package/plugins/nikic/php-parser/lib/PhpParser/ParserAbstract.php +1060 -0
- package/plugins/nikic/php-parser/lib/PhpParser/ParserFactory.php +76 -0
- package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +1126 -0
- package/plugins/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +1576 -0
- package/plugins/rubyastgen/.bundle/config +5 -0
- package/plugins/rubyastgen/Gemfile +12 -0
- package/plugins/rubyastgen/Gemfile.lock +34 -0
- package/plugins/rubyastgen/bundle/bundler/setup.rb +42 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/racc +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/ruby-parse +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/ruby-rewrite +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bin/ruby_ast_gen +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/.rspec +3 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/Gemfile +10 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/LICENSE.txt +213 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/README.md +46 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/Rakefile +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/bin/console +11 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/bin/setup +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/exe/ruby_ast_gen +59 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/lib/ruby_ast_gen/node_handling.rb +232 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/lib/ruby_ast_gen/version.rb +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/lib/ruby_ast_gen.rb +140 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/ruby_ast_gen.gemspec +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/spec/ruby_ast_gen_spec.rb +175 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/spec/spec_helper.rb +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/bundler/gems/ruby_ast_gen-d8b5c5740b5a/update_version.rb +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/gem.build_complete +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/gem_make.out +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/racc-1.8.1/racc/cparse.so +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/LICENSE.MIT +20 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/README.YARD.md +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast/node.rb +268 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast/processor/mixin.rb +288 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast/processor.rb +12 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast/sexp.rb +30 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ast-2.4.3/lib/ast.rb +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/BSDL +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/COPYING +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/Gemfile +10 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/README.md +69 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/Rakefile +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/bin/console +14 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/bin/setup +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/lib/ostruct.rb +489 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/ostruct-0.6.1/ostruct.gemspec +24 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/LICENSE.txt +26 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/bin/ruby-parse +7 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/bin/ruby-rewrite +7 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/gauntlet_parser.rb +123 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/all.rb +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ast/node.rb +40 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ast/processor.rb +293 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/base.rb +294 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/builders/default.rb +2351 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/clobbering_error.rb +13 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/color.rb +32 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/context.rb +51 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/current.rb +146 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/current_arg_stack.rb +46 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/deprecation.rb +13 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/diagnostic/engine.rb +104 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/diagnostic.rb +163 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer/dedenter.rb +88 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer/explanation.rb +55 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer/literal.rb +284 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer/stack_state.rb +49 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer-F0.rb +12931 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer-F1.rb +14884 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/lexer-strings.rb +5433 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/macruby.rb +9634 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/max_numparam_stack.rb +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/messages.rb +125 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/meta.rb +48 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/rewriter.rb +105 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby18.rb +9272 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby19.rb +9558 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby20.rb +10229 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby21.rb +10203 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby22.rb +10302 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby23.rb +10322 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby24.rb +10454 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby25.rb +10374 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby26.rb +10352 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby27.rb +11948 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby30.rb +12244 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby31.rb +12717 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby32.rb +12705 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby33.rb +12590 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/ruby34.rb +12597 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/rubymotion.rb +9515 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/runner/ruby_parse.rb +157 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/runner/ruby_rewrite.rb +101 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/runner.rb +299 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/buffer.rb +369 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/comment/associator.rb +233 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/comment.rb +134 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/collection.rb +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/condition.rb +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/constant.rb +32 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/definition.rb +23 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/for.rb +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/heredoc.rb +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/index.rb +33 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/keyword.rb +20 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/method_definition.rb +25 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/objc_kwarg.rb +19 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/operator.rb +17 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/rescue_body.rb +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/send.rb +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/ternary.rb +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map/variable.rb +31 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/map.rb +186 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/range.rb +326 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/rewriter/action.rb +44 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/rewriter.rb +513 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/tree_rewriter/action.rb +243 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/source/tree_rewriter.rb +431 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/static_environment.rb +134 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/syntax_error.rb +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/tree_rewriter.rb +133 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/unknown_encoding_in_magic_comment_error.rb +15 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/variables_stack.rb +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser/version.rb +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/lib/parser.rb +91 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/parser-3.3.8.0/parser.gemspec +43 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/BSDL +22 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/COPYING +56 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ChangeLog +846 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/README.ja.rdoc +58 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/README.rdoc +60 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/TODO +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/bin/racc +320 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/en/grammar.en.rdoc +218 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/en/grammar2.en.rdoc +219 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/command.ja.html +99 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/debug.ja.rdoc +36 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/grammar.ja.rdoc +348 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/index.ja.html +10 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/parser.ja.rdoc +125 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/doc/ja/usage.ja.html +414 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/Makefile +273 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/cparse.c +840 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/ext/racc/cparse/extconf.rb +8 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/compat.rb +33 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/cparse.so +0 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/debugflags.rb +60 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/exception.rb +16 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/grammar.rb +1191 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/grammarfileparser.rb +667 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/info.rb +18 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/iset.rb +92 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/logfilegenerator.rb +212 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/parser-text.rb +644 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/parser.rb +630 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/parserfilegenerator.rb +473 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/sourcetext.rb +35 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/state.rb +976 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/statetransitiontable.rb +311 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc/static.rb +5 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/gems/racc-1.8.1/lib/racc.rb +6 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/ast-2.4.3.gemspec +29 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/ostruct-0.6.1.gemspec +21 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/parser-3.3.8.0.gemspec +37 -0
- package/plugins/rubyastgen/bundle/ruby/3.4.0/specifications/racc-1.8.1.gemspec +28 -0
- package/plugins/rubyastgen/setup.ps1 +4 -0
- package/plugins/rubyastgen/setup.sh +6 -0
- package/rbastgen.js +53 -0
- package/scalasem.js +365 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
|
+
|
|
3
|
+
namespace PhpParser\Node\Scalar\MagicConst;
|
|
4
|
+
|
|
5
|
+
use PhpParser\Node\Scalar\MagicConst;
|
|
6
|
+
|
|
7
|
+
class Trait_ extends MagicConst
|
|
8
|
+
{
|
|
9
|
+
public function getName() : string {
|
|
10
|
+
return '__TRAIT__';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public function getType() : string {
|
|
14
|
+
return 'Scalar_MagicConst_Trait';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
|
+
|
|
3
|
+
namespace PhpParser\Node\Scalar;
|
|
4
|
+
|
|
5
|
+
use PhpParser\Node\Scalar;
|
|
6
|
+
|
|
7
|
+
abstract class MagicConst extends Scalar
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* Constructs a magic constant node.
|
|
11
|
+
*
|
|
12
|
+
* @param array $attributes Additional attributes
|
|
13
|
+
*/
|
|
14
|
+
public function __construct(array $attributes = []) {
|
|
15
|
+
$this->attributes = $attributes;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public function getSubNodeNames() : array {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Get name of magic constant.
|
|
24
|
+
*
|
|
25
|
+
* @return string Name of magic constant
|
|
26
|
+
*/
|
|
27
|
+
abstract public function getName() : string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
|
+
|
|
3
|
+
namespace PhpParser\Node\Scalar;
|
|
4
|
+
|
|
5
|
+
use PhpParser\Error;
|
|
6
|
+
use PhpParser\Node\Scalar;
|
|
7
|
+
|
|
8
|
+
class String_ extends Scalar
|
|
9
|
+
{
|
|
10
|
+
/* For use in "kind" attribute */
|
|
11
|
+
const KIND_SINGLE_QUOTED = 1;
|
|
12
|
+
const KIND_DOUBLE_QUOTED = 2;
|
|
13
|
+
const KIND_HEREDOC = 3;
|
|
14
|
+
const KIND_NOWDOC = 4;
|
|
15
|
+
|
|
16
|
+
/** @var string String value */
|
|
17
|
+
public $value;
|
|
18
|
+
|
|
19
|
+
protected static $replacements = [
|
|
20
|
+
'\\' => '\\',
|
|
21
|
+
'$' => '$',
|
|
22
|
+
'n' => "\n",
|
|
23
|
+
'r' => "\r",
|
|
24
|
+
't' => "\t",
|
|
25
|
+
'f' => "\f",
|
|
26
|
+
'v' => "\v",
|
|
27
|
+
'e' => "\x1B",
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Constructs a string scalar node.
|
|
32
|
+
*
|
|
33
|
+
* @param string $value Value of the string
|
|
34
|
+
* @param array $attributes Additional attributes
|
|
35
|
+
*/
|
|
36
|
+
public function __construct(string $value, array $attributes = []) {
|
|
37
|
+
$this->attributes = $attributes;
|
|
38
|
+
$this->value = $value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public function getSubNodeNames() : array {
|
|
42
|
+
return ['value'];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
|
|
47
|
+
*/
|
|
48
|
+
public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self
|
|
49
|
+
{
|
|
50
|
+
$attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B')))
|
|
51
|
+
? Scalar\String_::KIND_SINGLE_QUOTED
|
|
52
|
+
: Scalar\String_::KIND_DOUBLE_QUOTED;
|
|
53
|
+
|
|
54
|
+
$attributes['rawValue'] = $str;
|
|
55
|
+
|
|
56
|
+
$string = self::parse($str, $parseUnicodeEscape);
|
|
57
|
+
|
|
58
|
+
return new self($string, $attributes);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
*
|
|
64
|
+
* Parses a string token.
|
|
65
|
+
*
|
|
66
|
+
* @param string $str String token content
|
|
67
|
+
* @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
|
|
68
|
+
*
|
|
69
|
+
* @return string The parsed string
|
|
70
|
+
*/
|
|
71
|
+
public static function parse(string $str, bool $parseUnicodeEscape = true) : string {
|
|
72
|
+
$bLength = 0;
|
|
73
|
+
if ('b' === $str[0] || 'B' === $str[0]) {
|
|
74
|
+
$bLength = 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if ('\'' === $str[$bLength]) {
|
|
78
|
+
return str_replace(
|
|
79
|
+
['\\\\', '\\\''],
|
|
80
|
+
['\\', '\''],
|
|
81
|
+
substr($str, $bLength + 1, -1)
|
|
82
|
+
);
|
|
83
|
+
} else {
|
|
84
|
+
return self::parseEscapeSequences(
|
|
85
|
+
substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*
|
|
93
|
+
* Parses escape sequences in strings (all string types apart from single quoted).
|
|
94
|
+
*
|
|
95
|
+
* @param string $str String without quotes
|
|
96
|
+
* @param null|string $quote Quote type
|
|
97
|
+
* @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
|
|
98
|
+
*
|
|
99
|
+
* @return string String with escape sequences parsed
|
|
100
|
+
*/
|
|
101
|
+
public static function parseEscapeSequences(string $str, $quote, bool $parseUnicodeEscape = true) : string {
|
|
102
|
+
if (null !== $quote) {
|
|
103
|
+
$str = str_replace('\\' . $quote, $quote, $str);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
$extra = '';
|
|
107
|
+
if ($parseUnicodeEscape) {
|
|
108
|
+
$extra = '|u\{([0-9a-fA-F]+)\}';
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return preg_replace_callback(
|
|
112
|
+
'~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~',
|
|
113
|
+
function($matches) {
|
|
114
|
+
$str = $matches[1];
|
|
115
|
+
|
|
116
|
+
if (isset(self::$replacements[$str])) {
|
|
117
|
+
return self::$replacements[$str];
|
|
118
|
+
} elseif ('x' === $str[0] || 'X' === $str[0]) {
|
|
119
|
+
return chr(hexdec(substr($str, 1)));
|
|
120
|
+
} elseif ('u' === $str[0]) {
|
|
121
|
+
return self::codePointToUtf8(hexdec($matches[2]));
|
|
122
|
+
} else {
|
|
123
|
+
return chr(octdec($str));
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
$str
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Converts a Unicode code point to its UTF-8 encoded representation.
|
|
132
|
+
*
|
|
133
|
+
* @param int $num Code point
|
|
134
|
+
*
|
|
135
|
+
* @return string UTF-8 representation of code point
|
|
136
|
+
*/
|
|
137
|
+
private static function codePointToUtf8(int $num) : string {
|
|
138
|
+
if ($num <= 0x7F) {
|
|
139
|
+
return chr($num);
|
|
140
|
+
}
|
|
141
|
+
if ($num <= 0x7FF) {
|
|
142
|
+
return chr(($num>>6) + 0xC0) . chr(($num&0x3F) + 0x80);
|
|
143
|
+
}
|
|
144
|
+
if ($num <= 0xFFFF) {
|
|
145
|
+
return chr(($num>>12) + 0xE0) . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80);
|
|
146
|
+
}
|
|
147
|
+
if ($num <= 0x1FFFFF) {
|
|
148
|
+
return chr(($num>>18) + 0xF0) . chr((($num>>12)&0x3F) + 0x80)
|
|
149
|
+
. chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80);
|
|
150
|
+
}
|
|
151
|
+
throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large');
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
public function getType() : string {
|
|
155
|
+
return 'Scalar_String';
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
|
+
|
|
3
|
+
namespace PhpParser\Node\Stmt;
|
|
4
|
+
|
|
5
|
+
use PhpParser\Node;
|
|
6
|
+
|
|
7
|
+
class Break_ extends Node\Stmt
|
|
8
|
+
{
|
|
9
|
+
/** @var null|Node\Expr Number of loops to break */
|
|
10
|
+
public $num;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Constructs a break node.
|
|
14
|
+
*
|
|
15
|
+
* @param null|Node\Expr $num Number of loops to break
|
|
16
|
+
* @param array $attributes Additional attributes
|
|
17
|
+
*/
|
|
18
|
+
public function __construct(Node\Expr $num = null, array $attributes = []) {
|
|
19
|
+
$this->attributes = $attributes;
|
|
20
|
+
$this->num = $num;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public function getSubNodeNames() : array {
|
|
24
|
+
return ['num'];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public function getType() : string {
|
|
28
|
+
return 'Stmt_Break';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
|
+
|
|
3
|
+
namespace PhpParser\Node\Stmt;
|
|
4
|
+
|
|
5
|
+
use PhpParser\Node;
|
|
6
|
+
|
|
7
|
+
class Case_ extends Node\Stmt
|
|
8
|
+
{
|
|
9
|
+
/** @var null|Node\Expr Condition (null for default) */
|
|
10
|
+
public $cond;
|
|
11
|
+
/** @var Node\Stmt[] Statements */
|
|
12
|
+
public $stmts;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a case node.
|
|
16
|
+
*
|
|
17
|
+
* @param null|Node\Expr $cond Condition (null for default)
|
|
18
|
+
* @param Node\Stmt[] $stmts Statements
|
|
19
|
+
* @param array $attributes Additional attributes
|
|
20
|
+
*/
|
|
21
|
+
public function __construct($cond, array $stmts = [], array $attributes = []) {
|
|
22
|
+
$this->attributes = $attributes;
|
|
23
|
+
$this->cond = $cond;
|
|
24
|
+
$this->stmts = $stmts;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public function getSubNodeNames() : array {
|
|
28
|
+
return ['cond', 'stmts'];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public function getType() : string {
|
|
32
|
+
return 'Stmt_Case';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
|
+
|
|
3
|
+
namespace PhpParser\Node\Stmt;
|
|
4
|
+
|
|
5
|
+
use PhpParser\Node;
|
|
6
|
+
use PhpParser\Node\Expr;
|
|
7
|
+
|
|
8
|
+
class Catch_ extends Node\Stmt
|
|
9
|
+
{
|
|
10
|
+
/** @var Node\Name[] Types of exceptions to catch */
|
|
11
|
+
public $types;
|
|
12
|
+
/** @var Expr\Variable|null Variable for exception */
|
|
13
|
+
public $var;
|
|
14
|
+
/** @var Node\Stmt[] Statements */
|
|
15
|
+
public $stmts;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Constructs a catch node.
|
|
19
|
+
*
|
|
20
|
+
* @param Node\Name[] $types Types of exceptions to catch
|
|
21
|
+
* @param Expr\Variable|null $var Variable for exception
|
|
22
|
+
* @param Node\Stmt[] $stmts Statements
|
|
23
|
+
* @param array $attributes Additional attributes
|
|
24
|
+
*/
|
|
25
|
+
public function __construct(
|
|
26
|
+
array $types, Expr\Variable $var = null, array $stmts = [], array $attributes = []
|
|
27
|
+
) {
|
|
28
|
+
$this->attributes = $attributes;
|
|
29
|
+
$this->types = $types;
|
|
30
|
+
$this->var = $var;
|
|
31
|
+
$this->stmts = $stmts;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public function getSubNodeNames() : array {
|
|
35
|
+
return ['types', 'var', 'stmts'];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public function getType() : string {
|
|
39
|
+
return 'Stmt_Catch';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
|
+
|
|
3
|
+
namespace PhpParser\Node\Stmt;
|
|
4
|
+
|
|
5
|
+
use PhpParser\Node;
|
|
6
|
+
|
|
7
|
+
class ClassConst extends Node\Stmt
|
|
8
|
+
{
|
|
9
|
+
/** @var int Modifiers */
|
|
10
|
+
public $flags;
|
|
11
|
+
/** @var Node\Const_[] Constant declarations */
|
|
12
|
+
public $consts;
|
|
13
|
+
/** @var Node\AttributeGroup[] PHP attribute groups */
|
|
14
|
+
public $attrGroups;
|
|
15
|
+
/** @var Node\Identifier|Node\Name|Node\ComplexType|null Type declaration */
|
|
16
|
+
public $type;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Constructs a class const list node.
|
|
20
|
+
*
|
|
21
|
+
* @param Node\Const_[] $consts Constant declarations
|
|
22
|
+
* @param int $flags Modifiers
|
|
23
|
+
* @param array $attributes Additional attributes
|
|
24
|
+
* @param Node\AttributeGroup[] $attrGroups PHP attribute groups
|
|
25
|
+
* @param null|string|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration
|
|
26
|
+
*/
|
|
27
|
+
public function __construct(
|
|
28
|
+
array $consts,
|
|
29
|
+
int $flags = 0,
|
|
30
|
+
array $attributes = [],
|
|
31
|
+
array $attrGroups = [],
|
|
32
|
+
$type = null
|
|
33
|
+
) {
|
|
34
|
+
$this->attributes = $attributes;
|
|
35
|
+
$this->flags = $flags;
|
|
36
|
+
$this->consts = $consts;
|
|
37
|
+
$this->attrGroups = $attrGroups;
|
|
38
|
+
$this->type = \is_string($type) ? new Node\Identifier($type) : $type;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public function getSubNodeNames() : array {
|
|
42
|
+
return ['attrGroups', 'flags', 'type', 'consts'];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Whether constant is explicitly or implicitly public.
|
|
47
|
+
*
|
|
48
|
+
* @return bool
|
|
49
|
+
*/
|
|
50
|
+
public function isPublic() : bool {
|
|
51
|
+
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|
|
52
|
+
|| ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Whether constant is protected.
|
|
57
|
+
*
|
|
58
|
+
* @return bool
|
|
59
|
+
*/
|
|
60
|
+
public function isProtected() : bool {
|
|
61
|
+
return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Whether constant is private.
|
|
66
|
+
*
|
|
67
|
+
* @return bool
|
|
68
|
+
*/
|
|
69
|
+
public function isPrivate() : bool {
|
|
70
|
+
return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Whether constant is final.
|
|
75
|
+
*
|
|
76
|
+
* @return bool
|
|
77
|
+
*/
|
|
78
|
+
public function isFinal() : bool {
|
|
79
|
+
return (bool) ($this->flags & Class_::MODIFIER_FINAL);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public function getType() : string {
|
|
83
|
+
return 'Stmt_ClassConst';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
|
+
|
|
3
|
+
namespace PhpParser\Node\Stmt;
|
|
4
|
+
|
|
5
|
+
use PhpParser\Node;
|
|
6
|
+
|
|
7
|
+
abstract class ClassLike extends Node\Stmt
|
|
8
|
+
{
|
|
9
|
+
/** @var Node\Identifier|null Name */
|
|
10
|
+
public $name;
|
|
11
|
+
/** @var Node\Stmt[] Statements */
|
|
12
|
+
public $stmts;
|
|
13
|
+
/** @var Node\AttributeGroup[] PHP attribute groups */
|
|
14
|
+
public $attrGroups;
|
|
15
|
+
|
|
16
|
+
/** @var Node\Name|null Namespaced name (if using NameResolver) */
|
|
17
|
+
public $namespacedName;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @return TraitUse[]
|
|
21
|
+
*/
|
|
22
|
+
public function getTraitUses() : array {
|
|
23
|
+
$traitUses = [];
|
|
24
|
+
foreach ($this->stmts as $stmt) {
|
|
25
|
+
if ($stmt instanceof TraitUse) {
|
|
26
|
+
$traitUses[] = $stmt;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return $traitUses;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @return ClassConst[]
|
|
34
|
+
*/
|
|
35
|
+
public function getConstants() : array {
|
|
36
|
+
$constants = [];
|
|
37
|
+
foreach ($this->stmts as $stmt) {
|
|
38
|
+
if ($stmt instanceof ClassConst) {
|
|
39
|
+
$constants[] = $stmt;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return $constants;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @return Property[]
|
|
47
|
+
*/
|
|
48
|
+
public function getProperties() : array {
|
|
49
|
+
$properties = [];
|
|
50
|
+
foreach ($this->stmts as $stmt) {
|
|
51
|
+
if ($stmt instanceof Property) {
|
|
52
|
+
$properties[] = $stmt;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return $properties;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Gets property with the given name defined directly in this class/interface/trait.
|
|
60
|
+
*
|
|
61
|
+
* @param string $name Name of the property
|
|
62
|
+
*
|
|
63
|
+
* @return Property|null Property node or null if the property does not exist
|
|
64
|
+
*/
|
|
65
|
+
public function getProperty(string $name) {
|
|
66
|
+
foreach ($this->stmts as $stmt) {
|
|
67
|
+
if ($stmt instanceof Property) {
|
|
68
|
+
foreach ($stmt->props as $prop) {
|
|
69
|
+
if ($prop instanceof PropertyProperty && $name === $prop->name->toString()) {
|
|
70
|
+
return $stmt;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Gets all methods defined directly in this class/interface/trait
|
|
80
|
+
*
|
|
81
|
+
* @return ClassMethod[]
|
|
82
|
+
*/
|
|
83
|
+
public function getMethods() : array {
|
|
84
|
+
$methods = [];
|
|
85
|
+
foreach ($this->stmts as $stmt) {
|
|
86
|
+
if ($stmt instanceof ClassMethod) {
|
|
87
|
+
$methods[] = $stmt;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return $methods;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Gets method with the given name defined directly in this class/interface/trait.
|
|
95
|
+
*
|
|
96
|
+
* @param string $name Name of the method (compared case-insensitively)
|
|
97
|
+
*
|
|
98
|
+
* @return ClassMethod|null Method node or null if the method does not exist
|
|
99
|
+
*/
|
|
100
|
+
public function getMethod(string $name) {
|
|
101
|
+
$lowerName = strtolower($name);
|
|
102
|
+
foreach ($this->stmts as $stmt) {
|
|
103
|
+
if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) {
|
|
104
|
+
return $stmt;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<?php declare(strict_types=1);
|
|
2
|
+
|
|
3
|
+
namespace PhpParser\Node\Stmt;
|
|
4
|
+
|
|
5
|
+
use PhpParser\Node;
|
|
6
|
+
use PhpParser\Node\FunctionLike;
|
|
7
|
+
|
|
8
|
+
class ClassMethod extends Node\Stmt implements FunctionLike
|
|
9
|
+
{
|
|
10
|
+
/** @var int Flags */
|
|
11
|
+
public $flags;
|
|
12
|
+
/** @var bool Whether to return by reference */
|
|
13
|
+
public $byRef;
|
|
14
|
+
/** @var Node\Identifier Name */
|
|
15
|
+
public $name;
|
|
16
|
+
/** @var Node\Param[] Parameters */
|
|
17
|
+
public $params;
|
|
18
|
+
/** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */
|
|
19
|
+
public $returnType;
|
|
20
|
+
/** @var Node\Stmt[]|null Statements */
|
|
21
|
+
public $stmts;
|
|
22
|
+
/** @var Node\AttributeGroup[] PHP attribute groups */
|
|
23
|
+
public $attrGroups;
|
|
24
|
+
|
|
25
|
+
private static $magicNames = [
|
|
26
|
+
'__construct' => true,
|
|
27
|
+
'__destruct' => true,
|
|
28
|
+
'__call' => true,
|
|
29
|
+
'__callstatic' => true,
|
|
30
|
+
'__get' => true,
|
|
31
|
+
'__set' => true,
|
|
32
|
+
'__isset' => true,
|
|
33
|
+
'__unset' => true,
|
|
34
|
+
'__sleep' => true,
|
|
35
|
+
'__wakeup' => true,
|
|
36
|
+
'__tostring' => true,
|
|
37
|
+
'__set_state' => true,
|
|
38
|
+
'__clone' => true,
|
|
39
|
+
'__invoke' => true,
|
|
40
|
+
'__debuginfo' => true,
|
|
41
|
+
'__serialize' => true,
|
|
42
|
+
'__unserialize' => true,
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Constructs a class method node.
|
|
47
|
+
*
|
|
48
|
+
* @param string|Node\Identifier $name Name
|
|
49
|
+
* @param array $subNodes Array of the following optional subnodes:
|
|
50
|
+
* 'flags => MODIFIER_PUBLIC: Flags
|
|
51
|
+
* 'byRef' => false : Whether to return by reference
|
|
52
|
+
* 'params' => array() : Parameters
|
|
53
|
+
* 'returnType' => null : Return type
|
|
54
|
+
* 'stmts' => array() : Statements
|
|
55
|
+
* 'attrGroups' => array() : PHP attribute groups
|
|
56
|
+
* @param array $attributes Additional attributes
|
|
57
|
+
*/
|
|
58
|
+
public function __construct($name, array $subNodes = [], array $attributes = []) {
|
|
59
|
+
$this->attributes = $attributes;
|
|
60
|
+
$this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0;
|
|
61
|
+
$this->byRef = $subNodes['byRef'] ?? false;
|
|
62
|
+
$this->name = \is_string($name) ? new Node\Identifier($name) : $name;
|
|
63
|
+
$this->params = $subNodes['params'] ?? [];
|
|
64
|
+
$returnType = $subNodes['returnType'] ?? null;
|
|
65
|
+
$this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType;
|
|
66
|
+
$this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : [];
|
|
67
|
+
$this->attrGroups = $subNodes['attrGroups'] ?? [];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public function getSubNodeNames() : array {
|
|
71
|
+
return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts'];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public function returnsByRef() : bool {
|
|
75
|
+
return $this->byRef;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public function getParams() : array {
|
|
79
|
+
return $this->params;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
public function getReturnType() {
|
|
83
|
+
return $this->returnType;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
public function getStmts() {
|
|
87
|
+
return $this->stmts;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public function getAttrGroups() : array {
|
|
91
|
+
return $this->attrGroups;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Whether the method is explicitly or implicitly public.
|
|
96
|
+
*
|
|
97
|
+
* @return bool
|
|
98
|
+
*/
|
|
99
|
+
public function isPublic() : bool {
|
|
100
|
+
return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
|
|
101
|
+
|| ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Whether the method is protected.
|
|
106
|
+
*
|
|
107
|
+
* @return bool
|
|
108
|
+
*/
|
|
109
|
+
public function isProtected() : bool {
|
|
110
|
+
return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Whether the method is private.
|
|
115
|
+
*
|
|
116
|
+
* @return bool
|
|
117
|
+
*/
|
|
118
|
+
public function isPrivate() : bool {
|
|
119
|
+
return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Whether the method is abstract.
|
|
124
|
+
*
|
|
125
|
+
* @return bool
|
|
126
|
+
*/
|
|
127
|
+
public function isAbstract() : bool {
|
|
128
|
+
return (bool) ($this->flags & Class_::MODIFIER_ABSTRACT);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Whether the method is final.
|
|
133
|
+
*
|
|
134
|
+
* @return bool
|
|
135
|
+
*/
|
|
136
|
+
public function isFinal() : bool {
|
|
137
|
+
return (bool) ($this->flags & Class_::MODIFIER_FINAL);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Whether the method is static.
|
|
142
|
+
*
|
|
143
|
+
* @return bool
|
|
144
|
+
*/
|
|
145
|
+
public function isStatic() : bool {
|
|
146
|
+
return (bool) ($this->flags & Class_::MODIFIER_STATIC);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Whether the method is magic.
|
|
151
|
+
*
|
|
152
|
+
* @return bool
|
|
153
|
+
*/
|
|
154
|
+
public function isMagic() : bool {
|
|
155
|
+
return isset(self::$magicNames[$this->name->toLowerString()]);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
public function getType() : string {
|
|
159
|
+
return 'Stmt_ClassMethod';
|
|
160
|
+
}
|
|
161
|
+
}
|