Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/php-static-scanner-instrumentalization.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-12-20 17:32:18 +0300
committerLukas Reschke <lukas@statuscode.ch>2016-12-20 17:32:58 +0300
commit5899b8afe3c94f2bc8dbc4b35f090e6d1476dbfe (patch)
tree93b09e2fe83dc6b6db35374a713a5ccd3451fde8
parent4c47e79fa7f440116edb140899284422d1ea8c12 (diff)
Initial import
-rw-r--r--README.md32
-rw-r--r--composer.json10
-rw-r--r--composer.lock70
-rw-r--r--instrumentalize.php58
-rw-r--r--src/Scanner.php58
-rw-r--r--src/Visitor/NodeVisitor.php44
-rw-r--r--src/Visitor/PublicFunctionVisitor.php47
-rw-r--r--src/Visitor/UsesControllerClass.php48
-rw-r--r--vendor/autoload.php7
l---------vendor/bin/php-parse1
-rw-r--r--vendor/composer/ClassLoader.php415
-rw-r--r--vendor/composer/LICENSE21
-rw-r--r--vendor/composer/autoload_classmap.php9
-rw-r--r--vendor/composer/autoload_namespaces.php9
-rw-r--r--vendor/composer/autoload_psr4.php11
-rw-r--r--vendor/composer/autoload_real.php52
-rw-r--r--vendor/composer/autoload_static.php39
-rw-r--r--vendor/composer/installed.json55
-rw-r--r--vendor/nikic/php-parser/.gitignore4
-rw-r--r--vendor/nikic/php-parser/.travis.yml31
-rw-r--r--vendor/nikic/php-parser/CHANGELOG.md293
-rw-r--r--vendor/nikic/php-parser/LICENSE31
-rw-r--r--vendor/nikic/php-parser/README.md99
-rw-r--r--vendor/nikic/php-parser/UPGRADE-1.0.md121
-rw-r--r--vendor/nikic/php-parser/UPGRADE-2.0.md74
-rw-r--r--vendor/nikic/php-parser/UPGRADE-3.0.md156
-rwxr-xr-xvendor/nikic/php-parser/bin/php-parse193
-rw-r--r--vendor/nikic/php-parser/composer.json30
-rw-r--r--vendor/nikic/php-parser/doc/0_Introduction.markdown80
-rw-r--r--vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown438
-rw-r--r--vendor/nikic/php-parser/doc/3_Other_node_tree_representations.markdown330
-rw-r--r--vendor/nikic/php-parser/doc/4_Code_generation.markdown84
-rw-r--r--vendor/nikic/php-parser/doc/component/Error_handling.markdown75
-rw-r--r--vendor/nikic/php-parser/doc/component/Lexer.markdown152
-rw-r--r--vendor/nikic/php-parser/grammar/README.md28
-rw-r--r--vendor/nikic/php-parser/grammar/parser.template103
-rw-r--r--vendor/nikic/php-parser/grammar/php5.y995
-rw-r--r--vendor/nikic/php-parser/grammar/php7.y882
-rw-r--r--vendor/nikic/php-parser/grammar/rebuildParsers.php263
-rw-r--r--vendor/nikic/php-parser/grammar/tokens.template17
-rw-r--r--vendor/nikic/php-parser/grammar/tokens.y113
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Autoloader.php40
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder.php13
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php121
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php42
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php75
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php49
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php80
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php128
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php59
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php78
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php111
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php56
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php58
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/BuilderAbstract.php175
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php127
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Comment.php140
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php7
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Error.php166
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php13
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php46
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php18
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Lexer.php379
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php174
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node.php86
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php34
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php34
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php31
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php65
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php27
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php27
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php31
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php35
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php31
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php35
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php31
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php35
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php31
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php34
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php36
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Name.php197
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php42
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php42
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Param.php42
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php7
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php64
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php27
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php67
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php28
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php12
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php12
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php12
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php12
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php12
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php12
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php12
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php12
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php153
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php9
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php34
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php47
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php44
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php94
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php97
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php39
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php43
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php60
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php35
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php39
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php31
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php13
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php51
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php31
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php13
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php34
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php34
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php26
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php38
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php43
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php111
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php196
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php166
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php30
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php60
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php248
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php14
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Parser.php17
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php54
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php3140
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php2770
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php144
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php709
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php43
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php921
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php316
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Serializer.php15
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Serializer/XML.php86
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Unserializer.php15
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Unserializer/XML.php152
-rw-r--r--vendor/nikic/php-parser/lib/bootstrap.php6
-rw-r--r--vendor/nikic/php-parser/phpunit.xml.dist24
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/AutoloaderTest.php15
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php161
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php106
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php105
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php163
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php41
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php158
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php147
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php45
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php35
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php108
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/CodeParsingTest.php70
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php61
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/CommentTest.php73
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php22
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php16
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/ErrorTest.php106
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php133
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/LexerTest.php259
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php134
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php25
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php61
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php35
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php63
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php66
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php26
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php44
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php274
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php105
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php210
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php449
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php94
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php14
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php14
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php34
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/ParserTest.php181
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php164
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Serializer/XMLTest.php172
-rw-r--r--vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php150
-rw-r--r--vendor/nikic/php-parser/test/bootstrap.php20
-rw-r--r--vendor/nikic/php-parser/test/code/parser/blockComments.test23
-rw-r--r--vendor/nikic/php-parser/test/code/parser/comments.test100
-rw-r--r--vendor/nikic/php-parser/test/code/parser/errorHandling/eofError.test32
-rw-r--r--vendor/nikic/php-parser/test/code/parser/errorHandling/lexerErrors.test124
-rw-r--r--vendor/nikic/php-parser/test/code/parser/errorHandling/recovery.test375
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/arrayDef.test142
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/arrayDestructuring.test144
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/assign.test301
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/assignNewByRef.test39
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/cast.test72
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/clone.test13
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/closure.test142
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/comparison.test107
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test621
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test12
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/exit.test34
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/args.test99
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constFetch.test33
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test231
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/funcCall.test132
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test70
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test145
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test62
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticCall.test173
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test91
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/includeAndEval.test40
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test75
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/listWithKeys.test75
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/logic.test159
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/math.test256
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/new.test146
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/newWithoutClass.test23
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/print.test12
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/shellExec.test46
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/ternaryAndCoalesce.test149
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/uvs/globalNonSimpleVarError.test16
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test481
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/uvs/isset.test74
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test109
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/uvs/new.test95
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/uvs/staticProperty.test93
-rw-r--r--vendor/nikic/php-parser/test/code/parser/expr/variable.test55
-rw-r--r--vendor/nikic/php-parser/test/code/parser/scalar/constantString.test60
-rw-r--r--vendor/nikic/php-parser/test/code/parser/scalar/docString.test90
-rw-r--r--vendor/nikic/php-parser/test/code/parser/scalar/docStringNewlines.test61
-rw-r--r--vendor/nikic/php-parser/test/code/parser/scalar/encapsedString.test242
-rw-r--r--vendor/nikic/php-parser/test/code/parser/scalar/float.test74
-rw-r--r--vendor/nikic/php-parser/test/code/parser/scalar/int.test43
-rw-r--r--vendor/nikic/php-parser/test/code/parser/scalar/invalidOctal.test22
-rw-r--r--vendor/nikic/php-parser/test/code/parser/scalar/magicConst.test31
-rw-r--r--vendor/nikic/php-parser/test/code/parser/scalar/unicodeEscape.test20
-rw-r--r--vendor/nikic/php-parser/test/code/parser/semiReserved.test382
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test112
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/abstract.test39
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/anonymous.test195
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/conditional.test33
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/constModifierErrors.test121
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/constModifiers.test67
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/final.test17
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/implicitPublic.test92
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/interface.test36
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test215
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/name.test201
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test50
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test156
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/staticMethod.test151
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/class/trait.test160
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/const.test40
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/controlFlow.test55
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/declare.test60
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/echo.test32
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/builtinTypeDeclarations.test52
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/byRef.test41
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test33
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/defaultValues.test148
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test47
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/returnTypes.test52
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/specialVars.test51
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/typeDeclarations.test49
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/variadic.test110
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/function/variadicDefaultValue.test27
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/generator/basic.test280
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldPrecedence.test230
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldUnaryPrecedence.test48
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/haltCompiler.test55
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerInvalidSyntax.test6
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOffset.test34
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOutermostScope.test8
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/hashbang.test26
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/if.test103
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/inlineHTML.test27
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/loop/do.test17
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/loop/for.test110
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/loop/foreach.test164
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test25
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/multiCatch.test65
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/alias.test168
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/braced.test42
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUse.test188
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUseErrors.test66
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUsePositions.test28
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/invalidName.test83
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/mix.test103
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/name.test42
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test30
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/notBraced.test45
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/nsAfterHashbang.test22
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test58
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmtInvalid.test105
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/switch.test73
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test130
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/tryWithoutCatch.test27
-rw-r--r--vendor/nikic/php-parser/test/code/parser/stmt/unset.test26
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/comments.test67
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/anonymousClass.test27
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test14
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/call.test13
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/closure.test18
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/constant_deref.test13
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/docStrings.test86
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/include.test7
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/intrinsics.test29
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/list.test19
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/literals.test154
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/numbers.test35
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test144
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/parentheses.test77
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/shortArraySyntax.test11
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/stringEscaping.test23
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/uvs.test23
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test73
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/expr/yield.test46
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test58
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test19
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test16
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/alias.test20
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/break_continue.test13
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class.test53
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test20
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/const.test11
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/declare.test17
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/do_while.test10
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/for.test28
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/foreach.test28
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/function_signatures.test43
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/global_static_variables.test11
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/goto.test9
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/groupUse.test16
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/haltCompiler.file-test27
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/if.test16
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/multiCatch.test19
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/namespaces.test50
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/nullable_types.test11
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/switch.test35
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/throw.test7
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/traitUse.test25
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/tryCatch.test24
-rw-r--r--vendor/nikic/php-parser/test/code/prettyPrinter/stmt/while.test10
-rwxr-xr-xvendor/nikic/php-parser/test_old/run-php-src.sh4
-rw-r--r--vendor/nikic/php-parser/test_old/run.php223
446 files changed, 38195 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..2784d7e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,32 @@
+# PHP Static Scanner Instrumentalization
+
+Static security scanners usually are not clever enough to detect our injection of parameters in the Nextcloud source code.
+
+This instrumentalization script loops over a given directory and instrumentalizes the source code by directly injecting
+a `$_GET` on code related to the Nextcloud appframework. So the original code would look like:
+
+```php
+<?php
+use OCP\AppFramework\Controller;
+
+class Foo extends Controller {
+ public function list($index) {
+ // Logic of the code
+ }
+}
+```
+
+`$index` in the function `list` here would automatically be read from `$_GET`, to make the static scanners aware of that
+the resulting code would look like:
+
+```php
+<?php
+use OCP\AppFramework\Controller;
+
+class Foo extends Controller {
+ public function list($index) {
+ $index = $_GET['index'];
+ // Logic of the code
+ }
+}
+```
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..f5b83b2
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+ "require": {
+ "nikic/PHP-Parser": "^3.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "Instrumentalizator\\": "src/"
+ }
+ }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 0000000..70343b2
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,70 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "This file is @generated automatically"
+ ],
+ "hash": "4079b9ab6ddc053369173bf7df6e1060",
+ "content-hash": "138fb38e13d0c7f48654c219ef423c15",
+ "packages": [
+ {
+ "name": "nikic/php-parser",
+ "version": "v3.0.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/PHP-Parser.git",
+ "reference": "adf44419c0fc014a0f191db6f89d3e55d4211744"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/adf44419c0fc014a0f191db6f89d3e55d4211744",
+ "reference": "adf44419c0fc014a0f191db6f89d3e55d4211744",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0|~5.0"
+ },
+ "bin": [
+ "bin/php-parse"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PhpParser\\": "lib/PhpParser"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Nikita Popov"
+ }
+ ],
+ "description": "A PHP parser written in PHP",
+ "keywords": [
+ "parser",
+ "php"
+ ],
+ "time": "2016-12-06 11:30:35"
+ }
+ ],
+ "packages-dev": [],
+ "aliases": [],
+ "minimum-stability": "stable",
+ "stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": [],
+ "platform-dev": []
+}
diff --git a/instrumentalize.php b/instrumentalize.php
new file mode 100644
index 0000000..d292c8e
--- /dev/null
+++ b/instrumentalize.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+require_once __DIR__ . '/vendor/autoload.php';
+
+if(count($argv) !== 2) {
+ die(__FILE__ . ' $folder' . "\n");
+}
+
+$folderToScan = realpath($argv[1]);
+
+ini_set('xdebug.max_nesting_level', 3000);
+
+$scanner = new \Instrumentalizator\Scanner();
+
+$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($folderToScan),
+ RecursiveIteratorIterator::SELF_FIRST);
+foreach ($objects as $fileName => $object) {
+ if(substr($fileName, -4) === '.php') {
+ echo(sprintf(
+ "Processing file %s\n",
+ $fileName
+ ));
+ $generatedCode = $scanner->scanFile($fileName);
+ if ($generatedCode !== '') {
+ file_put_contents($fileName, $generatedCode);
+ echo(sprintf(
+ "Instrumentalized file %s\n",
+ $fileName
+ ));
+ } else {
+ echo(
+ sprintf(
+ "Did not instrumentalize file %s\n",
+ $fileName
+ )
+ );
+ }
+ }
+}
diff --git a/src/Scanner.php b/src/Scanner.php
new file mode 100644
index 0000000..d4b52d4
--- /dev/null
+++ b/src/Scanner.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace Instrumentalizator;
+
+use Instrumentalizator\Visitor\NodeVisitor;
+use Instrumentalizator\Visitor\PublicFunctionVisitor;
+use PhpParser\ParserFactory;
+use PhpParser\PrettyPrinter\Standard;
+use PhpParser\NodeTraverser;
+
+class Scanner {
+
+ public function scanFile($file) {
+ try {
+ $parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
+ $stmts = $parser->parse(file_get_contents($file));
+
+ // Check if the file uses the Controller
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor(new \Instrumentalizator\Visitor\UsesControllerClass());
+ $stmts = $traverser->traverse($stmts);
+
+ // Check if the file Extends the Controller
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor(new NodeVisitor());
+ $stmts = $traverser->traverse($stmts);
+
+ // Now loop over all public functions
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor(new PublicFunctionVisitor());
+ $stmts = $traverser->traverse($stmts);
+
+ $printer = new Standard();
+ return "<?php\n" . $printer->prettyPrint($stmts);
+ } catch (\Exception $e) {
+ return '';
+ }
+ }
+}
diff --git a/src/Visitor/NodeVisitor.php b/src/Visitor/NodeVisitor.php
new file mode 100644
index 0000000..5cae9ec
--- /dev/null
+++ b/src/Visitor/NodeVisitor.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace Instrumentalizator\Visitor;
+
+use PhpParser\Node;
+use PhpParser\NodeVisitorAbstract;
+
+class NodeVisitor extends NodeVisitorAbstract {
+ private $extendsController = false;
+
+ public function enterNode(Node $node) {
+ if($node instanceof Node\Stmt\Class_) {
+ if($node->extends &&
+ $node->extends->getFirst() === 'Controller') {
+ $this->extendsController = true;
+ }
+ }
+ }
+
+ public function afterTraverse(array $nodes) {
+ if($this->extendsController === false) {
+ throw new \Exception('Controller is not extended in this file');
+ }
+ }
+}
diff --git a/src/Visitor/PublicFunctionVisitor.php b/src/Visitor/PublicFunctionVisitor.php
new file mode 100644
index 0000000..4ad3157
--- /dev/null
+++ b/src/Visitor/PublicFunctionVisitor.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace Instrumentalizator\Visitor;
+
+use PhpParser\Node;
+use PhpParser\NodeVisitorAbstract;
+
+class PublicFunctionVisitor extends NodeVisitorAbstract {
+ public function enterNode(Node $node) {
+ if(
+ $node instanceof Node\Stmt\ClassMethod &&
+ $node->name !== '__construct' &&
+ $node->flags === Node\Stmt\Class_::MODIFIER_PUBLIC
+ ) {
+ /** @var Node\Param[] $params */
+ $params = $node->getParams();
+ foreach($params as $param) {
+ $var = new Node\Expr\Variable($param->name);
+ $expr = new Node\Expr\Variable('_GET');
+ $expr = new Node\Expr\ArrayDimFetch($expr, new Node\Scalar\String_($param->name));
+ array_unshift($node->stmts, new Node\Expr\Assign($var, $expr));
+ }
+
+ }
+
+ return $node;
+ }
+}
diff --git a/src/Visitor/UsesControllerClass.php b/src/Visitor/UsesControllerClass.php
new file mode 100644
index 0000000..c267014
--- /dev/null
+++ b/src/Visitor/UsesControllerClass.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace Instrumentalizator\Visitor;
+
+use PhpParser\Node;
+use PhpParser\NodeVisitorAbstract;
+
+class UsesControllerClass extends NodeVisitorAbstract {
+ private $usesControllerClass = false;
+
+ public function enterNode(Node $node) {
+ if($node instanceof Node\Stmt\Use_) {
+ foreach($node->uses as $subNodes) {
+ $className = implode('\\', $subNodes->name->parts);
+ if($className === 'OCP\\AppFramework\\Controller') {
+ $this->usesControllerClass = true;
+ }
+ }
+ }
+
+ return $node;
+ }
+
+ public function afterTraverse(array $nodes) {
+ if($this->usesControllerClass === false) {
+ throw new \Exception('Controller is not used in this file');
+ }
+ }
+}
diff --git a/vendor/autoload.php b/vendor/autoload.php
new file mode 100644
index 0000000..046ed9f
--- /dev/null
+++ b/vendor/autoload.php
@@ -0,0 +1,7 @@
+<?php
+
+// autoload.php @generated by Composer
+
+require_once __DIR__ . '/composer/autoload_real.php';
+
+return ComposerAutoloaderInit1fc3794b3df2d1e6bf61592ddadfa994::getLoader();
diff --git a/vendor/bin/php-parse b/vendor/bin/php-parse
new file mode 120000
index 0000000..062d66a
--- /dev/null
+++ b/vendor/bin/php-parse
@@ -0,0 +1 @@
+../nikic/php-parser/bin/php-parse \ No newline at end of file
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
new file mode 100644
index 0000000..ac67d30
--- /dev/null
+++ b/vendor/composer/ClassLoader.php
@@ -0,0 +1,415 @@
+<?php
+
+/*
+ * This file is part of Composer.
+ *
+ * (c) Nils Adermann <naderman@naderman.de>
+ * Jordi Boggiano <j.boggiano@seld.be>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
+ *
+ * $loader = new \Composer\Autoload\ClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ * @author Jordi Boggiano <j.boggiano@seld.be>
+ * @see http://www.php-fig.org/psr/psr-0/
+ * @see http://www.php-fig.org/psr/psr-4/
+ */
+class ClassLoader
+{
+ // PSR-4
+ private $prefixLengthsPsr4 = array();
+ private $prefixDirsPsr4 = array();
+ private $fallbackDirsPsr4 = array();
+
+ // PSR-0
+ private $prefixesPsr0 = array();
+ private $fallbackDirsPsr0 = array();
+
+ private $useIncludePath = false;
+ private $classMap = array();
+ private $classMapAuthoritative = false;
+ private $missingClasses = array();
+
+ public function getPrefixes()
+ {
+ if (!empty($this->prefixesPsr0)) {
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
+ }
+
+ return array();
+ }
+
+ public function getPrefixesPsr4()
+ {
+ return $this->prefixDirsPsr4;
+ }
+
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirsPsr0;
+ }
+
+ public function getFallbackDirsPsr4()
+ {
+ return $this->fallbackDirsPsr4;
+ }
+
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param array $classMap Class to filename map
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix, either
+ * appending or prepending to the ones previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
+ */
+ public function add($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ if ($prepend) {
+ $this->fallbackDirsPsr0 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr0
+ );
+ } else {
+ $this->fallbackDirsPsr0 = array_merge(
+ $this->fallbackDirsPsr0,
+ (array) $paths
+ );
+ }
+
+ return;
+ }
+
+ $first = $prefix[0];
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+
+ return;
+ }
+ if ($prepend) {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixesPsr0[$first][$prefix]
+ );
+ } else {
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
+ $this->prefixesPsr0[$first][$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace, either
+ * appending or prepending to the ones previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function addPsr4($prefix, $paths, $prepend = false)
+ {
+ if (!$prefix) {
+ // Register directories for the root namespace.
+ if ($prepend) {
+ $this->fallbackDirsPsr4 = array_merge(
+ (array) $paths,
+ $this->fallbackDirsPsr4
+ );
+ } else {
+ $this->fallbackDirsPsr4 = array_merge(
+ $this->fallbackDirsPsr4,
+ (array) $paths
+ );
+ }
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+ // Register directories for a new namespace.
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ } elseif ($prepend) {
+ // Prepend directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ (array) $paths,
+ $this->prefixDirsPsr4[$prefix]
+ );
+ } else {
+ // Append directories for an already registered namespace.
+ $this->prefixDirsPsr4[$prefix] = array_merge(
+ $this->prefixDirsPsr4[$prefix],
+ (array) $paths
+ );
+ }
+ }
+
+ /**
+ * Registers a set of PSR-0 directories for a given prefix,
+ * replacing any others previously set for this prefix.
+ *
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 base directories
+ */
+ public function set($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr0 = (array) $paths;
+ } else {
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Registers a set of PSR-4 directories for a given namespace,
+ * replacing any others previously set for this namespace.
+ *
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function setPsr4($prefix, $paths)
+ {
+ if (!$prefix) {
+ $this->fallbackDirsPsr4 = (array) $paths;
+ } else {
+ $length = strlen($prefix);
+ if ('\\' !== $prefix[$length - 1]) {
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
+ }
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include path for class files.
+ *
+ * @param bool $useIncludePath
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return bool
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Turns off searching the prefix and fallback directories for classes
+ * that have not been registered with the class map.
+ *
+ * @param bool $classMapAuthoritative
+ */
+ public function setClassMapAuthoritative($classMapAuthoritative)
+ {
+ $this->classMapAuthoritative = $classMapAuthoritative;
+ }
+
+ /**
+ * Should class lookup fail if not found in the current class map?
+ *
+ * @return bool
+ */
+ public function isClassMapAuthoritative()
+ {
+ return $this->classMapAuthoritative;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param bool $prepend Whether to prepend the autoloader or not
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return bool|null True if loaded, null otherwise
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ includeFile($file);
+
+ return true;
+ }
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|false The path if found, false otherwise
+ */
+ public function findFile($class)
+ {
+ // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
+ if ('\\' == $class[0]) {
+ $class = substr($class, 1);
+ }
+
+ // class map lookup
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+ if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
+ return false;
+ }
+
+ $file = $this->findFileWithExtension($class, '.php');
+
+ // Search for Hack files if we are running on HHVM
+ if (false === $file && defined('HHVM_VERSION')) {
+ $file = $this->findFileWithExtension($class, '.hh');
+ }
+
+ if (false === $file) {
+ // Remember that this class does not exist.
+ $this->missingClasses[$class] = true;
+ }
+
+ return $file;
+ }
+
+ private function findFileWithExtension($class, $ext)
+ {
+ // PSR-4 lookup
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
+
+ $first = $class[0];
+ if (isset($this->prefixLengthsPsr4[$first])) {
+ foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-4 fallback dirs
+ foreach ($this->fallbackDirsPsr4 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 lookup
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
+ } else {
+ // PEAR-like class name
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
+ }
+
+ if (isset($this->prefixesPsr0[$first])) {
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+ }
+ }
+ }
+
+ // PSR-0 fallback dirs
+ foreach ($this->fallbackDirsPsr0 as $dir) {
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
+ return $file;
+ }
+ }
+
+ // PSR-0 include paths.
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
+ return $file;
+ }
+
+ return false;
+ }
+}
+
+/**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ */
+function includeFile($file)
+{
+ include $file;
+}
diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE
new file mode 100644
index 0000000..1a28124
--- /dev/null
+++ b/vendor/composer/LICENSE
@@ -0,0 +1,21 @@
+
+Copyright (c) 2016 Nils Adermann, Jordi Boggiano
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
new file mode 100644
index 0000000..7a91153
--- /dev/null
+++ b/vendor/composer/autoload_classmap.php
@@ -0,0 +1,9 @@
+<?php
+
+// autoload_classmap.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+);
diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php
new file mode 100644
index 0000000..b7fc012
--- /dev/null
+++ b/vendor/composer/autoload_namespaces.php
@@ -0,0 +1,9 @@
+<?php
+
+// autoload_namespaces.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+);
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
new file mode 100644
index 0000000..291a802
--- /dev/null
+++ b/vendor/composer/autoload_psr4.php
@@ -0,0 +1,11 @@
+<?php
+
+// autoload_psr4.php @generated by Composer
+
+$vendorDir = dirname(dirname(__FILE__));
+$baseDir = dirname($vendorDir);
+
+return array(
+ 'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
+ 'Instrumentalizator\\' => array($baseDir . '/src'),
+);
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
new file mode 100644
index 0000000..91a9100
--- /dev/null
+++ b/vendor/composer/autoload_real.php
@@ -0,0 +1,52 @@
+<?php
+
+// autoload_real.php @generated by Composer
+
+class ComposerAutoloaderInit1fc3794b3df2d1e6bf61592ddadfa994
+{
+ private static $loader;
+
+ public static function loadClassLoader($class)
+ {
+ if ('Composer\Autoload\ClassLoader' === $class) {
+ require __DIR__ . '/ClassLoader.php';
+ }
+ }
+
+ public static function getLoader()
+ {
+ if (null !== self::$loader) {
+ return self::$loader;
+ }
+
+ spl_autoload_register(array('ComposerAutoloaderInit1fc3794b3df2d1e6bf61592ddadfa994', 'loadClassLoader'), true, true);
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
+ spl_autoload_unregister(array('ComposerAutoloaderInit1fc3794b3df2d1e6bf61592ddadfa994', 'loadClassLoader'));
+
+ $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
+ if ($useStaticLoader) {
+ require_once __DIR__ . '/autoload_static.php';
+
+ call_user_func(\Composer\Autoload\ComposerStaticInit1fc3794b3df2d1e6bf61592ddadfa994::getInitializer($loader));
+ } else {
+ $map = require __DIR__ . '/autoload_namespaces.php';
+ foreach ($map as $namespace => $path) {
+ $loader->set($namespace, $path);
+ }
+
+ $map = require __DIR__ . '/autoload_psr4.php';
+ foreach ($map as $namespace => $path) {
+ $loader->setPsr4($namespace, $path);
+ }
+
+ $classMap = require __DIR__ . '/autoload_classmap.php';
+ if ($classMap) {
+ $loader->addClassMap($classMap);
+ }
+ }
+
+ $loader->register(true);
+
+ return $loader;
+ }
+}
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
new file mode 100644
index 0000000..218b382
--- /dev/null
+++ b/vendor/composer/autoload_static.php
@@ -0,0 +1,39 @@
+<?php
+
+// autoload_static.php @generated by Composer
+
+namespace Composer\Autoload;
+
+class ComposerStaticInit1fc3794b3df2d1e6bf61592ddadfa994
+{
+ public static $prefixLengthsPsr4 = array (
+ 'P' =>
+ array (
+ 'PhpParser\\' => 10,
+ ),
+ 'I' =>
+ array (
+ 'Instrumentalizator\\' => 19,
+ ),
+ );
+
+ public static $prefixDirsPsr4 = array (
+ 'PhpParser\\' =>
+ array (
+ 0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser',
+ ),
+ 'Instrumentalizator\\' =>
+ array (
+ 0 => __DIR__ . '/../..' . '/src',
+ ),
+ );
+
+ public static function getInitializer(ClassLoader $loader)
+ {
+ return \Closure::bind(function () use ($loader) {
+ $loader->prefixLengthsPsr4 = ComposerStaticInit1fc3794b3df2d1e6bf61592ddadfa994::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 = ComposerStaticInit1fc3794b3df2d1e6bf61592ddadfa994::$prefixDirsPsr4;
+
+ }, null, ClassLoader::class);
+ }
+}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
new file mode 100644
index 0000000..2c17458
--- /dev/null
+++ b/vendor/composer/installed.json
@@ -0,0 +1,55 @@
+[
+ {
+ "name": "nikic/php-parser",
+ "version": "v3.0.2",
+ "version_normalized": "3.0.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/PHP-Parser.git",
+ "reference": "adf44419c0fc014a0f191db6f89d3e55d4211744"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/adf44419c0fc014a0f191db6f89d3e55d4211744",
+ "reference": "adf44419c0fc014a0f191db6f89d3e55d4211744",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=5.5"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0|~5.0"
+ },
+ "time": "2016-12-06 11:30:35",
+ "bin": [
+ "bin/php-parse"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "PhpParser\\": "lib/PhpParser"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Nikita Popov"
+ }
+ ],
+ "description": "A PHP parser written in PHP",
+ "keywords": [
+ "parser",
+ "php"
+ ]
+ }
+]
diff --git a/vendor/nikic/php-parser/.gitignore b/vendor/nikic/php-parser/.gitignore
new file mode 100644
index 0000000..8c7db2a
--- /dev/null
+++ b/vendor/nikic/php-parser/.gitignore
@@ -0,0 +1,4 @@
+vendor/
+composer.lock
+grammar/kmyacc.exe
+grammar/y.output
diff --git a/vendor/nikic/php-parser/.travis.yml b/vendor/nikic/php-parser/.travis.yml
new file mode 100644
index 0000000..933600f
--- /dev/null
+++ b/vendor/nikic/php-parser/.travis.yml
@@ -0,0 +1,31 @@
+language: php
+
+sudo: false
+
+cache:
+ directories:
+ - $HOME/.composer/cache
+
+php:
+ - 5.5
+ - 5.6
+ - 7.0
+ - nightly
+ - hhvm
+
+install:
+ - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then composer require satooshi/php-coveralls '~1.0'; fi
+ - composer install --prefer-dist
+
+matrix:
+ allow_failures:
+ - php: nightly
+ fast_finish: true
+
+script:
+ - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; else vendor/bin/phpunit; fi
+ - if [ $TRAVIS_PHP_VERSION = '7.0' ]; then test_old/run-php-src.sh; fi
+
+after_success:
+ if [ $TRAVIS_PHP_VERSION = '5.6' ]; then php vendor/bin/coveralls; fi
+
diff --git a/vendor/nikic/php-parser/CHANGELOG.md b/vendor/nikic/php-parser/CHANGELOG.md
new file mode 100644
index 0000000..923ce16
--- /dev/null
+++ b/vendor/nikic/php-parser/CHANGELOG.md
@@ -0,0 +1,293 @@
+Version 3.0.3-dev
+-----------------
+
+Nothing yet.
+
+Version 3.0.2 (2016-12-06)
+--------------------------
+
+### Fixed
+
+* Fixed name resolution of nullable types.
+* Fixed pretty-printing of nullable types.
+
+Version 3.0.1 (2016-12-01)
+--------------------------
+
+### Fixed
+
+* Fixed handling of nested `list()`s: If the nested list was unkeyed, it was directly included in
+ the list items. If it was keyed, it was wrapped in `ArrayItem`. Now nested `List_` nodes are
+ always wrapped in `ArrayItem`s.
+
+Version 3.0.0 (2016-11-30)
+--------------------------
+
+### Added
+
+* Added support for dumping node positions in the NodeDumper through the `dumpPositions` option.
+* Added error recovery support for `$`, `new`, `Foo::`.
+
+Version 3.0.0-beta2 (2016-10-29)
+--------------------------------
+
+This release primarily improves our support for error recovery.
+
+### Added
+
+* Added `Node::setDocComment()` method.
+* Added `Error::getMessageWithColumnInfo()` method.
+* Added support for recovery from lexer errors.
+* Added support for recovering from "special" errors (i.e. non-syntax parse errors).
+* Added precise location information for lexer errors.
+* Added `ErrorHandler` interface, and `ErrorHandler\Throwing` and `ErrorHandler\Collecting` as
+ specific implementations. These provide a general mechanism for handling error recovery.
+* Added optional `ErrorHandler` argument to `Parser::parse()`, `Lexer::startLexing()` and
+ `NameResolver::__construct()`.
+* The `NameResolver` now adds a `namespacedName` attribute on name nodes that cannot be statically
+ resolved (unqualified unaliased function or constant names in namespaces).
+
+### Fixed
+
+* Fixed attribute assignment for `GroupUse` prefix and variables in interpolated strings.
+
+### Changed
+
+* The constants on `NameTraverserInterface` have been moved into the `NameTraverser` class.
+* Due to the error handling changes, the `Parser` interface and `Lexer` API have changed.
+* The emulative lexer now directly postprocesses tokens, instead of using `~__EMU__~` sequences.
+ This changes the protected API of the lexer.
+* The `Name::slice()` method now returns `null` for empty slices, previously `new Name([])` was
+ used. `Name::concat()` now also supports concatenation with `null`.
+
+### Removed
+
+* Removed `Name::append()` and `Name::prepend()`. These mutable methods have been superseded by
+ the immutable `Name::concat()`.
+* Removed `Error::getRawLine()` and `Error::setRawLine()`. These methods have been superseded by
+ `Error::getStartLine()` and `Error::setStartLine()`.
+* Removed support for node cloning in the `NodeTraverser`.
+* Removed `$separator` argument from `Name::toString()`.
+* Removed `throw_on_error` parser option and `Parser::getErrors()` method. Use the `ErrorHandler`
+ mechanism instead.
+
+Version 3.0.0-beta1 (2016-09-16)
+--------------------------------
+
+### Added
+
+* [7.1] Function/method and parameter builders now support PHP 7.1 type hints (void, iterable and
+ nullable types).
+* Nodes and Comments now implement `JsonSerializable`. The node kind is stored in a `nodeType`
+ property.
+* The `InlineHTML` node now has an `hasLeadingNewline` attribute, that specifies whether the
+ preceding closing tag contained a newline. The pretty printer honors this attribute.
+* Partial parsing of `$obj->` (with missing property name) is now supported in error recovery mode.
+* The error recovery mode is now exposed in the `php-parse` script through the `--with-recovery`
+ or `-r` flags.
+
+The following changes are also part of PHP-Parser 2.1.1:
+
+* The PHP 7 parser will now generate a parse error for `$var =& new Obj` assignments.
+* Comments on free-standing code blocks will now be retained as comments on the first statement in
+ the code block.
+
+Version 3.0.0-alpha1 (2016-07-25)
+---------------------------------
+
+### Added
+
+* [7.1] Added support for `void` and `iterable` types. These will now be represented as strings
+ (instead of `Name` instances) similar to other builtin types.
+* [7.1] Added support for class constant visibility. The `ClassConst` node now has a `flags` subnode
+ holding the visibility modifier, as well as `isPublic()`, `isProtected()` and `isPrivate()`
+ methods. The constructor changed to accept the additional subnode.
+* [7.1] Added support for nullable types. These are represented using a new `NullableType` node
+ with a single `type` subnode.
+* [7.1] Added support for short array destructuring syntax. This means that `Array` nodes may now
+ appear as the left-hand-side of assignments and foreach value targets. Additionally the array
+ items may now contain `null` values if elements are skipped.
+* [7.1] Added support for keys in list() destructuring. The `List` subnode `vars` has been renamed
+ to `items` and now contains `ArrayItem`s instead of plain variables.
+* [7.1] Added support for multi-catch. The `Catch` subnode `type` has been renamed to `types` and
+ is now an array of `Name`s.
+* `Name::slice()` now supports lengths and negative offsets. This brings it in line with
+ `array_slice()` functionality.
+
+### Changed
+
+Due to PHP 7.1 support additions described above, the node structure changed as follows:
+
+* `void` and `iterable` types are now stored as strings if the PHP 7 parser is used.
+* The `ClassConst` constructor changed to accept an additional `flags` subnode.
+* The `Array` subnode `items` may now contain `null` elements (destructuring).
+* The `List` subnode `vars` has been renamed to `items` and now contains `ArrayItem`s instead of
+ plain variables.
+* The `Catch` subnode `type` has been renamed to `types` and is now an array of `Name`s.
+
+Additionally the following changes were made:
+
+* The `type` subnode on `Class`, `ClassMethod` and `Property` has been renamed to `flags`. The
+ `type` subnode has retained for backwards compatibility and is populated to the same value as
+ `flags`. However, writes to `type` will not update `flags`.
+* The `TryCatch` subnode `finallyStmts` has been replaced with a `finally` subnode that holds an
+ explicit `Finally` node. This allows for more accurate attribute assignment.
+* The `Trait` constructor now has the same form as the `Class` and `Interface` constructors: It
+ takes an array of subnodes. Unlike classes/interfaces, traits can only have a `stmts` subnode.
+* The `NodeDumper` now prints class/method/property/constant modifiers, as well as the include and
+ use type in a textual representation, instead of only showing the number.
+* All methods on `PrettyPrinter\Standard` are now protected. Previoulsy most of them were public.
+
+### Removed
+
+* Removed support for running on PHP 5.4. It is however still possible to parse PHP 5.2-5.4 code
+ while running on a newer version.
+* The deprecated `Comment::setLine()` and `Comment::setText()` methods have been removed.
+* The deprecated `Name::set()`, `Name::setFirst()` and `Name::setLast()` methods have been removed.
+
+Version 2.1.1 (2016-09-16)
+--------------------------
+
+### Changed
+
+* The pretty printer will now escape all control characters in the range `\x00-\x1F` inside double
+ quoted strings. If no special escape sequence is available, an octal escape will be used.
+* The quality of the error recovery has been improved. In particular unterminated expressions should
+ be handled more gracefully.
+* The PHP 7 parser will now generate a parse error for `$var =& new Obj` assignments.
+* Comments on free-standing code blocks will no be retained as comments on the first statement in
+ the code block.
+
+Version 2.1.0 (2016-04-19)
+--------------------------
+
+### Fixed
+
+* Properly support `B""` strings (with uppercase `B`) in a number of places.
+* Fixed reformatting of indented parts in a certain non-standard comment style.
+
+### Added
+
+* Added `dumpComments` option to node dumper, to enable dumping of comments associated with nodes.
+* Added `Stmt\Nop` node, that is used to collect comments located at the end of a block or at the
+ end of a file (without a following node with which they could otherwise be associated).
+* Added `kind` attribute to `Expr\Exit` to distinguish between `exit` and `die`.
+* Added `kind` attribute to `Scalar\LNumber` to distinguish between decimal, binary, octal and
+ hexadecimal numbers.
+* Added `kind` attribtue to `Expr\Array` to distinguish between `array()` and `[]`.
+* Added `kind` attribute to `Scalar\String` and `Scalar\Encapsed` to distinguish between
+ single-quoted, double-quoted, heredoc and nowdoc string.
+* Added `docLabel` attribute to `Scalar\String` and `Scalar\Encapsed`, if it is a heredoc or
+ nowdoc string.
+* Added start file offset information to `Comment` nodes.
+* Added `setReturnType()` method to function and method builders.
+* Added `-h` and `--help` options to `php-parse` script.
+
+### Changed
+
+* Invalid octal literals now throw a parse error in PHP 7 mode.
+* The pretty printer takes all the new attributes mentioned in the previous section into account.
+* The protected `AbstractPrettyPrinter::pComments()` method no longer returns a trailing newline.
+* The bundled autoloader supports library files being stored in a different directory than
+ `PhpParser` for easier downstream distribution.
+
+### Deprecated
+
+* The `Comment::setLine()` and `Comment::setText()` methods have been deprecated. Construct new
+ objects instead.
+
+### Removed
+
+* The internal (but public) method `Scalar\LNumber::parse()` has been removed. A non-internal
+ `LNumber::fromString()` method has been added instead.
+
+Version 2.0.1 (2016-02-28)
+--------------------------
+
+### Fixed
+
+* `declare() {}` and `declare();` are not semantically equivalent and will now result in different
+ ASTs. The format case will have an empty `stmts` array, while the latter will set `stmts` to
+ `null`.
+* Magic constants are now supported as semi-reserved keywords.
+* A shebang line like `#!/usr/bin/env php` is now allowed at the start of a namespaced file.
+ Previously this generated an exception.
+* The `prettyPrintFile()` method will not strip a trailing `?>` from the raw data that follows a
+ `__halt_compiler()` statement.
+* The `prettyPrintFile()` method will not strip an opening `<?php` if the file starts with a
+ comment followed by InlineHTML.
+
+Version 2.0.0 (2015-12-04)
+--------------------------
+
+### Changed
+
+* String parts of encapsed strings are now represented using `Scalar\EncapsStringPart` nodes.
+ Previously raw strings were used. This affects the `parts` child of `Scalar\Encaps` and
+ `Expr\ShellExec`. The change has been done to allow assignment of attributes to encapsed string
+ parts.
+
+Version 2.0.0-beta1 (2015-10-21)
+--------------------------------
+
+### Fixed
+
+* Fixed issue with too many newlines being stripped at the end of heredoc/nowdoc strings in some
+ cases. (#227)
+
+### Changed
+
+* Update group use support to be in line with recent PHP 7.0 builds.
+* Renamed `php-parse.php` to `php-parse` and registered it as a composer bin.
+* Use composer PSR-4 autoloader instead of custom autoloader.
+* Specify phpunit as a dev dependency.
+
+### Added
+
+* Added `shortArraySyntax` option to pretty printer, to print all arrays using short syntax.
+
+Version 2.0.0-alpha1 (2015-07-14)
+---------------------------------
+
+A more detailed description of backwards incompatible changes can be found in the
+[upgrading guide](UPGRADE-2.0.md).
+
+### Removed
+
+* Removed support for running on PHP 5.3. It is however still possible to parse PHP 5.2 and PHP 5.3
+ code while running on a newer version.
+* Removed legacy class name aliases. This includes the old non-namespaced class names and the old
+ names for classes that were renamed for PHP 7 compatibility.
+* Removed support for legacy node format. All nodes must have a `getSubNodeNames()` method now.
+
+### Added
+
+* Added support for remaining PHP 7 features that were not present in 1.x:
+ * Group use declarations. These are represented using `Stmt\GroupUse` nodes. Furthermore a `type`
+ attribute was added to `Stmt\UseUse` to handle mixed group use declarations.
+ * Uniform variable syntax.
+ * Generalized yield operator.
+ * Scalar type declarations. These are presented using `'bool'`, `'int'`, `'float'` and `'string'`
+ as the type. The PHP 5 parser also accepts these, however they'll be `Name` instances there.
+ * Unicode escape sequences.
+* Added `PhpParser\ParserFactory` class, which should be used to create parser instances.
+* Added `Name::concat()` which concatenates two names.
+* Added `Name->slice()` which takes a subslice of a name.
+
+### Changed
+
+* `PhpParser\Parser` is now an interface, implemented by `Parser\Php5`, `Parser\Php7` and
+ `Parser\Multiple`. The `Multiple` parser will try multiple parsers, until one succeeds.
+* Token constants are now defined on `PhpParser\Parser\Tokens` rather than `PhpParser\Parser`.
+* The `Name->set()`, `Name->append()`, `Name->prepend()` and `Name->setFirst()` methods are
+ deprecated in favor of `Name::concat()` and `Name->slice()`.
+* The `NodeTraverser` no longer clones nodes by default. The old behavior can be restored by
+ passing `true` to the constructor.
+* The constructor for `Scalar` nodes no longer has a default value. E.g. `new LNumber()` should now
+ be written as `new LNumber(0)`.
+
+---
+
+**This changelog only includes changes from the 2.0 series. For older changes see the
+[1.x series changelog](https://github.com/nikic/PHP-Parser/blob/1.x/CHANGELOG.md) and the
+[0.9 series changelog](https://github.com/nikic/PHP-Parser/blob/0.9/CHANGELOG.md).** \ No newline at end of file
diff --git a/vendor/nikic/php-parser/LICENSE b/vendor/nikic/php-parser/LICENSE
new file mode 100644
index 0000000..443210b
--- /dev/null
+++ b/vendor/nikic/php-parser/LICENSE
@@ -0,0 +1,31 @@
+Copyright (c) 2011 by Nikita Popov.
+
+Some rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * The names of the contributors may not be used to endorse or
+ promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/vendor/nikic/php-parser/README.md b/vendor/nikic/php-parser/README.md
new file mode 100644
index 0000000..2f62754
--- /dev/null
+++ b/vendor/nikic/php-parser/README.md
@@ -0,0 +1,99 @@
+PHP Parser
+==========
+
+[![Build Status](https://travis-ci.org/nikic/PHP-Parser.svg?branch=master)](https://travis-ci.org/nikic/PHP-Parser) [![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master)
+
+This is a PHP 5.2 to PHP 7.1 parser written in PHP. Its purpose is to simplify static code analysis and
+manipulation.
+
+[**Documentation for version 3.x**][doc_master] (stable; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.1).
+
+[Documentation for version 2.x][doc_2_x] (stable; for running on PHP >= 5.4; for parsing PHP 5.2 to PHP 7.0).
+
+[Documentation for version 1.x][doc_1_x] (unsupported; for running on PHP >= 5.3; for parsing PHP 5.2 to PHP 5.6).
+
+In a Nutshell
+-------------
+
+The parser turns PHP source code into an abstract syntax tree. For example, if you pass the following code into the
+parser:
+
+```php
+<?php
+echo 'Hi', 'World';
+hello\world('foo', 'bar' . 'baz');
+```
+
+You'll get a syntax tree looking roughly like this:
+
+```php
+array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_String(
+ value: Hi
+ )
+ 1: Scalar_String(
+ value: World
+ )
+ )
+ )
+ 1: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: hello
+ 1: world
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: foo
+ )
+ byRef: false
+ )
+ 1: Arg(
+ value: Expr_Concat(
+ left: Scalar_String(
+ value: bar
+ )
+ right: Scalar_String(
+ value: baz
+ )
+ )
+ byRef: false
+ )
+ )
+ )
+)
+```
+
+You can then work with this syntax tree, for example to statically analyze the code (e.g. to find
+programming errors or security issues).
+
+Additionally, you can convert a syntax tree back to PHP code. This allows you to do code preprocessing
+(like automatedly porting code to older PHP versions).
+
+Installation
+------------
+
+The preferred installation method is [composer](https://getcomposer.org):
+
+ php composer.phar require nikic/php-parser
+
+Documentation
+-------------
+
+ 1. [Introduction](doc/0_Introduction.markdown)
+ 2. [Usage of basic components](doc/2_Usage_of_basic_components.markdown)
+ 3. [Other node tree representations](doc/3_Other_node_tree_representations.markdown)
+ 4. [Code generation](doc/4_Code_generation.markdown)
+
+Component documentation:
+
+ 1. [Error handling](doc/component/Error_handling.markdown)
+ 2. [Lexer](doc/component/Lexer.markdown)
+
+ [doc_1_x]: https://github.com/nikic/PHP-Parser/tree/1.x/doc
+ [doc_2_x]: https://github.com/nikic/PHP-Parser/tree/2.x/doc
+ [doc_master]: https://github.com/nikic/PHP-Parser/tree/master/doc
diff --git a/vendor/nikic/php-parser/UPGRADE-1.0.md b/vendor/nikic/php-parser/UPGRADE-1.0.md
new file mode 100644
index 0000000..6a9ee26
--- /dev/null
+++ b/vendor/nikic/php-parser/UPGRADE-1.0.md
@@ -0,0 +1,121 @@
+Upgrading from PHP-Parser 0.9 to 1.0
+====================================
+
+### PHP version requirements
+
+PHP-Parser now requires PHP 5.3 or newer to run. It is however still possible to *parse* PHP 5.2 source code, while
+running on a newer version.
+
+### Move to namespaced names
+
+The library has been moved to use namespaces with the `PhpParser` vendor prefix. However, the old names using
+underscores are still available as aliases, as such most code should continue running on the new version without
+further changes.
+
+Old (still works, but discouraged):
+
+```php
+$parser = new \PHPParser_Parser(new \PHPParser_Lexer_Emulative);
+$prettyPrinter = new \PHPParser_PrettyPrinter_Default;
+```
+
+New:
+
+```php
+$parser = new \PhpParser\Parser(new PhpParser\Lexer\Emulative);
+$prettyPrinter = new \PhpParser\PrettyPrinter\Standard;
+```
+
+Note that the `PHPParser` prefix was changed to `PhpParser`. While PHP class names are technically case-insensitive,
+the autoloader will not be able to load `PHPParser\Parser` or other case variants.
+
+Due to conflicts with reserved keywords, some class names now end with an underscore, e.g. `PHPParser_Node_Stmt_Class`
+is now `PhpParser\Node\Stmt\Class_`. (But as usual, the old name is still available.)
+
+### Changes to `Node::getType()`
+
+The `Node::getType()` method continues to return names using underscores instead of namespace separators and also does
+not contain the trailing underscore that may be present in the class name. As such its output will not change in many
+cases.
+
+However, some node classes have been moved to a different namespace or renamed, which will result in a different
+`Node::getType()` output:
+
+```
+Expr_AssignBitwiseAnd => Expr_AssignOp_BitwiseAnd
+Expr_AssignBitwiseOr => Expr_AssignOp_BitwiseOr
+Expr_AssignBitwiseXor => Expr_AssignOp_BitwiseXor
+Expr_AssignConcat => Expr_AssignOp_Concat
+Expr_AssignDiv => Expr_AssignOp_Div
+Expr_AssignMinus => Expr_AssignOp_Minus
+Expr_AssignMod => Expr_AssignOp_Mod
+Expr_AssignMul => Expr_AssignOp_Mul
+Expr_AssignPlus => Expr_AssignOp_Plus
+Expr_AssignShiftLeft => Expr_AssignOp_ShiftLeft
+Expr_AssignShiftRight => Expr_AssignOp_ShiftRight
+
+Expr_BitwiseAnd => Expr_BinaryOp_BitwiseAnd
+Expr_BitwiseOr => Expr_BinaryOp_BitwiseOr
+Expr_BitwiseXor => Expr_BinaryOp_BitwiseXor
+Expr_BooleanAnd => Expr_BinaryOp_BooleanAnd
+Expr_BooleanOr => Expr_BinaryOp_BooleanOr
+Expr_Concat => Expr_BinaryOp_Concat
+Expr_Div => Expr_BinaryOp_Div
+Expr_Equal => Expr_BinaryOp_Equal
+Expr_Greater => Expr_BinaryOp_Greater
+Expr_GreaterOrEqual => Expr_BinaryOp_GreaterOrEqual
+Expr_Identical => Expr_BinaryOp_Identical
+Expr_LogicalAnd => Expr_BinaryOp_LogicalAnd
+Expr_LogicalOr => Expr_BinaryOp_LogicalOr
+Expr_LogicalXor => Expr_BinaryOp_LogicalXor
+Expr_Minus => Expr_BinaryOp_Minus
+Expr_Mod => Expr_BinaryOp_Mod
+Expr_Mul => Expr_BinaryOp_Mul
+Expr_NotEqual => Expr_BinaryOp_NotEqual
+Expr_NotIdentical => Expr_BinaryOp_NotIdentical
+Expr_Plus => Expr_BinaryOp_Plus
+Expr_ShiftLeft => Expr_BinaryOp_ShiftLeft
+Expr_ShiftRight => Expr_BinaryOp_ShiftRight
+Expr_Smaller => Expr_BinaryOp_Smaller
+Expr_SmallerOrEqual => Expr_BinaryOp_SmallerOrEqual
+
+Scalar_ClassConst => Scalar_MagicConst_Class
+Scalar_DirConst => Scalar_MagicConst_Dir
+Scalar_FileConst => Scalar_MagicConst_File
+Scalar_FuncConst => Scalar_MagicConst_Function
+Scalar_LineConst => Scalar_MagicConst_Line
+Scalar_MethodConst => Scalar_MagicConst_Method
+Scalar_NSConst => Scalar_MagicConst_Namespace
+Scalar_TraitConst => Scalar_MagicConst_Trait
+```
+
+These changes may affect custom pretty printers and code comparing the return value of `Node::getType()` to specific
+strings.
+
+### Miscellaneous
+
+ * The classes `Template` and `TemplateLoader` have been removed. You should use some other [code generation][code_gen]
+ project built on top of PHP-Parser instead.
+
+ * The `PrettyPrinterAbstract::pStmts()` method now emits a leading newline if the statement list is not empty.
+ Custom pretty printers should remove the explicit newline before `pStmts()` calls.
+
+ Old:
+
+ ```php
+ public function pStmt_Trait(PHPParser_Node_Stmt_Trait $node) {
+ return 'trait ' . $node->name
+ . "\n" . '{' . "\n" . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+ ```
+
+ New:
+
+ ```php
+ public function pStmt_Trait(Stmt\Trait_ $node) {
+ return 'trait ' . $node->name
+ . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+ ```
+
+ [code_gen]: https://github.com/nikic/PHP-Parser/wiki/Projects-using-the-PHP-Parser#code-generation \ No newline at end of file
diff --git a/vendor/nikic/php-parser/UPGRADE-2.0.md b/vendor/nikic/php-parser/UPGRADE-2.0.md
new file mode 100644
index 0000000..1c61de5
--- /dev/null
+++ b/vendor/nikic/php-parser/UPGRADE-2.0.md
@@ -0,0 +1,74 @@
+Upgrading from PHP-Parser 1.x to 2.0
+====================================
+
+### PHP version requirements
+
+PHP-Parser now requires PHP 5.4 or newer to run. It is however still possible to *parse* PHP 5.2 and
+PHP 5.3 source code, while running on a newer version.
+
+### Creating a parser instance
+
+Parser instances should now be created through the `ParserFactory`. Old direct instantiation code
+will not work, because the parser class was renamed.
+
+Old:
+
+```php
+use PhpParser\Parser, PhpParser\Lexer;
+$parser = new Parser(new Lexer\Emulative);
+```
+
+New:
+
+```php
+use PhpParser\ParserFactory;
+$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
+```
+
+The first argument to `ParserFactory` determines how different PHP versions are handled. The
+possible values are:
+
+ * `ParserFactory::PREFER_PHP7`: Try to parse code as PHP 7. If this fails, try to parse it as PHP 5.
+ * `ParserFactory::PREFER_PHP5`: Try to parse code as PHP 5. If this fails, try to parse it as PHP 7.
+ * `ParserFactory::ONLY_PHP7`: Parse code as PHP 7.
+ * `ParserFactory::ONLY_PHP5`: Parse code as PHP 5.
+
+For most practical purposes the difference between `PREFER_PHP7` and `PREFER_PHP5` is mainly whether
+a scalar type hint like `string` will be stored as `'string'` (PHP 7) or as `new Name('string')`
+(PHP 5).
+
+To use a custom lexer, pass it as the second argument to the `create()` method:
+
+```php
+use PhpParser\ParserFactory;
+$lexer = new MyLexer;
+$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7, $lexer);
+```
+
+### Rename of the `PhpParser\Parser` class
+
+`PhpParser\Parser` is now an interface, which is implemented by `Parser\Php5`, `Parser\Php7` and
+`Parser\Multiple`. Parser tokens are now defined in `Parser\Tokens`. If you use the `ParserFactory`
+described above to create your parser instance, these changes should have no further impact on you.
+
+### Removal of legacy aliases
+
+All legacy aliases for classes have been removed. This includes the old non-namespaced `PHPParser_`
+classes, as well as the classes that had to be renamed for PHP 7 support.
+
+### Deprecations
+
+The `set()`, `setFirst()`, `append()` and `prepend()` methods of the `Node\Name` class have been
+deprecated. Instead `Name::concat()` and `Name->slice()` should be used.
+
+### Miscellaneous
+
+* The `NodeTraverser` no longer clones nodes by default. If you want to restore the old behavior,
+ pass `true` to the constructor.
+* The legacy node format has been removed. If you use custom nodes, they are now expected to
+ implement a `getSubNodeNames()` method.
+* The default value for `Scalar` node constructors was removed. This means that something like
+ `new LNumber()` should be replaced by `new LNumber(0)`.
+* String parts of encapsed strings are now represented using `Scalar\EncapsStringPart` nodes, while
+ previously raw strings were used. This affects the `parts` child of `Scalar\Encaps` and
+ `Expr\ShellExec`. \ No newline at end of file
diff --git a/vendor/nikic/php-parser/UPGRADE-3.0.md b/vendor/nikic/php-parser/UPGRADE-3.0.md
new file mode 100644
index 0000000..6fad42e
--- /dev/null
+++ b/vendor/nikic/php-parser/UPGRADE-3.0.md
@@ -0,0 +1,156 @@
+Upgrading from PHP-Parser 2.x to 3.0
+====================================
+
+The backwards-incompatible changes in this release may be summarized as follows:
+
+ * The specific details of the node representation have changed in some cases, primarily to
+ accomodate new PHP 7.1 features.
+ * There have been significant changes to the error recovery implementation. This may affect you,
+ if you used the error recovery mode or have a custom lexer implementation.
+ * A number of deprecated methods were removed.
+
+### PHP version requirements
+
+PHP-Parser now requires PHP 5.5 or newer to run. It is however still possible to *parse* PHP 5.2,
+5.3 and 5.4 source code, while running on a newer version.
+
+### Changes to the node structure
+
+The following changes are likely to require code changes if the respective nodes are used:
+
+ * The `List` subnode `vars` has been renamed to `items` and now contains `ArrayItem`s instead of
+ plain variables.
+ * The `Catch` subnode `type` has been renamed to `types` and is now an array of `Name`s.
+ * The `TryCatch` subnode `finallyStmts` has been replaced with a `finally` subnode that holds an
+ explicit `Finally` node.
+ * The `type` subnode on `Class`, `ClassMethod` and `Property` has been renamed to `flags`. The
+ `type` subnode has retained for backwards compatibility and is populated to the same value as
+ `flags`. However, writes to `type` will not update `flags` and use of `type` is discouraged.
+
+The following changes are unlikely to require code changes:
+
+ * The `ClassConst` constructor changed to accept an additional `flags` subnode.
+ * The `Trait` constructor now has the same form as the `Class` and `Interface` constructors: It
+ takes an array of subnodes. Unlike classes/interfaces, traits can only have a `stmts` subnode.
+ * The `Array` subnode `items` may now contain `null` elements (due to destructuring).
+ * `void` and `iterable` types are now stored as strings if the PHP 7 parser is used. Previously
+ these would have been represented as `Name` instances.
+
+### Changes to error recovery mode
+
+Previously, error recovery mode was enabled by setting the `throwOnError` option to `false` when
+creating the parser, while collected errors were retrieved using the `getErrors()` method:
+
+```php
+$lexer = ...;
+$parser = (new ParserFactory)->create(ParserFactor::ONLY_PHP7, $lexer, [
+ 'throwOnError' => true,
+]);
+
+$stmts = $parser->parse($code);
+$errors = $parser->getErrors();
+if ($errors) {
+ handleErrors($errors);
+}
+processAst($stmts);
+```
+
+Both the `throwOnError` option and the `getErrors()` method have been removed in PHP-Parser 3.0.
+Instead an instance of `ErrorHandler\Collecting` should be passed to the `parse()` method:
+
+```php
+$lexer = ...;
+$parser = (new ParserFactory)->create(ParserFactor::ONLY_PHP7, $lexer);
+
+$errorHandler = new ErrorHandler\Collecting;
+$stmts = $parser->parse($code, $errorHandler);
+if ($errorHandler->hasErrors()) {
+ handleErrors($errorHandler->getErrors());
+}
+processAst($stmts);
+```
+
+#### Multiple parser fallback in error recovery mode
+
+As a result of this change, if a `Multiple` parser is used (e.g. through the `ParserFactory` using
+`PREFER_PHP7` or `PREFER_PHP5`), it will now return the result of the first *non-throwing* parse. As
+parsing never throws in error recovery mode, the result from the first parser will always be
+returned.
+
+The PHP 7 parser is a superset of the PHP 5 parser, with the exceptions that `=& new` and
+`global $$foo->bar` are not supported (other differences are in representation only). The PHP 7
+parser will be able to recover from the error in both cases. For this reason, this change will
+likely pass unnoticed if you do not specifically test for this syntax.
+
+It is possible to restore the precise previous behavior with the following code:
+
+```php
+$lexer = ...;
+$parser7 = new Parser\Php7($lexer);
+$parser5 = new Parser\Php5($lexer);
+
+$errors7 = new ErrorHandler\Collecting();
+$stmts7 = $parser7->parse($code, $errors7);
+if ($errors7->hasErrors()) {
+ $errors5 = new ErrorHandler\Collecting();
+ $stmts5 = $parser5->parse($code, $errors5);
+ if (!$errors5->hasErrors()) {
+ // If PHP 7 parse has errors but PHP 5 parse has no errors, use PHP 5 result
+ return [$stmts5, $errors5];
+ }
+}
+// If PHP 7 succeeds or both fail use PHP 7 result
+return [$stmts7, $errors7];
+```
+
+#### Error handling in the lexer
+
+In order to support recovery from lexer errors, the signature of the `startLexing()` method changed
+to optionally accept an `ErrorHandler`:
+
+```php
+// OLD
+public function startLexing($code);
+// NEW
+public function startLexing($code, ErrorHandler $errorHandler = null);
+```
+
+If you use a custom lexer with overriden `startLexing()` method, it needs to be changed to accept
+the extra parameter. The value should be passed on to the parent method.
+
+#### Error checks in node constructors
+
+The constructors of certain nodes used to contain additional checks for semantic errors, such as
+creating a try block without either catch or finally. These checks have been moved from the node
+constructors into the parser. This allows recovery from such errors, as well as representing the
+resulting (invalid) AST.
+
+This means that certain error conditions are no longer checked for manually constructed nodes.
+
+### Removed methods, arguments, options
+
+The following methods, arguments or options have been removed:
+
+ * `Comment::setLine()`, `Comment::setText()`: Create new `Comment` instances instead.
+ * `Name::set()`, `Name::setFirst()`, `Name::setLast()`, `Name::append()`, `Name::prepend()`:
+ Use `Name::concat()` in combination with `Name::slice()` instead.
+ * `Error::getRawLine()`, `Error::setRawLine()`. Use `Error::getStartLine()` and
+ `Error::setStartLine()` instead.
+ * `Parser::getErrors()`. Use `ErrorHandler\Collecting` instead.
+ * `$separator` argument of `Name::toString()`. Use `strtr()` instead, if you really need it.
+ * `$cloneNodes` argument of `NodeTraverser::__construct()`. Explicitly clone nodes in the visitor
+ instead.
+ * `throwOnError` parser option. Use `ErrorHandler\Collecting` instead.
+
+### Miscellaneous
+
+ * All methods on `PrettyPrinter\Standard` are now protected. Previoulsy most of them were public.
+ The pretty printer should only be invoked using the `prettyPrint()`, `prettyPrintFile()` and
+ `prettyPrintExpr()` methods.
+ * The node dumper now prints numeric values that act as enums/flags in a string representation.
+ If node dumper results are used in tests, updates may be needed to account for this.
+ * The constants on `NameTraverserInterface` have been moved into the `NameTraverser` class.
+ * The emulative lexer now directly postprocesses tokens, instead of using `~__EMU__~` sequences.
+ This changes the protected API of the emulative lexer.
+ * The `Name::slice()` method now returns `null` for empty slices, previously `new Name([])` was
+ used. `Name::concat()` now also supports concatenation with `null`.
diff --git a/vendor/nikic/php-parser/bin/php-parse b/vendor/nikic/php-parser/bin/php-parse
new file mode 100755
index 0000000..dc35a68
--- /dev/null
+++ b/vendor/nikic/php-parser/bin/php-parse
@@ -0,0 +1,193 @@
+#!/usr/bin/env php
+<?php
+
+foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {
+ if (file_exists($file)) {
+ require $file;
+ break;
+ }
+}
+
+ini_set('xdebug.max_nesting_level', 3000);
+
+// Disable XDebug var_dump() output truncation
+ini_set('xdebug.var_display_max_children', -1);
+ini_set('xdebug.var_display_max_data', -1);
+ini_set('xdebug.var_display_max_depth', -1);
+
+list($operations, $files, $attributes) = parseArgs($argv);
+
+/* Dump nodes by default */
+if (empty($operations)) {
+ $operations[] = 'dump';
+}
+
+if (empty($files)) {
+ showHelp("Must specify at least one file.");
+}
+
+$lexer = new PhpParser\Lexer\Emulative(array('usedAttributes' => array(
+ 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments'
+)));
+$parser = (new PhpParser\ParserFactory)->create(
+ PhpParser\ParserFactory::PREFER_PHP7,
+ $lexer
+);
+$dumper = new PhpParser\NodeDumper(['dumpComments' => true]);
+$prettyPrinter = new PhpParser\PrettyPrinter\Standard;
+$serializer = new PhpParser\Serializer\XML;
+
+$traverser = new PhpParser\NodeTraverser();
+$traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver);
+
+foreach ($files as $file) {
+ if (strpos($file, '<?php') === 0) {
+ $code = $file;
+ echo "====> Code $code\n";
+ } else {
+ if (!file_exists($file)) {
+ die("File $file does not exist.\n");
+ }
+
+ $code = file_get_contents($file);
+ echo "====> File $file:\n";
+ }
+
+ if ($attributes['with-recovery']) {
+ $errorHandler = new PhpParser\ErrorHandler\Collecting;
+ $stmts = $parser->parse($code, $errorHandler);
+ foreach ($errorHandler->getErrors() as $error) {
+ $message = formatErrorMessage($error, $code, $attributes['with-column-info']);
+ echo $message . "\n";
+ }
+ if (null === $stmts) {
+ continue;
+ }
+ } else {
+ try {
+ $stmts = $parser->parse($code);
+ } catch (PhpParser\Error $error) {
+ $message = formatErrorMessage($error, $code, $attributes['with-column-info']);
+ die($message . "\n");
+ }
+ }
+
+ foreach ($operations as $operation) {
+ if ('dump' === $operation) {
+ echo "==> Node dump:\n";
+ echo $dumper->dump($stmts), "\n";
+ } elseif ('pretty-print' === $operation) {
+ echo "==> Pretty print:\n";
+ echo $prettyPrinter->prettyPrintFile($stmts), "\n";
+ } elseif ('serialize-xml' === $operation) {
+ echo "==> Serialized XML:\n";
+ echo $serializer->serialize($stmts), "\n";
+ } elseif ('var-dump' === $operation) {
+ echo "==> var_dump():\n";
+ var_dump($stmts);
+ } elseif ('resolve-names' === $operation) {
+ echo "==> Resolved names.\n";
+ $stmts = $traverser->traverse($stmts);
+ }
+ }
+}
+
+function formatErrorMessage(PhpParser\Error $e, $code, $withColumnInfo) {
+ if ($withColumnInfo && $e->hasColumnInfo()) {
+ return $e->getMessageWithColumnInfo($code);
+ } else {
+ return $e->getMessage();
+ }
+}
+
+function showHelp($error = '') {
+ if ($error) {
+ echo $error . "\n\n";
+ }
+ die(<<<OUTPUT
+Usage: php-parse [operations] file1.php [file2.php ...]
+ or: php-parse [operations] "<?php code"
+Turn PHP source code into an abstract syntax tree.
+
+Operations is a list of the following options (--dump by default):
+
+ -d, --dump Dump nodes using NodeDumper
+ -p, --pretty-print Pretty print file using PrettyPrinter\Standard
+ --serialize-xml Serialize nodes using Serializer\XML
+ --var-dump var_dump() nodes (for exact structure)
+ -N, --resolve-names Resolve names using NodeVisitor\NameResolver
+ -c, --with-column-info Show column-numbers for errors (if available)
+ -r, --with-recovery Use parsing with error recovery
+ -h, --help Display this page
+
+Example:
+ php-parse -d -p -N -d file.php
+
+ Dumps nodes, pretty prints them, then resolves names and dumps them again.
+
+
+OUTPUT
+ );
+}
+
+function parseArgs($args) {
+ $operations = array();
+ $files = array();
+ $attributes = array(
+ 'with-column-info' => false,
+ 'with-recovery' => false,
+ );
+
+ array_shift($args);
+ $parseOptions = true;
+ foreach ($args as $arg) {
+ if (!$parseOptions) {
+ $files[] = $arg;
+ continue;
+ }
+
+ switch ($arg) {
+ case '--dump':
+ case '-d':
+ $operations[] = 'dump';
+ break;
+ case '--pretty-print':
+ case '-p':
+ $operations[] = 'pretty-print';
+ break;
+ case '--serialize-xml':
+ $operations[] = 'serialize-xml';
+ break;
+ case '--var-dump':
+ $operations[] = 'var-dump';
+ break;
+ case '--resolve-names':
+ case '-N';
+ $operations[] = 'resolve-names';
+ break;
+ case '--with-column-info':
+ case '-c';
+ $attributes['with-column-info'] = true;
+ break;
+ case '--with-recovery':
+ case '-r':
+ $attributes['with-recovery'] = true;
+ break;
+ case '--help':
+ case '-h';
+ showHelp();
+ break;
+ case '--':
+ $parseOptions = false;
+ break;
+ default:
+ if ($arg[0] === '-') {
+ showHelp("Invalid operation $arg.");
+ } else {
+ $files[] = $arg;
+ }
+ }
+ }
+
+ return array($operations, $files, $attributes);
+}
diff --git a/vendor/nikic/php-parser/composer.json b/vendor/nikic/php-parser/composer.json
new file mode 100644
index 0000000..66df90a
--- /dev/null
+++ b/vendor/nikic/php-parser/composer.json
@@ -0,0 +1,30 @@
+{
+ "name": "nikic/php-parser",
+ "description": "A PHP parser written in PHP",
+ "keywords": ["php", "parser"],
+ "type": "library",
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "Nikita Popov"
+ }
+ ],
+ "require": {
+ "php": ">=5.5",
+ "ext-tokenizer": "*"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0|~5.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "PhpParser\\": "lib/PhpParser"
+ }
+ },
+ "bin": ["bin/php-parse"],
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/doc/0_Introduction.markdown b/vendor/nikic/php-parser/doc/0_Introduction.markdown
new file mode 100644
index 0000000..ca1ceb2
--- /dev/null
+++ b/vendor/nikic/php-parser/doc/0_Introduction.markdown
@@ -0,0 +1,80 @@
+Introduction
+============
+
+This project is a PHP 5.2 to PHP 7.1 parser **written in PHP itself**.
+
+What is this for?
+-----------------
+
+A parser is useful for [static analysis][0], manipulation of code and basically any other
+application dealing with code programmatically. A parser constructs an [Abstract Syntax Tree][1]
+(AST) of the code and thus allows dealing with it in an abstract and robust way.
+
+There are other ways of processing source code. One that PHP supports natively is using the
+token stream generated by [`token_get_all`][2]. The token stream is much more low level than
+the AST and thus has different applications: It allows to also analyze the exact formatting of
+a file. On the other hand the token stream is much harder to deal with for more complex analysis.
+For example an AST abstracts away the fact that in PHP variables can be written as `$foo`, but also
+as `$$bar`, `${'foobar'}` or even `${!${''}=barfoo()}`. You don't have to worry about recognizing
+all the different syntaxes from a stream of tokens.
+
+Another question is: Why would I want to have a PHP parser *written in PHP*? Well, PHP might not be
+a language especially suited for fast parsing, but processing the AST is much easier in PHP than it
+would be in other, faster languages like C. Furthermore the people most probably wanting to do
+programmatic PHP code analysis are incidentally PHP developers, not C developers.
+
+What can it parse?
+------------------
+
+The parser supports parsing PHP 5.2-5.6 and PHP 7.
+
+As the parser is based on the tokens returned by `token_get_all` (which is only able to lex the PHP
+version it runs on), additionally a wrapper for emulating tokens from newer versions is provided.
+This allows to parse PHP 7.1 source code running on PHP 5.5, for example. This emulation is somewhat
+hacky and not perfect, but it should work well on any sane code.
+
+What output does it produce?
+----------------------------
+
+The parser produces an [Abstract Syntax Tree][1] (AST) also known as a node tree. How this looks like
+can best be seen in an example. The program `<?php echo 'Hi', 'World';` will give you a node tree
+roughly looking like this:
+
+```
+array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_String(
+ value: Hi
+ )
+ 1: Scalar_String(
+ value: World
+ )
+ )
+ )
+)
+```
+
+This matches the structure of the code: An echo statement, which takes two strings as expressions,
+with the values `Hi` and `World!`.
+
+You can also see that the AST does not contain any whitespace information (but most comments are saved).
+So using it for formatting analysis is not possible.
+
+What else can it do?
+--------------------
+
+Apart from the parser itself this package also bundles support for some other, related features:
+
+ * Support for pretty printing, which is the act of converting an AST into PHP code. Please note
+ that "pretty printing" does not imply that the output is especially pretty. It's just how it's
+ called ;)
+ * Support for serializing and unserializing the node tree to XML
+ * Support for dumping the node tree in a human readable form (see the section above for an
+ example of how the output looks like)
+ * Infrastructure for traversing and changing the AST (node traverser and node visitors)
+ * A node visitor for resolving namespaced names
+
+ [0]: http://en.wikipedia.org/wiki/Static_program_analysis
+ [1]: http://en.wikipedia.org/wiki/Abstract_syntax_tree
+ [2]: http://php.net/token_get_all
diff --git a/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown b/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown
new file mode 100644
index 0000000..f91a5bb
--- /dev/null
+++ b/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown
@@ -0,0 +1,438 @@
+Usage of basic components
+=========================
+
+This document explains how to use the parser, the pretty printer and the node traverser.
+
+Bootstrapping
+-------------
+
+To bootstrap the library, include the autoloader generated by composer:
+
+```php
+require 'path/to/vendor/autoload.php';
+```
+
+Additionally you may want to set the `xdebug.max_nesting_level` ini option to a higher value:
+
+```php
+ini_set('xdebug.max_nesting_level', 3000);
+```
+
+This ensures that there will be no errors when traversing highly nested node trees. However, it is
+preferable to disable XDebug completely, as it can easily make this library more than five times
+slower.
+
+Parsing
+-------
+
+In order to parse code, you first have to create a parser instance:
+
+```php
+use PhpParser\ParserFactory;
+$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
+```
+
+The factory accepts a kind argument, that determines how different PHP versions are treated:
+
+Kind | Behavior
+-----|---------
+`ParserFactory::PREFER_PHP7` | Try to parse code as PHP 7. If this fails, try to parse it as PHP 5.
+`ParserFactory::PREFER_PHP5` | Try to parse code as PHP 5. If this fails, try to parse it as PHP 7.
+`ParserFactory::ONLY_PHP7` | Parse code as PHP 7.
+`ParserFactory::ONLY_PHP5` | Parse code as PHP 5.
+
+Unless you have strong reason to use something else, `PREFER_PHP7` is a reasonable default.
+
+The `create()` method optionally accepts a `Lexer` instance as the second argument. Some use cases
+that require customized lexers are discussed in the [lexer documentation](component/Lexer.markdown).
+
+Subsequently you can pass PHP code (including the opening `<?php` tag) to the `parse` method in order to
+create a syntax tree. If a syntax error is encountered, an `PhpParser\Error` exception will be thrown:
+
+```php
+use PhpParser\Error;
+use PhpParser\ParserFactory;
+
+$code = '<?php // some code';
+$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
+
+try {
+ $stmts = $parser->parse($code);
+ // $stmts is an array of statement nodes
+} catch (Error $e) {
+ echo 'Parse Error: ', $e->getMessage();
+}
+```
+
+A parser instance can be reused to parse multiple files.
+
+Node tree
+---------
+
+If you use the above code with `$code = "<?php echo 'Hi ', hi\\getTarget();"` the parser will
+generate a node tree looking like this:
+
+```
+array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_String(
+ value: Hi
+ )
+ 1: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: hi
+ 1: getTarget
+ )
+ )
+ args: array(
+ )
+ )
+ )
+ )
+)
+```
+
+Thus `$stmts` will contain an array with only one node, with this node being an instance of
+`PhpParser\Node\Stmt\Echo_`.
+
+As PHP is a large language there are approximately 140 different nodes. In order to make work
+with them easier they are grouped into three categories:
+
+ * `PhpParser\Node\Stmt`s are statement nodes, i.e. language constructs that do not return
+ a value and can not occur in an expression. For example a class definition is a statement.
+ It doesn't return a value and you can't write something like `func(class A {});`.
+ * `PhpParser\Node\Expr`s are expression nodes, i.e. language constructs that return a value
+ and thus can occur in other expressions. Examples of expressions are `$var`
+ (`PhpParser\Node\Expr\Variable`) and `func()` (`PhpParser\Node\Expr\FuncCall`).
+ * `PhpParser\Node\Scalar`s are nodes representing scalar values, like `'string'`
+ (`PhpParser\Node\Scalar\String_`), `0` (`PhpParser\Node\Scalar\LNumber`) or magic constants
+ like `__FILE__` (`PhpParser\Node\Scalar\MagicConst\File`). All `PhpParser\Node\Scalar`s extend
+ `PhpParser\Node\Expr`, as scalars are expressions, too.
+ * There are some nodes not in either of these groups, for example names (`PhpParser\Node\Name`)
+ and call arguments (`PhpParser\Node\Arg`).
+
+Some node class names have a trailing `_`. This is used whenever the class name would otherwise clash
+with a PHP keyword.
+
+Every node has a (possibly zero) number of subnodes. You can access subnodes by writing
+`$node->subNodeName`. The `Stmt\Echo_` node has only one subnode `exprs`. So in order to access it
+in the above example you would write `$stmts[0]->exprs`. If you wanted to access the name of the function
+call, you would write `$stmts[0]->exprs[1]->name`.
+
+All nodes also define a `getType()` method that returns the node type. The type is the class name
+without the `PhpParser\Node\` prefix and `\` replaced with `_`. It also does not contain a trailing
+`_` for reserved-keyword class names.
+
+It is possible to associate custom metadata with a node using the `setAttribute()` method. This data
+can then be retrieved using `hasAttribute()`, `getAttribute()` and `getAttributes()`.
+
+By default the lexer adds the `startLine`, `endLine` and `comments` attributes. `comments` is an array
+of `PhpParser\Comment[\Doc]` instances.
+
+The start line can also be accessed using `getLine()`/`setLine()` (instead of `getAttribute('startLine')`).
+The last doc comment from the `comments` attribute can be obtained using `getDocComment()`.
+
+Pretty printer
+--------------
+
+The pretty printer component compiles the AST back to PHP code. As the parser does not retain formatting
+information the formatting is done using a specified scheme. Currently there is only one scheme available,
+namely `PhpParser\PrettyPrinter\Standard`.
+
+```php
+use PhpParser\Error;
+use PhpParser\ParserFactory;
+use PhpParser\PrettyPrinter;
+
+$code = "<?php echo 'Hi ', hi\\getTarget();";
+
+$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
+$prettyPrinter = new PrettyPrinter\Standard;
+
+try {
+ // parse
+ $stmts = $parser->parse($code);
+
+ // change
+ $stmts[0] // the echo statement
+ ->exprs // sub expressions
+ [0] // the first of them (the string node)
+ ->value // it's value, i.e. 'Hi '
+ = 'Hello '; // change to 'Hello '
+
+ // pretty print
+ $code = $prettyPrinter->prettyPrint($stmts);
+
+ echo $code;
+} catch (Error $e) {
+ echo 'Parse Error: ', $e->getMessage();
+}
+```
+
+The above code will output:
+
+ <?php echo 'Hello ', hi\getTarget();
+
+As you can see the source code was first parsed using `PhpParser\Parser->parse()`, then changed and then
+again converted to code using `PhpParser\PrettyPrinter\Standard->prettyPrint()`.
+
+The `prettyPrint()` method pretty prints a statements array. It is also possible to pretty print only a
+single expression using `prettyPrintExpr()`.
+
+The `prettyPrintFile()` method can be used to print an entire file. This will include the opening `<?php` tag
+and handle inline HTML as the first/last statement more gracefully.
+
+Node traversation
+-----------------
+
+The above pretty printing example used the fact that the source code was known and thus it was easy to
+write code that accesses a certain part of a node tree and changes it. Normally this is not the case.
+Usually you want to change / analyze code in a generic way, where you don't know how the node tree is
+going to look like.
+
+For this purpose the parser provides a component for traversing and visiting the node tree. The basic
+structure of a program using this `PhpParser\NodeTraverser` looks like this:
+
+```php
+use PhpParser\NodeTraverser;
+use PhpParser\ParserFactory;
+use PhpParser\PrettyPrinter;
+
+$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
+$traverser = new NodeTraverser;
+$prettyPrinter = new PrettyPrinter\Standard;
+
+// add your visitor
+$traverser->addVisitor(new MyNodeVisitor);
+
+try {
+ $code = file_get_contents($fileName);
+
+ // parse
+ $stmts = $parser->parse($code);
+
+ // traverse
+ $stmts = $traverser->traverse($stmts);
+
+ // pretty print
+ $code = $prettyPrinter->prettyPrintFile($stmts);
+
+ echo $code;
+} catch (PhpParser\Error $e) {
+ echo 'Parse Error: ', $e->getMessage();
+}
+```
+
+The corresponding node visitor might look like this:
+
+```php
+use PhpParser\Node;
+use PhpParser\NodeVisitorAbstract;
+
+class MyNodeVisitor extends NodeVisitorAbstract
+{
+ public function leaveNode(Node $node) {
+ if ($node instanceof Node\Scalar\String_) {
+ $node->value = 'foo';
+ }
+ }
+}
+```
+
+The above node visitor would change all string literals in the program to `'foo'`.
+
+All visitors must implement the `PhpParser\NodeVisitor` interface, which defines the following four
+methods:
+
+```php
+public function beforeTraverse(array $nodes);
+public function enterNode(\PhpParser\Node $node);
+public function leaveNode(\PhpParser\Node $node);
+public function afterTraverse(array $nodes);
+```
+
+The `beforeTraverse()` method is called once before the traversal begins and is passed the nodes the
+traverser was called with. This method can be used for resetting values before traversation or
+preparing the tree for traversal.
+
+The `afterTraverse()` method is similar to the `beforeTraverse()` method, with the only difference that
+it is called once after the traversal.
+
+The `enterNode()` and `leaveNode()` methods are called on every node, the former when it is entered,
+i.e. before its subnodes are traversed, the latter when it is left.
+
+All four methods can either return the changed node or not return at all (i.e. `null`) in which
+case the current node is not changed.
+
+The `enterNode()` method can additionally return the value `NodeTraverser::DONT_TRAVERSE_CHILDREN`,
+which instructs the traverser to skip all children of the current node.
+
+The `leaveNode()` method can additionally return the value `NodeTraverser::REMOVE_NODE`, in which
+case the current node will be removed from the parent array. Furthermore it is possible to return
+an array of nodes, which will be merged into the parent array at the offset of the current node.
+I.e. if in `array(A, B, C)` the node `B` should be replaced with `array(X, Y, Z)` the result will
+be `array(A, X, Y, Z, C)`.
+
+Instead of manually implementing the `NodeVisitor` interface you can also extend the `NodeVisitorAbstract`
+class, which will define empty default implementations for all the above methods.
+
+The NameResolver node visitor
+-----------------------------
+
+One visitor is already bundled with the package: `PhpParser\NodeVisitor\NameResolver`. This visitor
+helps you work with namespaced code by trying to resolve most names to fully qualified ones.
+
+For example, consider the following code:
+
+ use A as B;
+ new B\C();
+
+In order to know that `B\C` really is `A\C` you would need to track aliases and namespaces yourself.
+The `NameResolver` takes care of that and resolves names as far as possible.
+
+After running it most names will be fully qualified. The only names that will stay unqualified are
+unqualified function and constant names. These are resolved at runtime and thus the visitor can't
+know which function they are referring to. In most cases this is a non-issue as the global functions
+are meant.
+
+Also the `NameResolver` adds a `namespacedName` subnode to class, function and constant declarations
+that contains the namespaced name instead of only the shortname that is available via `name`.
+
+Example: Converting namespaced code to pseudo namespaces
+--------------------------------------------------------
+
+A small example to understand the concept: We want to convert namespaced code to pseudo namespaces
+so it works on 5.2, i.e. names like `A\\B` should be converted to `A_B`. Note that such conversions
+are fairly complicated if you take PHP's dynamic features into account, so our conversion will
+assume that no dynamic features are used.
+
+We start off with the following base code:
+
+```php
+use PhpParser\ParserFactory;
+use PhpParser\PrettyPrinter;
+use PhpParser\NodeTraverser;
+use PhpParser\NodeVisitor\NameResolver;
+
+$inDir = '/some/path';
+$outDir = '/some/other/path';
+
+$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
+$traverser = new NodeTraverser;
+$prettyPrinter = new PrettyPrinter\Standard;
+
+$traverser->addVisitor(new NameResolver); // we will need resolved names
+$traverser->addVisitor(new NamespaceConverter); // our own node visitor
+
+// iterate over all .php files in the directory
+$files = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($inDir));
+$files = new \RegexIterator($files, '/\.php$/');
+
+foreach ($files as $file) {
+ try {
+ // read the file that should be converted
+ $code = file_get_contents($file);
+
+ // parse
+ $stmts = $parser->parse($code);
+
+ // traverse
+ $stmts = $traverser->traverse($stmts);
+
+ // pretty print
+ $code = $prettyPrinter->prettyPrintFile($stmts);
+
+ // write the converted file to the target directory
+ file_put_contents(
+ substr_replace($file->getPathname(), $outDir, 0, strlen($inDir)),
+ $code
+ );
+ } catch (PhpParser\Error $e) {
+ echo 'Parse Error: ', $e->getMessage();
+ }
+}
+```
+
+Now lets start with the main code, the `NodeVisitor\NamespaceConverter`. One thing it needs to do
+is convert `A\\B` style names to `A_B` style ones.
+
+```php
+use PhpParser\Node;
+
+class NamespaceConverter extends \PhpParser\NodeVisitorAbstract
+{
+ public function leaveNode(Node $node) {
+ if ($node instanceof Node\Name) {
+ return new Node\Name($node->toString('_'));
+ }
+ }
+}
+```
+
+The above code profits from the fact that the `NameResolver` already resolved all names as far as
+possible, so we don't need to do that. We only need to create a string with the name parts separated
+by underscores instead of backslashes. This is what `$node->toString('_')` does. (If you want to
+create a name with backslashes either write `$node->toString()` or `(string) $node`.) Then we create
+a new name from the string and return it. Returning a new node replaces the old node.
+
+Another thing we need to do is change the class/function/const declarations. Currently they contain
+only the shortname (i.e. the last part of the name), but they need to contain the complete name including
+the namespace prefix:
+
+```php
+use PhpParser\Node;
+use PhpParser\Node\Stmt;
+
+class NodeVisitor_NamespaceConverter extends \PhpParser\NodeVisitorAbstract
+{
+ public function leaveNode(Node $node) {
+ if ($node instanceof Node\Name) {
+ return new Node\Name($node->toString('_'));
+ } elseif ($node instanceof Stmt\Class_
+ || $node instanceof Stmt\Interface_
+ || $node instanceof Stmt\Function_) {
+ $node->name = $node->namespacedName->toString('_');
+ } elseif ($node instanceof Stmt\Const_) {
+ foreach ($node->consts as $const) {
+ $const->name = $const->namespacedName->toString('_');
+ }
+ }
+ }
+}
+```
+
+There is not much more to it than converting the namespaced name to string with `_` as separator.
+
+The last thing we need to do is remove the `namespace` and `use` statements:
+
+```php
+use PhpParser\Node;
+use PhpParser\Node\Stmt;
+
+class NodeVisitor_NamespaceConverter extends \PhpParser\NodeVisitorAbstract
+{
+ public function leaveNode(Node $node) {
+ if ($node instanceof Node\Name) {
+ return new Node\Name($node->toString('_'));
+ } elseif ($node instanceof Stmt\Class_
+ || $node instanceof Stmt\Interface_
+ || $node instanceof Stmt\Function_) {
+ $node->name = $node->namespacedName->toString('_');
+ } elseif ($node instanceof Stmt\Const_) {
+ foreach ($node->consts as $const) {
+ $const->name = $const->namespacedName->toString('_');
+ }
+ } elseif ($node instanceof Stmt\Namespace_) {
+ // returning an array merges is into the parent array
+ return $node->stmts;
+ } elseif ($node instanceof Stmt\Use_) {
+ // returning false removed the node altogether
+ return false;
+ }
+ }
+}
+```
+
+That's all.
diff --git a/vendor/nikic/php-parser/doc/3_Other_node_tree_representations.markdown b/vendor/nikic/php-parser/doc/3_Other_node_tree_representations.markdown
new file mode 100644
index 0000000..0830f39
--- /dev/null
+++ b/vendor/nikic/php-parser/doc/3_Other_node_tree_representations.markdown
@@ -0,0 +1,330 @@
+Other node tree representations
+===============================
+
+It is possible to convert the AST into several textual representations, which serve different uses.
+
+Simple serialization
+--------------------
+
+It is possible to serialize the node tree using `serialize()` and also unserialize it using
+`unserialize()`. The output is not human readable and not easily processable from anything
+but PHP, but it is compact and generates quickly. The main application thus is in caching.
+
+Human readable dumping
+----------------------
+
+Furthermore it is possible to dump nodes into a human readable format using the `dump` method of
+`PhpParser\NodeDumper`. This can be used for debugging.
+
+```php
+$code = <<<'CODE'
+<?php
+
+function printLine($msg) {
+ echo $msg, "\n";
+}
+
+printLine('Hello World!!!');
+CODE;
+
+$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7);
+$nodeDumper = new PhpParser\NodeDumper;
+
+try {
+ $stmts = $parser->parse($code);
+
+ echo $nodeDumper->dump($stmts), "\n";
+} catch (PhpParser\Error $e) {
+ echo 'Parse Error: ', $e->getMessage();
+}
+```
+
+The above script will have an output looking roughly like this:
+
+```
+array(
+ 0: Stmt_Function(
+ byRef: false
+ params: array(
+ 0: Param(
+ name: msg
+ default: null
+ type: null
+ byRef: false
+ )
+ )
+ stmts: array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Expr_Variable(
+ name: msg
+ )
+ 1: Scalar_String(
+ value:
+
+ )
+ )
+ )
+ )
+ name: printLine
+ )
+ 1: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: printLine
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: Hello World!!!
+ )
+ byRef: false
+ )
+ )
+ )
+)
+```
+
+JSON encoding
+-------------
+
+Nodes (and comments) implement the `JsonSerializable` interface. As such, it is possible to JSON
+encode the AST directly using `json_encode()`:
+
+```php
+$code = <<<'CODE'
+<?php
+
+function printLine($msg) {
+ echo $msg, "\n";
+}
+
+printLine('Hello World!!!');
+CODE;
+
+$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7);
+$nodeDumper = new PhpParser\NodeDumper;
+
+try {
+ $stmts = $parser->parse($code);
+
+ echo json_encode($stmts, JSON_PRETTY_PRINT), "\n";
+} catch (PhpParser\Error $e) {
+ echo 'Parse Error: ', $e->getMessage();
+}
+```
+
+This will result in the following output (which includes attributes):
+
+```json
+[
+ {
+ "nodeType": "Stmt_Function",
+ "byRef": false,
+ "name": "printLine",
+ "params": [
+ {
+ "nodeType": "Param",
+ "type": null,
+ "byRef": false,
+ "variadic": false,
+ "name": "msg",
+ "default": null,
+ "attributes": {
+ "startLine": 3,
+ "endLine": 3
+ }
+ }
+ ],
+ "returnType": null,
+ "stmts": [
+ {
+ "nodeType": "Stmt_Echo",
+ "exprs": [
+ {
+ "nodeType": "Expr_Variable",
+ "name": "msg",
+ "attributes": {
+ "startLine": 4,
+ "endLine": 4
+ }
+ },
+ {
+ "nodeType": "Scalar_String",
+ "value": "\n",
+ "attributes": {
+ "startLine": 4,
+ "endLine": 4,
+ "kind": 2
+ }
+ }
+ ],
+ "attributes": {
+ "startLine": 4,
+ "endLine": 4
+ }
+ }
+ ],
+ "attributes": {
+ "startLine": 3,
+ "endLine": 5
+ }
+ },
+ {
+ "nodeType": "Expr_FuncCall",
+ "name": {
+ "nodeType": "Name",
+ "parts": [
+ "printLine"
+ ],
+ "attributes": {
+ "startLine": 7,
+ "endLine": 7
+ }
+ },
+ "args": [
+ {
+ "nodeType": "Arg",
+ "value": {
+ "nodeType": "Scalar_String",
+ "value": "Hello World!!!",
+ "attributes": {
+ "startLine": 7,
+ "endLine": 7,
+ "kind": 1
+ }
+ },
+ "byRef": false,
+ "unpack": false,
+ "attributes": {
+ "startLine": 7,
+ "endLine": 7
+ }
+ }
+ ],
+ "attributes": {
+ "startLine": 7,
+ "endLine": 7
+ }
+ }
+]
+```
+
+There is currently no mechanism to convert JSON back into a node tree. Furthermore, not all ASTs
+can be JSON encoded. In particular, JSON only supports UTF-8 strings.
+
+Serialization to XML
+--------------------
+
+It is also possible to serialize the node tree to XML using `PhpParser\Serializer\XML->serialize()`
+and to unserialize it using `PhpParser\Unserializer\XML->unserialize()`. This is useful for
+interfacing with other languages and applications or for doing transformation using XSLT.
+
+```php
+<?php
+$code = <<<'CODE'
+<?php
+
+function printLine($msg) {
+ echo $msg, "\n";
+}
+
+printLine('Hello World!!!');
+CODE;
+
+$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7);
+$serializer = new PhpParser\Serializer\XML;
+
+try {
+ $stmts = $parser->parse($code);
+
+ echo $serializer->serialize($stmts);
+} catch (PhpParser\Error $e) {
+ echo 'Parse Error: ', $e->getMessage();
+}
+```
+
+Produces:
+
+```xml
+<?xml version="1.0" encoding="UTF-8"?>
+<AST xmlns:node="http://nikic.github.com/PHPParser/XML/node" xmlns:subNode="http://nikic.github.com/PHPParser/XML/subNode" xmlns:scalar="http://nikic.github.com/PHPParser/XML/scalar">
+ <scalar:array>
+ <node:Stmt_Function line="2">
+ <subNode:byRef>
+ <scalar:false/>
+ </subNode:byRef>
+ <subNode:params>
+ <scalar:array>
+ <node:Param line="2">
+ <subNode:name>
+ <scalar:string>msg</scalar:string>
+ </subNode:name>
+ <subNode:default>
+ <scalar:null/>
+ </subNode:default>
+ <subNode:type>
+ <scalar:null/>
+ </subNode:type>
+ <subNode:byRef>
+ <scalar:false/>
+ </subNode:byRef>
+ </node:Param>
+ </scalar:array>
+ </subNode:params>
+ <subNode:stmts>
+ <scalar:array>
+ <node:Stmt_Echo line="3">
+ <subNode:exprs>
+ <scalar:array>
+ <node:Expr_Variable line="3">
+ <subNode:name>
+ <scalar:string>msg</scalar:string>
+ </subNode:name>
+ </node:Expr_Variable>
+ <node:Scalar_String line="3">
+ <subNode:value>
+ <scalar:string>
+</scalar:string>
+ </subNode:value>
+ </node:Scalar_String>
+ </scalar:array>
+ </subNode:exprs>
+ </node:Stmt_Echo>
+ </scalar:array>
+ </subNode:stmts>
+ <subNode:name>
+ <scalar:string>printLine</scalar:string>
+ </subNode:name>
+ </node:Stmt_Function>
+ <node:Expr_FuncCall line="6">
+ <subNode:name>
+ <node:Name line="6">
+ <subNode:parts>
+ <scalar:array>
+ <scalar:string>printLine</scalar:string>
+ </scalar:array>
+ </subNode:parts>
+ </node:Name>
+ </subNode:name>
+ <subNode:args>
+ <scalar:array>
+ <node:Arg line="6">
+ <subNode:value>
+ <node:Scalar_String line="6">
+ <subNode:value>
+ <scalar:string>Hello World!!!</scalar:string>
+ </subNode:value>
+ </node:Scalar_String>
+ </subNode:value>
+ <subNode:byRef>
+ <scalar:false/>
+ </subNode:byRef>
+ </node:Arg>
+ </scalar:array>
+ </subNode:args>
+ </node:Expr_FuncCall>
+ </scalar:array>
+</AST>
+``` \ No newline at end of file
diff --git a/vendor/nikic/php-parser/doc/4_Code_generation.markdown b/vendor/nikic/php-parser/doc/4_Code_generation.markdown
new file mode 100644
index 0000000..2c0aa0e
--- /dev/null
+++ b/vendor/nikic/php-parser/doc/4_Code_generation.markdown
@@ -0,0 +1,84 @@
+Code generation
+===============
+
+It is also possible to generate code using the parser, by first creating an Abstract Syntax Tree and then using the
+pretty printer to convert it to PHP code. To simplify code generation, the project comes with builders which allow
+creating node trees using a fluid interface, instead of instantiating all nodes manually. Builders are available for
+the following syntactic elements:
+
+ * namespaces and use statements
+ * classes, interfaces and traits
+ * methods, functions and parameters
+ * properties
+
+Here is an example:
+
+```php
+use PhpParser\BuilderFactory;
+use PhpParser\PrettyPrinter;
+use PhpParser\Node;
+
+$factory = new BuilderFactory;
+$node = $factory->namespace('Name\Space')
+ ->addStmt($factory->use('Some\Other\Thingy')->as('SomeOtherClass'))
+ ->addStmt($factory->class('SomeClass')
+ ->extend('SomeOtherClass')
+ ->implement('A\Few', '\Interfaces')
+ ->makeAbstract() // ->makeFinal()
+
+ ->addStmt($factory->method('someMethod')
+ ->makePublic()
+ ->makeAbstract() // ->makeFinal()
+ ->setReturnType('bool')
+ ->addParam($factory->param('someParam')->setTypeHint('SomeClass'))
+ ->setDocComment('/**
+ * This method does something.
+ *
+ * @param SomeClass And takes a parameter
+ */')
+ )
+
+ ->addStmt($factory->method('anotherMethod')
+ ->makeProtected() // ->makePublic() [default], ->makePrivate()
+ ->addParam($factory->param('someParam')->setDefault('test'))
+ // it is possible to add manually created nodes
+ ->addStmt(new Node\Expr\Print_(new Node\Expr\Variable('someParam')))
+ )
+
+ // properties will be correctly reordered above the methods
+ ->addStmt($factory->property('someProperty')->makeProtected())
+ ->addStmt($factory->property('anotherProperty')->makePrivate()->setDefault(array(1, 2, 3)))
+ )
+
+ ->getNode()
+;
+
+$stmts = array($node);
+$prettyPrinter = new PrettyPrinter\Standard();
+echo $prettyPrinter->prettyPrintFile($stmts);
+```
+
+This will produce the following output with the standard pretty printer:
+
+```php
+<?php
+
+namespace Name\Space;
+
+use Some\Other\Thingy as SomeClass;
+abstract class SomeClass extends SomeOtherClass implements A\Few, \Interfaces
+{
+ protected $someProperty;
+ private $anotherProperty = array(1, 2, 3);
+ /**
+ * This method does something.
+ *
+ * @param SomeClass And takes a parameter
+ */
+ public abstract function someMethod(SomeClass $someParam) : bool;
+ protected function anotherMethod($someParam = 'test')
+ {
+ print $someParam;
+ }
+}
+```
diff --git a/vendor/nikic/php-parser/doc/component/Error_handling.markdown b/vendor/nikic/php-parser/doc/component/Error_handling.markdown
new file mode 100644
index 0000000..c1579e9
--- /dev/null
+++ b/vendor/nikic/php-parser/doc/component/Error_handling.markdown
@@ -0,0 +1,75 @@
+Error handling
+==============
+
+Errors during parsing or analysis are represented using the `PhpParser\Error` exception class. In addition to an error
+message, an error can also store additional information about the location the error occurred at.
+
+How much location information is available depends on the origin of the error and how many lexer attributes have been
+enabled. At a minimum the start line of the error is usually available.
+
+Column information
+------------------
+
+In order to receive information about not only the line, but also the column span an error occurred at, the file
+position attributes in the lexer need to be enabled:
+
+```php
+$lexer = new PhpParser\Lexer(array(
+ 'usedAttributes' => array('comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos'),
+));
+$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7, $lexer);
+
+try {
+ $stmts = $parser->parse($code);
+ // ...
+} catch (PhpParser\Error $e) {
+ // ...
+}
+```
+
+Before using column information its availability needs to be checked with `$e->hasColumnInfo()`, as the precise
+location of an error cannot always be determined. The methods for retrieving column information also have to be passed
+the source code of the parsed file. An example for printing an error:
+
+```php
+if ($e->hasColumnInfo()) {
+ echo $e->getRawMessage() . ' from ' . $e->getStartLine() . ':' . $e->getStartColumn($code)
+ . ' to ' . $e->getEndLine() . ':' . $e->getEndColumn($code);
+ // or:
+ echo $e->getMessageWithColumnInfo();
+} else {
+ echo $e->getMessage();
+}
+```
+
+Both line numbers and column numbers are 1-based. EOF errors will be located at the position one past the end of the
+file.
+
+Error recovery
+--------------
+
+The error behavior of the parser (and other components) is controlled by an `ErrorHandler`. Whenever an error is
+encountered, `ErrorHandler::handleError()` is invoked. The default error handling strategy is `ErrorHandler\Throwing`,
+which will immediately throw when an error is encountered.
+
+To instead collect all encountered errors into an array, while trying to continue parsing the rest of the source code,
+an instance of `ErrorHandler\Collecting` can be passed to the `Parser::parse()` method. A usage example:
+
+```php
+$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::ONLY_PHP7);
+$errorHandler = new PhpParser\ErrorHandler\Collecting;
+
+$stmts = $parser->parse($code, $errorHandler);
+
+if ($errorHandler->hasErrors()) {
+ foreach ($errorHandler->getErrors() as $error) {
+ // $error is an ordinary PhpParser\Error
+ }
+}
+
+if (null !== $stmts) {
+ // $stmts is a best-effort partial AST
+}
+```
+
+The `NameResolver` visitor also accepts an `ErrorHandler` as a constructor argument. \ No newline at end of file
diff --git a/vendor/nikic/php-parser/doc/component/Lexer.markdown b/vendor/nikic/php-parser/doc/component/Lexer.markdown
new file mode 100644
index 0000000..b22942d
--- /dev/null
+++ b/vendor/nikic/php-parser/doc/component/Lexer.markdown
@@ -0,0 +1,152 @@
+Lexer component documentation
+=============================
+
+The lexer is responsible for providing tokens to the parser. The project comes with two lexers: `PhpParser\Lexer` and
+`PhpParser\Lexer\Emulative`. The latter is an extension of the former, which adds the ability to emulate tokens of
+newer PHP versions and thus allows parsing of new code on older versions.
+
+This documentation discusses options available for the default lexers and explains how lexers can be extended.
+
+Lexer options
+-------------
+
+The two default lexers accept an `$options` array in the constructor. Currently only the `'usedAttributes'` option is
+supported, which allows you to specify which attributes will be added to the AST nodes. The attributes can then be
+accessed using `$node->getAttribute()`, `$node->setAttribute()`, `$node->hasAttribute()` and `$node->getAttributes()`
+methods. A sample options array:
+
+```php
+$lexer = new PhpParser\Lexer(array(
+ 'usedAttributes' => array(
+ 'comments', 'startLine', 'endLine'
+ )
+));
+```
+
+The attributes used in this example match the default behavior of the lexer. The following attributes are supported:
+
+ * `comments`: Array of `PhpParser\Comment` or `PhpParser\Comment\Doc` instances, representing all comments that occurred
+ between the previous non-discarded token and the current one. Use of this attribute is required for the
+ `$node->getDocComment()` method to work. The attribute is also needed if you wish the pretty printer to retain
+ comments present in the original code.
+ * `startLine`: Line in which the node starts. This attribute is required for the `$node->getLine()` to work. It is also
+ required if syntax errors should contain line number information.
+ * `endLine`: Line in which the node ends.
+ * `startTokenPos`: Offset into the token array of the first token in the node.
+ * `endTokenPos`: Offset into the token array of the last token in the node.
+ * `startFilePos`: Offset into the code string of the first character that is part of the node.
+ * `endFilePos`: Offset into the code string of the last character that is part of the node.
+
+### Using token positions
+
+The token offset information is useful if you wish to examine the exact formatting used for a node. For example the AST
+does not distinguish whether a property was declared using `public` or using `var`, but you can retrieve this
+information based on the token position:
+
+```php
+function isDeclaredUsingVar(array $tokens, PhpParser\Node\Stmt\Property $prop) {
+ $i = $prop->getAttribute('startTokenPos');
+ return $tokens[$i][0] === T_VAR;
+}
+```
+
+In order to make use of this function, you will have to provide the tokens from the lexer to your node visitor using
+code similar to the following:
+
+```php
+class MyNodeVisitor extends PhpParser\NodeVisitorAbstract {
+ private $tokens;
+ public function setTokens(array $tokens) {
+ $this->tokens = $tokens;
+ }
+
+ public function leaveNode(PhpParser\Node $node) {
+ if ($node instanceof PhpParser\Node\Stmt\Property) {
+ var_dump(isDeclaredUsingVar($this->tokens, $node));
+ }
+ }
+}
+
+$lexer = new PhpParser\Lexer(array(
+ 'usedAttributes' => array(
+ 'comments', 'startLine', 'endLine', 'startTokenPos', 'endTokenPos'
+ )
+));
+$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7, $lexer);
+
+$visitor = new MyNodeVisitor();
+$traverser = new PhpParser\NodeTraverser();
+$traverser->addVisitor($visitor);
+
+try {
+ $stmts = $parser->parse($code);
+ $visitor->setTokens($lexer->getTokens());
+ $stmts = $traverser->traverse($stmts);
+} catch (PhpParser\Error $e) {
+ echo 'Parse Error: ', $e->getMessage();
+}
+```
+
+The same approach can also be used to perform specific modifications in the code, without changing the formatting in
+other places (which is the case when using the pretty printer).
+
+Lexer extension
+---------------
+
+A lexer has to define the following public interface:
+
+ void startLexing(string $code, ErrorHandler $errorHandler = null);
+ array getTokens();
+ string handleHaltCompiler();
+ int getNextToken(string &$value = null, array &$startAttributes = null, array &$endAttributes = null);
+
+The `startLexing()` method is invoked with the source code that is to be lexed (including the opening tag) whenever the
+`parse()` method of the parser is called. It can be used to reset state or preprocess the source code or tokens. The
+passes `ErrorHandler` should be used to report lexing errors.
+
+The `getTokens()` method returns the current token array, in the usual `token_get_all()` format. This method is not
+used by the parser (which uses `getNextToken()`), but is useful in combination with the token position attributes.
+
+The `handleHaltCompiler()` method is called whenever a `T_HALT_COMPILER` token is encountered. It has to return the
+remaining string after the construct (not including `();`).
+
+The `getNextToken()` method returns the ID of the next token (as defined by the `Parser::T_*` constants). If no more
+tokens are available it must return `0`, which is the ID of the `EOF` token. Furthermore the string content of the
+token should be written into the by-reference `$value` parameter (which will then be available as `$n` in the parser).
+
+### Attribute handling
+
+The other two by-ref variables `$startAttributes` and `$endAttributes` define which attributes will eventually be
+assigned to the generated nodes: The parser will take the `$startAttributes` from the first token which is part of the
+node and the `$endAttributes` from the last token that is part of the node.
+
+E.g. if the tokens `T_FUNCTION T_STRING ... '{' ... '}'` constitute a node, then the `$startAttributes` from the
+`T_FUNCTION` token will be taken and the `$endAttributes` from the `'}'` token.
+
+An application of custom attributes is storing the exact original formatting of literals: While the parser does retain
+some information about the formatting of integers (like decimal vs. hexadecimal) or strings (like used quote type), it
+does not preserve the exact original formatting (e.g. leading zeros for integers or escape sequences in strings). This
+can be remedied by storing the original value in an attribute:
+
+```php
+use PhpParser\Lexer;
+use PhpParser\Parser\Tokens;
+
+class KeepOriginalValueLexer extends Lexer // or Lexer\Emulative
+{
+ public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) {
+ $tokenId = parent::getNextToken($value, $startAttributes, $endAttributes);
+
+ if ($tokenId == Tokens::T_CONSTANT_ENCAPSED_STRING // non-interpolated string
+ || $tokenId == Tokens::T_ENCAPSED_AND_WHITESPACE // interpolated string
+ || $tokenId == Tokens::T_LNUMBER // integer
+ || $tokenId == Tokens::T_DNUMBER // floating point number
+ ) {
+ // could also use $startAttributes, doesn't really matter here
+ $endAttributes['originalValue'] = $value;
+ }
+
+ return $tokenId;
+ }
+}
+```
diff --git a/vendor/nikic/php-parser/grammar/README.md b/vendor/nikic/php-parser/grammar/README.md
new file mode 100644
index 0000000..3f1698a
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/README.md
@@ -0,0 +1,28 @@
+What do all those files mean?
+=============================
+
+ * `php5.y`: PHP 5 grammar written in a pseudo language
+ * `php7.y`: PHP 7 grammar written in a pseudo language
+ * `tokens.y`: Tokens definition shared between PHP 5 and PHP 7 grammars
+ * `parser.template`: A `kmyacc` parser prototype file for PHP
+ * `tokens.template`: A `kmyacc` prototype file for the `Tokens` class
+ * `rebuildParsers.php`: Preprocesses the grammar and builds the parser using `kmyacc`
+
+.phpy pseudo language
+=====================
+
+The `.y` file is a normal grammer in `kmyacc` (`yacc`) style, with some transformations
+applied to it:
+
+ * Nodes are created using the syntax `Name[..., ...]`. This is transformed into
+ `new Name(..., ..., attributes())`
+ * Some function-like constructs are resolved (see `rebuildParsers.php` for a list)
+
+Building the parser
+===================
+
+In order to rebuild the parser, you need [moriyoshi's fork of kmyacc](https://github.com/moriyoshi/kmyacc-forked).
+After you compiled/installed it, run the `rebuildParsers.php` script.
+
+By default only the `Parser.php` is built. If you want to additionally emit debug symbols and create `y.output`, run the
+script with `--debug`. If you want to retain the preprocessed grammar pass `--keep-tmp-grammar`.
diff --git a/vendor/nikic/php-parser/grammar/parser.template b/vendor/nikic/php-parser/grammar/parser.template
new file mode 100644
index 0000000..fff893f
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/parser.template
@@ -0,0 +1,103 @@
+<?php
+$meta #
+#semval($) $this->semValue
+#semval($,%t) $this->semValue
+#semval(%n) $this->stackPos-(%l-%n)
+#semval(%n,%t) $this->stackPos-(%l-%n)
+
+namespace PhpParser\Parser;
+
+use PhpParser\Error;
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+use PhpParser\Node\Scalar;
+use PhpParser\Node\Stmt;
+#include;
+
+/* This is an automatically GENERATED file, which should not be manually edited.
+ * Instead edit one of the following:
+ * * the grammar files grammar/php5.y or grammar/php7.y
+ * * the skeleton file grammar/parser.template
+ * * the preprocessing script grammar/rebuildParsers.php
+ */
+class #(-p) extends \PhpParser\ParserAbstract
+{
+ protected $tokenToSymbolMapSize = #(YYMAXLEX);
+ protected $actionTableSize = #(YYLAST);
+ protected $gotoTableSize = #(YYGLAST);
+
+ protected $invalidSymbol = #(YYBADCH);
+ protected $errorSymbol = #(YYINTERRTOK);
+ protected $defaultAction = #(YYDEFAULT);
+ protected $unexpectedTokenRule = #(YYUNEXPECTED);
+
+ protected $YY2TBLSTATE = #(YY2TBLSTATE);
+ protected $YYNLSTATES = #(YYNLSTATES);
+
+ protected $symbolToName = array(
+ #listvar terminals
+ );
+
+ protected $tokenToSymbol = array(
+ #listvar yytranslate
+ );
+
+ protected $action = array(
+ #listvar yyaction
+ );
+
+ protected $actionCheck = array(
+ #listvar yycheck
+ );
+
+ protected $actionBase = array(
+ #listvar yybase
+ );
+
+ protected $actionDefault = array(
+ #listvar yydefault
+ );
+
+ protected $goto = array(
+ #listvar yygoto
+ );
+
+ protected $gotoCheck = array(
+ #listvar yygcheck
+ );
+
+ protected $gotoBase = array(
+ #listvar yygbase
+ );
+
+ protected $gotoDefault = array(
+ #listvar yygdefault
+ );
+
+ protected $ruleToNonTerminal = array(
+ #listvar yylhs
+ );
+
+ protected $ruleToLength = array(
+ #listvar yylen
+ );
+#if -t
+
+ protected $productions = array(
+ #production-strings;
+ );
+#endif
+#reduce
+
+ protected function reduceRule%n() {
+ %b
+ }
+#noact
+
+ protected function reduceRule%n() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+#endreduce
+}
+#tailcode;
diff --git a/vendor/nikic/php-parser/grammar/php5.y b/vendor/nikic/php-parser/grammar/php5.y
new file mode 100644
index 0000000..943e933
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/php5.y
@@ -0,0 +1,995 @@
+%pure_parser
+%expect 6
+
+%tokens
+
+%%
+
+start:
+ top_statement_list { $$ = $this->handleNamespaces($1); }
+;
+
+top_statement_list_ex:
+ top_statement_list_ex top_statement { pushNormalizing($1, $2); }
+ | /* empty */ { init(); }
+;
+
+top_statement_list:
+ top_statement_list_ex
+ { makeNop($nop, $this->lookaheadStartAttributes);
+ if ($nop !== null) { $1[] = $nop; } $$ = $1; }
+;
+
+reserved_non_modifiers:
+ T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND
+ | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE
+ | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH
+ | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO
+ | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT
+ | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS
+ | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER
+;
+
+semi_reserved:
+ reserved_non_modifiers
+ | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC
+;
+
+identifier:
+ T_STRING { $$ = $1; }
+ | semi_reserved { $$ = $1; }
+;
+
+namespace_name_parts:
+ T_STRING { init($1); }
+ | namespace_name_parts T_NS_SEPARATOR T_STRING { push($1, $3); }
+;
+
+namespace_name:
+ namespace_name_parts { $$ = Name[$1]; }
+;
+
+top_statement:
+ statement { $$ = $1; }
+ | function_declaration_statement { $$ = $1; }
+ | class_declaration_statement { $$ = $1; }
+ | T_HALT_COMPILER
+ { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; }
+ | T_NAMESPACE namespace_name ';'
+ { $$ = Stmt\Namespace_[$2, null]; $this->checkNamespace($$); }
+ | T_NAMESPACE namespace_name '{' top_statement_list '}'
+ { $$ = Stmt\Namespace_[$2, $4]; $this->checkNamespace($$); }
+ | T_NAMESPACE '{' top_statement_list '}'
+ { $$ = Stmt\Namespace_[null, $3]; $this->checkNamespace($$); }
+ | T_USE use_declarations ';' { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; }
+ | T_USE use_type use_declarations ';' { $$ = Stmt\Use_[$3, $2]; }
+ | group_use_declaration ';' { $$ = $1; }
+ | T_CONST constant_declaration_list ';' { $$ = Stmt\Const_[$2]; }
+;
+
+use_type:
+ T_FUNCTION { $$ = Stmt\Use_::TYPE_FUNCTION; }
+ | T_CONST { $$ = Stmt\Use_::TYPE_CONSTANT; }
+;
+
+/* Using namespace_name_parts here to avoid s/r conflict on T_NS_SEPARATOR */
+group_use_declaration:
+ T_USE use_type namespace_name_parts T_NS_SEPARATOR '{' unprefixed_use_declarations '}'
+ { $$ = Stmt\GroupUse[new Name($3, stackAttributes(#3)), $6, $2]; }
+ | T_USE use_type T_NS_SEPARATOR namespace_name_parts T_NS_SEPARATOR '{' unprefixed_use_declarations '}'
+ { $$ = Stmt\GroupUse[new Name($4, stackAttributes(#4)), $7, $2]; }
+ | T_USE namespace_name_parts T_NS_SEPARATOR '{' inline_use_declarations '}'
+ { $$ = Stmt\GroupUse[new Name($2, stackAttributes(#2)), $5, Stmt\Use_::TYPE_UNKNOWN]; }
+ | T_USE T_NS_SEPARATOR namespace_name_parts T_NS_SEPARATOR '{' inline_use_declarations '}'
+ { $$ = Stmt\GroupUse[new Name($3, stackAttributes(#3)), $6, Stmt\Use_::TYPE_UNKNOWN]; }
+;
+
+unprefixed_use_declarations:
+ unprefixed_use_declarations ',' unprefixed_use_declaration
+ { push($1, $3); }
+ | unprefixed_use_declaration { init($1); }
+;
+
+use_declarations:
+ use_declarations ',' use_declaration { push($1, $3); }
+ | use_declaration { init($1); }
+;
+
+inline_use_declarations:
+ inline_use_declarations ',' inline_use_declaration { push($1, $3); }
+ | inline_use_declaration { init($1); }
+;
+
+unprefixed_use_declaration:
+ namespace_name
+ { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); }
+ | namespace_name T_AS T_STRING
+ { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); }
+;
+
+use_declaration:
+ unprefixed_use_declaration { $$ = $1; }
+ | T_NS_SEPARATOR unprefixed_use_declaration { $$ = $2; }
+;
+
+inline_use_declaration:
+ unprefixed_use_declaration { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; }
+ | use_type unprefixed_use_declaration { $$ = $2; $$->type = $1; }
+;
+
+constant_declaration_list:
+ constant_declaration_list ',' constant_declaration { push($1, $3); }
+ | constant_declaration { init($1); }
+;
+
+constant_declaration:
+ T_STRING '=' static_scalar { $$ = Node\Const_[$1, $3]; }
+;
+
+class_const_list:
+ class_const_list ',' class_const { push($1, $3); }
+ | class_const { init($1); }
+;
+
+class_const:
+ identifier '=' static_scalar { $$ = Node\Const_[$1, $3]; }
+;
+
+inner_statement_list_ex:
+ inner_statement_list_ex inner_statement { pushNormalizing($1, $2); }
+ | /* empty */ { init(); }
+;
+
+inner_statement_list:
+ inner_statement_list_ex
+ { makeNop($nop, $this->lookaheadStartAttributes);
+ if ($nop !== null) { $1[] = $nop; } $$ = $1; }
+;
+
+inner_statement:
+ statement { $$ = $1; }
+ | function_declaration_statement { $$ = $1; }
+ | class_declaration_statement { $$ = $1; }
+ | T_HALT_COMPILER
+ { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); }
+;
+
+non_empty_statement:
+ '{' inner_statement_list '}' { $$ = $2; prependLeadingComments($$); }
+ | T_IF parentheses_expr statement elseif_list else_single
+ { $$ = Stmt\If_[$2, ['stmts' => toArray($3), 'elseifs' => $4, 'else' => $5]]; }
+ | T_IF parentheses_expr ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';'
+ { $$ = Stmt\If_[$2, ['stmts' => $4, 'elseifs' => $5, 'else' => $6]]; }
+ | T_WHILE parentheses_expr while_statement { $$ = Stmt\While_[$2, $3]; }
+ | T_DO statement T_WHILE parentheses_expr ';' { $$ = Stmt\Do_ [$4, toArray($2)]; }
+ | T_FOR '(' for_expr ';' for_expr ';' for_expr ')' for_statement
+ { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; }
+ | T_SWITCH parentheses_expr switch_case_list { $$ = Stmt\Switch_[$2, $3]; }
+ | T_BREAK ';' { $$ = Stmt\Break_[null]; }
+ | T_BREAK expr ';' { $$ = Stmt\Break_[$2]; }
+ | T_CONTINUE ';' { $$ = Stmt\Continue_[null]; }
+ | T_CONTINUE expr ';' { $$ = Stmt\Continue_[$2]; }
+ | T_RETURN ';' { $$ = Stmt\Return_[null]; }
+ | T_RETURN expr ';' { $$ = Stmt\Return_[$2]; }
+ | yield_expr ';' { $$ = $1; }
+ | T_GLOBAL global_var_list ';' { $$ = Stmt\Global_[$2]; }
+ | T_STATIC static_var_list ';' { $$ = Stmt\Static_[$2]; }
+ | T_ECHO expr_list ';' { $$ = Stmt\Echo_[$2]; }
+ | T_INLINE_HTML { $$ = Stmt\InlineHTML[$1]; }
+ | expr ';' { $$ = $1; }
+ | T_UNSET '(' variables_list ')' ';' { $$ = Stmt\Unset_[$3]; }
+ | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement
+ { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; }
+ | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement
+ { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; }
+ | T_DECLARE '(' declare_list ')' declare_statement { $$ = Stmt\Declare_[$3, $5]; }
+ | T_TRY '{' inner_statement_list '}' catches optional_finally
+ { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); }
+ | T_THROW expr ';' { $$ = Stmt\Throw_[$2]; }
+ | T_GOTO T_STRING ';' { $$ = Stmt\Goto_[$2]; }
+ | T_STRING ':' { $$ = Stmt\Label[$1]; }
+ | expr error { $$ = $1; }
+ | error { $$ = array(); /* means: no statement */ }
+;
+
+statement:
+ non_empty_statement { $$ = $1; }
+ | ';'
+ { makeNop($$, $this->startAttributeStack[#1]);
+ if ($$ === null) $$ = array(); /* means: no statement */ }
+;
+
+catches:
+ /* empty */ { init(); }
+ | catches catch { push($1, $2); }
+;
+
+catch:
+ T_CATCH '(' name T_VARIABLE ')' '{' inner_statement_list '}'
+ { $$ = Stmt\Catch_[array($3), parseVar($4), $7]; }
+;
+
+optional_finally:
+ /* empty */ { $$ = null; }
+ | T_FINALLY '{' inner_statement_list '}' { $$ = Stmt\Finally_[$3]; }
+;
+
+variables_list:
+ variable { init($1); }
+ | variables_list ',' variable { push($1, $3); }
+;
+
+optional_ref:
+ /* empty */ { $$ = false; }
+ | '&' { $$ = true; }
+;
+
+optional_ellipsis:
+ /* empty */ { $$ = false; }
+ | T_ELLIPSIS { $$ = true; }
+;
+
+function_declaration_statement:
+ T_FUNCTION optional_ref T_STRING '(' parameter_list ')' optional_return_type '{' inner_statement_list '}'
+ { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $9]]; }
+;
+
+class_declaration_statement:
+ class_entry_type T_STRING extends_from implements_list '{' class_statement_list '}'
+ { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6]];
+ $this->checkClass($$, #2); }
+ | T_INTERFACE T_STRING interface_extends_list '{' class_statement_list '}'
+ { $$ = Stmt\Interface_[$2, ['extends' => $3, 'stmts' => $5]];
+ $this->checkInterface($$, #2); }
+ | T_TRAIT T_STRING '{' class_statement_list '}'
+ { $$ = Stmt\Trait_[$2, ['stmts' => $4]]; }
+;
+
+class_entry_type:
+ T_CLASS { $$ = 0; }
+ | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
+ | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; }
+;
+
+extends_from:
+ /* empty */ { $$ = null; }
+ | T_EXTENDS name { $$ = $2; }
+;
+
+interface_extends_list:
+ /* empty */ { $$ = array(); }
+ | T_EXTENDS name_list { $$ = $2; }
+;
+
+implements_list:
+ /* empty */ { $$ = array(); }
+ | T_IMPLEMENTS name_list { $$ = $2; }
+;
+
+name_list:
+ name { init($1); }
+ | name_list ',' name { push($1, $3); }
+;
+
+for_statement:
+ statement { $$ = toArray($1); }
+ | ':' inner_statement_list T_ENDFOR ';' { $$ = $2; }
+;
+
+foreach_statement:
+ statement { $$ = toArray($1); }
+ | ':' inner_statement_list T_ENDFOREACH ';' { $$ = $2; }
+;
+
+declare_statement:
+ non_empty_statement { $$ = toArray($1); }
+ | ';' { $$ = null; }
+ | ':' inner_statement_list T_ENDDECLARE ';' { $$ = $2; }
+;
+
+declare_list:
+ declare_list_element { init($1); }
+ | declare_list ',' declare_list_element { push($1, $3); }
+;
+
+declare_list_element:
+ T_STRING '=' static_scalar { $$ = Stmt\DeclareDeclare[$1, $3]; }
+;
+
+switch_case_list:
+ '{' case_list '}' { $$ = $2; }
+ | '{' ';' case_list '}' { $$ = $3; }
+ | ':' case_list T_ENDSWITCH ';' { $$ = $2; }
+ | ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
+;
+
+case_list:
+ /* empty */ { init(); }
+ | case_list case { push($1, $2); }
+;
+
+case:
+ T_CASE expr case_separator inner_statement_list { $$ = Stmt\Case_[$2, $4]; }
+ | T_DEFAULT case_separator inner_statement_list { $$ = Stmt\Case_[null, $3]; }
+;
+
+case_separator:
+ ':'
+ | ';'
+;
+
+while_statement:
+ statement { $$ = toArray($1); }
+ | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; }
+;
+
+elseif_list:
+ /* empty */ { init(); }
+ | elseif_list elseif { push($1, $2); }
+;
+
+elseif:
+ T_ELSEIF parentheses_expr statement { $$ = Stmt\ElseIf_[$2, toArray($3)]; }
+;
+
+new_elseif_list:
+ /* empty */ { init(); }
+ | new_elseif_list new_elseif { push($1, $2); }
+;
+
+new_elseif:
+ T_ELSEIF parentheses_expr ':' inner_statement_list { $$ = Stmt\ElseIf_[$2, $4]; }
+;
+
+else_single:
+ /* empty */ { $$ = null; }
+ | T_ELSE statement { $$ = Stmt\Else_[toArray($2)]; }
+;
+
+new_else_single:
+ /* empty */ { $$ = null; }
+ | T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; }
+;
+
+foreach_variable:
+ variable { $$ = array($1, false); }
+ | '&' variable { $$ = array($2, true); }
+ | list_expr { $$ = array($1, false); }
+;
+
+parameter_list:
+ non_empty_parameter_list { $$ = $1; }
+ | /* empty */ { $$ = array(); }
+;
+
+non_empty_parameter_list:
+ parameter { init($1); }
+ | non_empty_parameter_list ',' parameter { push($1, $3); }
+;
+
+parameter:
+ optional_param_type optional_ref optional_ellipsis T_VARIABLE
+ { $$ = Node\Param[parseVar($4), null, $1, $2, $3]; $this->checkParam($$); }
+ | optional_param_type optional_ref optional_ellipsis T_VARIABLE '=' static_scalar
+ { $$ = Node\Param[parseVar($4), $6, $1, $2, $3]; $this->checkParam($$); }
+;
+
+type:
+ name { $$ = $1; }
+ | T_ARRAY { $$ = 'array'; }
+ | T_CALLABLE { $$ = 'callable'; }
+;
+
+optional_param_type:
+ /* empty */ { $$ = null; }
+ | type { $$ = $1; }
+;
+
+optional_return_type:
+ /* empty */ { $$ = null; }
+ | ':' type { $$ = $2; }
+;
+
+argument_list:
+ '(' ')' { $$ = array(); }
+ | '(' non_empty_argument_list ')' { $$ = $2; }
+ | '(' yield_expr ')' { $$ = array(Node\Arg[$2, false, false]); }
+;
+
+non_empty_argument_list:
+ argument { init($1); }
+ | non_empty_argument_list ',' argument { push($1, $3); }
+;
+
+argument:
+ expr { $$ = Node\Arg[$1, false, false]; }
+ | '&' variable { $$ = Node\Arg[$2, true, false]; }
+ | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; }
+;
+
+global_var_list:
+ global_var_list ',' global_var { push($1, $3); }
+ | global_var { init($1); }
+;
+
+global_var:
+ T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; }
+ | '$' variable { $$ = Expr\Variable[$2]; }
+ | '$' '{' expr '}' { $$ = Expr\Variable[$3]; }
+;
+
+static_var_list:
+ static_var_list ',' static_var { push($1, $3); }
+ | static_var { init($1); }
+;
+
+static_var:
+ T_VARIABLE { $$ = Stmt\StaticVar[parseVar($1), null]; }
+ | T_VARIABLE '=' static_scalar { $$ = Stmt\StaticVar[parseVar($1), $3]; }
+;
+
+class_statement_list:
+ class_statement_list class_statement { push($1, $2); }
+ | /* empty */ { init(); }
+;
+
+class_statement:
+ variable_modifiers property_declaration_list ';'
+ { $$ = Stmt\Property[$1, $2]; $this->checkProperty($$, #1); }
+ | T_CONST class_const_list ';' { $$ = Stmt\ClassConst[$2, 0]; }
+ | method_modifiers T_FUNCTION optional_ref identifier '(' parameter_list ')' optional_return_type method_body
+ { $$ = Stmt\ClassMethod[$4, ['type' => $1, 'byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9]];
+ $this->checkClassMethod($$, #1); }
+ | T_USE name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; }
+;
+
+trait_adaptations:
+ ';' { $$ = array(); }
+ | '{' trait_adaptation_list '}' { $$ = $2; }
+;
+
+trait_adaptation_list:
+ /* empty */ { init(); }
+ | trait_adaptation_list trait_adaptation { push($1, $2); }
+;
+
+trait_adaptation:
+ trait_method_reference_fully_qualified T_INSTEADOF name_list ';'
+ { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; }
+ | trait_method_reference T_AS member_modifier identifier ';'
+ { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; }
+ | trait_method_reference T_AS member_modifier ';'
+ { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; }
+ | trait_method_reference T_AS T_STRING ';'
+ { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; }
+ | trait_method_reference T_AS reserved_non_modifiers ';'
+ { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; }
+;
+
+trait_method_reference_fully_qualified:
+ name T_PAAMAYIM_NEKUDOTAYIM identifier { $$ = array($1, $3); }
+;
+trait_method_reference:
+ trait_method_reference_fully_qualified { $$ = $1; }
+ | identifier { $$ = array(null, $1); }
+;
+
+method_body:
+ ';' /* abstract method */ { $$ = null; }
+ | '{' inner_statement_list '}' { $$ = $2; }
+;
+
+variable_modifiers:
+ non_empty_member_modifiers { $$ = $1; }
+ | T_VAR { $$ = 0; }
+;
+
+method_modifiers:
+ /* empty */ { $$ = 0; }
+ | non_empty_member_modifiers { $$ = $1; }
+;
+
+non_empty_member_modifiers:
+ member_modifier { $$ = $1; }
+ | non_empty_member_modifiers member_modifier { $this->checkModifier($1, $2, #2); $$ = $1 | $2; }
+;
+
+member_modifier:
+ T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; }
+ | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; }
+ | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; }
+ | T_STATIC { $$ = Stmt\Class_::MODIFIER_STATIC; }
+ | T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
+ | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; }
+;
+
+property_declaration_list:
+ property_declaration { init($1); }
+ | property_declaration_list ',' property_declaration { push($1, $3); }
+;
+
+property_declaration:
+ T_VARIABLE { $$ = Stmt\PropertyProperty[parseVar($1), null]; }
+ | T_VARIABLE '=' static_scalar { $$ = Stmt\PropertyProperty[parseVar($1), $3]; }
+;
+
+expr_list:
+ expr_list ',' expr { push($1, $3); }
+ | expr { init($1); }
+;
+
+for_expr:
+ /* empty */ { $$ = array(); }
+ | expr_list { $$ = $1; }
+;
+
+expr:
+ variable { $$ = $1; }
+ | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; }
+ | variable '=' expr { $$ = Expr\Assign[$1, $3]; }
+ | variable '=' '&' variable { $$ = Expr\AssignRef[$1, $4]; }
+ | variable '=' '&' new_expr { $$ = Expr\AssignRef[$1, $4]; }
+ | new_expr { $$ = $1; }
+ | T_CLONE expr { $$ = Expr\Clone_[$2]; }
+ | variable T_PLUS_EQUAL expr { $$ = Expr\AssignOp\Plus [$1, $3]; }
+ | variable T_MINUS_EQUAL expr { $$ = Expr\AssignOp\Minus [$1, $3]; }
+ | variable T_MUL_EQUAL expr { $$ = Expr\AssignOp\Mul [$1, $3]; }
+ | variable T_DIV_EQUAL expr { $$ = Expr\AssignOp\Div [$1, $3]; }
+ | variable T_CONCAT_EQUAL expr { $$ = Expr\AssignOp\Concat [$1, $3]; }
+ | variable T_MOD_EQUAL expr { $$ = Expr\AssignOp\Mod [$1, $3]; }
+ | variable T_AND_EQUAL expr { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; }
+ | variable T_OR_EQUAL expr { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; }
+ | variable T_XOR_EQUAL expr { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; }
+ | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; }
+ | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; }
+ | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; }
+ | variable T_INC { $$ = Expr\PostInc[$1]; }
+ | T_INC variable { $$ = Expr\PreInc [$2]; }
+ | variable T_DEC { $$ = Expr\PostDec[$1]; }
+ | T_DEC variable { $$ = Expr\PreDec [$2]; }
+ | expr T_BOOLEAN_OR expr { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; }
+ | expr T_BOOLEAN_AND expr { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; }
+ | expr T_LOGICAL_OR expr { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; }
+ | expr T_LOGICAL_AND expr { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; }
+ | expr T_LOGICAL_XOR expr { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; }
+ | expr '|' expr { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; }
+ | expr '&' expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; }
+ | expr '^' expr { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; }
+ | expr '.' expr { $$ = Expr\BinaryOp\Concat [$1, $3]; }
+ | expr '+' expr { $$ = Expr\BinaryOp\Plus [$1, $3]; }
+ | expr '-' expr { $$ = Expr\BinaryOp\Minus [$1, $3]; }
+ | expr '*' expr { $$ = Expr\BinaryOp\Mul [$1, $3]; }
+ | expr '/' expr { $$ = Expr\BinaryOp\Div [$1, $3]; }
+ | expr '%' expr { $$ = Expr\BinaryOp\Mod [$1, $3]; }
+ | expr T_SL expr { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; }
+ | expr T_SR expr { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; }
+ | expr T_POW expr { $$ = Expr\BinaryOp\Pow [$1, $3]; }
+ | '+' expr %prec T_INC { $$ = Expr\UnaryPlus [$2]; }
+ | '-' expr %prec T_INC { $$ = Expr\UnaryMinus[$2]; }
+ | '!' expr { $$ = Expr\BooleanNot[$2]; }
+ | '~' expr { $$ = Expr\BitwiseNot[$2]; }
+ | expr T_IS_IDENTICAL expr { $$ = Expr\BinaryOp\Identical [$1, $3]; }
+ | expr T_IS_NOT_IDENTICAL expr { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; }
+ | expr T_IS_EQUAL expr { $$ = Expr\BinaryOp\Equal [$1, $3]; }
+ | expr T_IS_NOT_EQUAL expr { $$ = Expr\BinaryOp\NotEqual [$1, $3]; }
+ | expr T_SPACESHIP expr { $$ = Expr\BinaryOp\Spaceship [$1, $3]; }
+ | expr '<' expr { $$ = Expr\BinaryOp\Smaller [$1, $3]; }
+ | expr T_IS_SMALLER_OR_EQUAL expr { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; }
+ | expr '>' expr { $$ = Expr\BinaryOp\Greater [$1, $3]; }
+ | expr T_IS_GREATER_OR_EQUAL expr { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; }
+ | expr T_INSTANCEOF class_name_reference { $$ = Expr\Instanceof_[$1, $3]; }
+ | parentheses_expr { $$ = $1; }
+ /* we need a separate '(' new_expr ')' rule to avoid problems caused by a s/r conflict */
+ | '(' new_expr ')' { $$ = $2; }
+ | expr '?' expr ':' expr { $$ = Expr\Ternary[$1, $3, $5]; }
+ | expr '?' ':' expr { $$ = Expr\Ternary[$1, null, $4]; }
+ | expr T_COALESCE expr { $$ = Expr\BinaryOp\Coalesce[$1, $3]; }
+ | T_ISSET '(' variables_list ')' { $$ = Expr\Isset_[$3]; }
+ | T_EMPTY '(' expr ')' { $$ = Expr\Empty_[$3]; }
+ | T_INCLUDE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; }
+ | T_INCLUDE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; }
+ | T_EVAL parentheses_expr { $$ = Expr\Eval_[$2]; }
+ | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; }
+ | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; }
+ | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; }
+ | T_DOUBLE_CAST expr { $$ = Expr\Cast\Double [$2]; }
+ | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; }
+ | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; }
+ | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; }
+ | T_BOOL_CAST expr { $$ = Expr\Cast\Bool_ [$2]; }
+ | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; }
+ | T_EXIT exit_expr
+ { $attrs = attributes();
+ $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
+ $$ = new Expr\Exit_($2, $attrs); }
+ | '@' expr { $$ = Expr\ErrorSuppress[$2]; }
+ | scalar { $$ = $1; }
+ | array_expr { $$ = $1; }
+ | scalar_dereference { $$ = $1; }
+ | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; }
+ | T_PRINT expr { $$ = Expr\Print_[$2]; }
+ | T_YIELD { $$ = Expr\Yield_[null, null]; }
+ | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; }
+ | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type
+ '{' inner_statement_list '}'
+ { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $9]]; }
+ | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type
+ '{' inner_statement_list '}'
+ { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $10]]; }
+;
+
+parentheses_expr:
+ '(' expr ')' { $$ = $2; }
+ | '(' yield_expr ')' { $$ = $2; }
+;
+
+yield_expr:
+ T_YIELD expr { $$ = Expr\Yield_[$2, null]; }
+ | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr\Yield_[$4, $2]; }
+;
+
+array_expr:
+ T_ARRAY '(' array_pair_list ')'
+ { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG;
+ $$ = new Expr\Array_($3, $attrs); }
+ | '[' array_pair_list ']'
+ { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT;
+ $$ = new Expr\Array_($2, $attrs); }
+;
+
+scalar_dereference:
+ array_expr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']'
+ { $attrs = attributes(); $attrs['kind'] = strKind($1);
+ $$ = Expr\ArrayDimFetch[new Scalar\String_(Scalar\String_::parse($1), $attrs), $3]; }
+ | constant '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | scalar_dereference '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ /* alternative array syntax missing intentionally */
+;
+
+anonymous_class:
+ T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}'
+ { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $3, 'implements' => $4, 'stmts' => $6]], $2);
+ $this->checkClass($$[0], -1); }
+
+new_expr:
+ T_NEW class_name_reference ctor_arguments { $$ = Expr\New_[$2, $3]; }
+ | T_NEW anonymous_class
+ { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; }
+;
+
+lexical_vars:
+ /* empty */ { $$ = array(); }
+ | T_USE '(' lexical_var_list ')' { $$ = $3; }
+;
+
+lexical_var_list:
+ lexical_var { init($1); }
+ | lexical_var_list ',' lexical_var { push($1, $3); }
+;
+
+lexical_var:
+ optional_ref T_VARIABLE { $$ = Expr\ClosureUse[parseVar($2), $1]; }
+;
+
+function_call:
+ name argument_list { $$ = Expr\FuncCall[$1, $2]; }
+ | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier argument_list
+ { $$ = Expr\StaticCall[$1, $3, $4]; }
+ | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '{' expr '}' argument_list
+ { $$ = Expr\StaticCall[$1, $4, $6]; }
+ | static_property argument_list {
+ if ($1 instanceof Node\Expr\StaticPropertyFetch) {
+ $$ = Expr\StaticCall[$1->class, Expr\Variable[$1->name], $2];
+ } elseif ($1 instanceof Node\Expr\ArrayDimFetch) {
+ $tmp = $1;
+ while ($tmp->var instanceof Node\Expr\ArrayDimFetch) {
+ $tmp = $tmp->var;
+ }
+
+ $$ = Expr\StaticCall[$tmp->var->class, $1, $2];
+ $tmp->var = Expr\Variable[$tmp->var->name];
+ } else {
+ throw new \Exception;
+ }
+ }
+ | variable_without_objects argument_list
+ { $$ = Expr\FuncCall[$1, $2]; }
+ | function_call '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ /* alternative array syntax missing intentionally */
+;
+
+class_name:
+ T_STATIC { $$ = Name[$1]; }
+ | name { $$ = $1; }
+;
+
+name:
+ namespace_name_parts { $$ = Name[$1]; }
+ | T_NS_SEPARATOR namespace_name_parts { $$ = Name\FullyQualified[$2]; }
+ | T_NAMESPACE T_NS_SEPARATOR namespace_name_parts { $$ = Name\Relative[$3]; }
+;
+
+class_name_reference:
+ class_name { $$ = $1; }
+ | dynamic_class_name_reference { $$ = $1; }
+;
+
+dynamic_class_name_reference:
+ object_access_for_dcnr { $$ = $1; }
+ | base_variable { $$ = $1; }
+;
+
+class_name_or_var:
+ class_name { $$ = $1; }
+ | reference_variable { $$ = $1; }
+;
+
+object_access_for_dcnr:
+ base_variable T_OBJECT_OPERATOR object_property
+ { $$ = Expr\PropertyFetch[$1, $3]; }
+ | object_access_for_dcnr T_OBJECT_OPERATOR object_property
+ { $$ = Expr\PropertyFetch[$1, $3]; }
+ | object_access_for_dcnr '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | object_access_for_dcnr '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+;
+
+exit_expr:
+ /* empty */ { $$ = null; }
+ | '(' ')' { $$ = null; }
+ | parentheses_expr { $$ = $1; }
+;
+
+backticks_expr:
+ /* empty */ { $$ = array(); }
+ | T_ENCAPSED_AND_WHITESPACE
+ { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`', false)]); }
+ | encaps_list { parseEncapsed($1, '`', false); $$ = $1; }
+;
+
+ctor_arguments:
+ /* empty */ { $$ = array(); }
+ | argument_list { $$ = $1; }
+;
+
+common_scalar:
+ T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), true); }
+ | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; }
+ | T_CONSTANT_ENCAPSED_STRING
+ { $attrs = attributes(); $attrs['kind'] = strKind($1);
+ $$ = new Scalar\String_(Scalar\String_::parse($1, false), $attrs); }
+ | T_LINE { $$ = Scalar\MagicConst\Line[]; }
+ | T_FILE { $$ = Scalar\MagicConst\File[]; }
+ | T_DIR { $$ = Scalar\MagicConst\Dir[]; }
+ | T_CLASS_C { $$ = Scalar\MagicConst\Class_[]; }
+ | T_TRAIT_C { $$ = Scalar\MagicConst\Trait_[]; }
+ | T_METHOD_C { $$ = Scalar\MagicConst\Method[]; }
+ | T_FUNC_C { $$ = Scalar\MagicConst\Function_[]; }
+ | T_NS_C { $$ = Scalar\MagicConst\Namespace_[]; }
+ | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC
+ { $attrs = attributes(); setDocStringAttrs($attrs, $1);
+ $$ = new Scalar\String_(Scalar\String_::parseDocString($1, $2, false), $attrs); }
+ | T_START_HEREDOC T_END_HEREDOC
+ { $attrs = attributes(); setDocStringAttrs($attrs, $1);
+ $$ = new Scalar\String_('', $attrs); }
+;
+
+static_scalar:
+ common_scalar { $$ = $1; }
+ | class_name T_PAAMAYIM_NEKUDOTAYIM identifier { $$ = Expr\ClassConstFetch[$1, $3]; }
+ | name { $$ = Expr\ConstFetch[$1]; }
+ | T_ARRAY '(' static_array_pair_list ')' { $$ = Expr\Array_[$3]; }
+ | '[' static_array_pair_list ']' { $$ = Expr\Array_[$2]; }
+ | static_operation { $$ = $1; }
+;
+
+static_operation:
+ static_scalar T_BOOLEAN_OR static_scalar { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; }
+ | static_scalar T_BOOLEAN_AND static_scalar { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; }
+ | static_scalar T_LOGICAL_OR static_scalar { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; }
+ | static_scalar T_LOGICAL_AND static_scalar { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; }
+ | static_scalar T_LOGICAL_XOR static_scalar { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; }
+ | static_scalar '|' static_scalar { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; }
+ | static_scalar '&' static_scalar { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; }
+ | static_scalar '^' static_scalar { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; }
+ | static_scalar '.' static_scalar { $$ = Expr\BinaryOp\Concat [$1, $3]; }
+ | static_scalar '+' static_scalar { $$ = Expr\BinaryOp\Plus [$1, $3]; }
+ | static_scalar '-' static_scalar { $$ = Expr\BinaryOp\Minus [$1, $3]; }
+ | static_scalar '*' static_scalar { $$ = Expr\BinaryOp\Mul [$1, $3]; }
+ | static_scalar '/' static_scalar { $$ = Expr\BinaryOp\Div [$1, $3]; }
+ | static_scalar '%' static_scalar { $$ = Expr\BinaryOp\Mod [$1, $3]; }
+ | static_scalar T_SL static_scalar { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; }
+ | static_scalar T_SR static_scalar { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; }
+ | static_scalar T_POW static_scalar { $$ = Expr\BinaryOp\Pow [$1, $3]; }
+ | '+' static_scalar %prec T_INC { $$ = Expr\UnaryPlus [$2]; }
+ | '-' static_scalar %prec T_INC { $$ = Expr\UnaryMinus[$2]; }
+ | '!' static_scalar { $$ = Expr\BooleanNot[$2]; }
+ | '~' static_scalar { $$ = Expr\BitwiseNot[$2]; }
+ | static_scalar T_IS_IDENTICAL static_scalar { $$ = Expr\BinaryOp\Identical [$1, $3]; }
+ | static_scalar T_IS_NOT_IDENTICAL static_scalar { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; }
+ | static_scalar T_IS_EQUAL static_scalar { $$ = Expr\BinaryOp\Equal [$1, $3]; }
+ | static_scalar T_IS_NOT_EQUAL static_scalar { $$ = Expr\BinaryOp\NotEqual [$1, $3]; }
+ | static_scalar '<' static_scalar { $$ = Expr\BinaryOp\Smaller [$1, $3]; }
+ | static_scalar T_IS_SMALLER_OR_EQUAL static_scalar { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; }
+ | static_scalar '>' static_scalar { $$ = Expr\BinaryOp\Greater [$1, $3]; }
+ | static_scalar T_IS_GREATER_OR_EQUAL static_scalar { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; }
+ | static_scalar '?' static_scalar ':' static_scalar { $$ = Expr\Ternary[$1, $3, $5]; }
+ | static_scalar '?' ':' static_scalar { $$ = Expr\Ternary[$1, null, $4]; }
+ | static_scalar '[' static_scalar ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | '(' static_scalar ')' { $$ = $2; }
+;
+
+constant:
+ name { $$ = Expr\ConstFetch[$1]; }
+ | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier
+ { $$ = Expr\ClassConstFetch[$1, $3]; }
+;
+
+scalar:
+ common_scalar { $$ = $1; }
+ | constant { $$ = $1; }
+ | '"' encaps_list '"'
+ { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
+ parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); }
+ | T_START_HEREDOC encaps_list T_END_HEREDOC
+ { $attrs = attributes(); setDocStringAttrs($attrs, $1);
+ parseEncapsedDoc($2, true); $$ = new Scalar\Encapsed($2, $attrs); }
+;
+
+static_array_pair_list:
+ /* empty */ { $$ = array(); }
+ | non_empty_static_array_pair_list optional_comma { $$ = $1; }
+;
+
+optional_comma:
+ /* empty */
+ | ','
+;
+
+non_empty_static_array_pair_list:
+ non_empty_static_array_pair_list ',' static_array_pair { push($1, $3); }
+ | static_array_pair { init($1); }
+;
+
+static_array_pair:
+ static_scalar T_DOUBLE_ARROW static_scalar { $$ = Expr\ArrayItem[$3, $1, false]; }
+ | static_scalar { $$ = Expr\ArrayItem[$1, null, false]; }
+;
+
+variable:
+ object_access { $$ = $1; }
+ | base_variable { $$ = $1; }
+ | function_call { $$ = $1; }
+ | new_expr_array_deref { $$ = $1; }
+;
+
+new_expr_array_deref:
+ '(' new_expr ')' '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$2, $5]; }
+ | new_expr_array_deref '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ /* alternative array syntax missing intentionally */
+;
+
+object_access:
+ variable_or_new_expr T_OBJECT_OPERATOR object_property
+ { $$ = Expr\PropertyFetch[$1, $3]; }
+ | variable_or_new_expr T_OBJECT_OPERATOR object_property argument_list
+ { $$ = Expr\MethodCall[$1, $3, $4]; }
+ | object_access argument_list { $$ = Expr\FuncCall[$1, $2]; }
+ | object_access '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | object_access '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+;
+
+variable_or_new_expr:
+ variable { $$ = $1; }
+ | '(' new_expr ')' { $$ = $2; }
+;
+
+variable_without_objects:
+ reference_variable { $$ = $1; }
+ | '$' variable_without_objects { $$ = Expr\Variable[$2]; }
+;
+
+base_variable:
+ variable_without_objects { $$ = $1; }
+ | static_property { $$ = $1; }
+;
+
+static_property:
+ class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' reference_variable
+ { $$ = Expr\StaticPropertyFetch[$1, $4]; }
+ | static_property_with_arrays { $$ = $1; }
+;
+
+static_property_with_arrays:
+ class_name_or_var T_PAAMAYIM_NEKUDOTAYIM T_VARIABLE
+ { $$ = Expr\StaticPropertyFetch[$1, parseVar($3)]; }
+ | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '$' '{' expr '}'
+ { $$ = Expr\StaticPropertyFetch[$1, $5]; }
+ | static_property_with_arrays '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | static_property_with_arrays '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+;
+
+reference_variable:
+ reference_variable '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | reference_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; }
+ | '$' '{' expr '}' { $$ = Expr\Variable[$3]; }
+;
+
+dim_offset:
+ /* empty */ { $$ = null; }
+ | expr { $$ = $1; }
+;
+
+object_property:
+ T_STRING { $$ = $1; }
+ | '{' expr '}' { $$ = $2; }
+ | variable_without_objects { $$ = $1; }
+ | error { $$ = Expr\Error[]; $this->errorState = 2; }
+;
+
+list_expr:
+ T_LIST '(' list_expr_elements ')' { $$ = Expr\List_[$3]; }
+;
+
+list_expr_elements:
+ list_expr_elements ',' list_expr_element { push($1, $3); }
+ | list_expr_element { init($1); }
+;
+
+list_expr_element:
+ variable { $$ = Expr\ArrayItem[$1, null, false]; }
+ | list_expr { $$ = Expr\ArrayItem[$1, null, false]; }
+ | /* empty */ { $$ = null; }
+;
+
+array_pair_list:
+ /* empty */ { $$ = array(); }
+ | non_empty_array_pair_list optional_comma { $$ = $1; }
+;
+
+non_empty_array_pair_list:
+ non_empty_array_pair_list ',' array_pair { push($1, $3); }
+ | array_pair { init($1); }
+;
+
+array_pair:
+ expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; }
+ | expr { $$ = Expr\ArrayItem[$1, null, false]; }
+ | expr T_DOUBLE_ARROW '&' variable { $$ = Expr\ArrayItem[$4, $1, true]; }
+ | '&' variable { $$ = Expr\ArrayItem[$2, null, true]; }
+;
+
+encaps_list:
+ encaps_list encaps_var { push($1, $2); }
+ | encaps_list encaps_string_part { push($1, $2); }
+ | encaps_var { init($1); }
+ | encaps_string_part encaps_var { init($1, $2); }
+;
+
+encaps_string_part:
+ T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; }
+;
+
+encaps_base_var:
+ T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; }
+;
+
+encaps_var:
+ encaps_base_var { $$ = $1; }
+ | encaps_base_var '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | encaps_base_var T_OBJECT_OPERATOR T_STRING { $$ = Expr\PropertyFetch[$1, $3]; }
+ | T_DOLLAR_OPEN_CURLY_BRACES expr '}' { $$ = Expr\Variable[$2]; }
+ | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}' { $$ = Expr\Variable[$2]; }
+ | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}'
+ { $$ = Expr\ArrayDimFetch[Expr\Variable[$2], $4]; }
+ | T_CURLY_OPEN variable '}' { $$ = $2; }
+;
+
+encaps_var_offset:
+ T_STRING { $$ = Scalar\String_[$1]; }
+ | T_NUM_STRING { $$ = Scalar\String_[$1]; }
+ | T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; }
+;
+
+%%
diff --git a/vendor/nikic/php-parser/grammar/php7.y b/vendor/nikic/php-parser/grammar/php7.y
new file mode 100644
index 0000000..5c9d586
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/php7.y
@@ -0,0 +1,882 @@
+%pure_parser
+%expect 2
+
+%tokens
+
+%%
+
+start:
+ top_statement_list { $$ = $this->handleNamespaces($1); }
+;
+
+top_statement_list_ex:
+ top_statement_list_ex top_statement { pushNormalizing($1, $2); }
+ | /* empty */ { init(); }
+;
+
+top_statement_list:
+ top_statement_list_ex
+ { makeNop($nop, $this->lookaheadStartAttributes);
+ if ($nop !== null) { $1[] = $nop; } $$ = $1; }
+;
+
+reserved_non_modifiers:
+ T_INCLUDE | T_INCLUDE_ONCE | T_EVAL | T_REQUIRE | T_REQUIRE_ONCE | T_LOGICAL_OR | T_LOGICAL_XOR | T_LOGICAL_AND
+ | T_INSTANCEOF | T_NEW | T_CLONE | T_EXIT | T_IF | T_ELSEIF | T_ELSE | T_ENDIF | T_ECHO | T_DO | T_WHILE
+ | T_ENDWHILE | T_FOR | T_ENDFOR | T_FOREACH | T_ENDFOREACH | T_DECLARE | T_ENDDECLARE | T_AS | T_TRY | T_CATCH
+ | T_FINALLY | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO
+ | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT
+ | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS
+ | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_HALT_COMPILER
+;
+
+semi_reserved:
+ reserved_non_modifiers
+ | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC
+;
+
+identifier:
+ T_STRING { $$ = $1; }
+ | semi_reserved { $$ = $1; }
+;
+
+namespace_name_parts:
+ T_STRING { init($1); }
+ | namespace_name_parts T_NS_SEPARATOR T_STRING { push($1, $3); }
+;
+
+namespace_name:
+ namespace_name_parts { $$ = Name[$1]; }
+;
+
+top_statement:
+ statement { $$ = $1; }
+ | function_declaration_statement { $$ = $1; }
+ | class_declaration_statement { $$ = $1; }
+ | T_HALT_COMPILER
+ { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; }
+ | T_NAMESPACE namespace_name ';'
+ { $$ = Stmt\Namespace_[$2, null]; $this->checkNamespace($$); }
+ | T_NAMESPACE namespace_name '{' top_statement_list '}'
+ { $$ = Stmt\Namespace_[$2, $4]; $this->checkNamespace($$); }
+ | T_NAMESPACE '{' top_statement_list '}'
+ { $$ = Stmt\Namespace_[null, $3]; $this->checkNamespace($$); }
+ | T_USE use_declarations ';' { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; }
+ | T_USE use_type use_declarations ';' { $$ = Stmt\Use_[$3, $2]; }
+ | group_use_declaration ';' { $$ = $1; }
+ | T_CONST constant_declaration_list ';' { $$ = Stmt\Const_[$2]; }
+;
+
+use_type:
+ T_FUNCTION { $$ = Stmt\Use_::TYPE_FUNCTION; }
+ | T_CONST { $$ = Stmt\Use_::TYPE_CONSTANT; }
+;
+
+/* Using namespace_name_parts here to avoid s/r conflict on T_NS_SEPARATOR */
+group_use_declaration:
+ T_USE use_type namespace_name_parts T_NS_SEPARATOR '{' unprefixed_use_declarations '}'
+ { $$ = Stmt\GroupUse[new Name($3, stackAttributes(#3)), $6, $2]; }
+ | T_USE use_type T_NS_SEPARATOR namespace_name_parts T_NS_SEPARATOR '{' unprefixed_use_declarations '}'
+ { $$ = Stmt\GroupUse[new Name($4, stackAttributes(#4)), $7, $2]; }
+ | T_USE namespace_name_parts T_NS_SEPARATOR '{' inline_use_declarations '}'
+ { $$ = Stmt\GroupUse[new Name($2, stackAttributes(#2)), $5, Stmt\Use_::TYPE_UNKNOWN]; }
+ | T_USE T_NS_SEPARATOR namespace_name_parts T_NS_SEPARATOR '{' inline_use_declarations '}'
+ { $$ = Stmt\GroupUse[new Name($3, stackAttributes(#3)), $6, Stmt\Use_::TYPE_UNKNOWN]; }
+;
+
+unprefixed_use_declarations:
+ unprefixed_use_declarations ',' unprefixed_use_declaration
+ { push($1, $3); }
+ | unprefixed_use_declaration { init($1); }
+;
+
+use_declarations:
+ use_declarations ',' use_declaration { push($1, $3); }
+ | use_declaration { init($1); }
+;
+
+inline_use_declarations:
+ inline_use_declarations ',' inline_use_declaration { push($1, $3); }
+ | inline_use_declaration { init($1); }
+;
+
+unprefixed_use_declaration:
+ namespace_name
+ { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); }
+ | namespace_name T_AS T_STRING
+ { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); }
+;
+
+use_declaration:
+ unprefixed_use_declaration { $$ = $1; }
+ | T_NS_SEPARATOR unprefixed_use_declaration { $$ = $2; }
+;
+
+inline_use_declaration:
+ unprefixed_use_declaration { $$ = $1; $$->type = Stmt\Use_::TYPE_NORMAL; }
+ | use_type unprefixed_use_declaration { $$ = $2; $$->type = $1; }
+;
+
+constant_declaration_list:
+ constant_declaration_list ',' constant_declaration { push($1, $3); }
+ | constant_declaration { init($1); }
+;
+
+constant_declaration:
+ T_STRING '=' expr { $$ = Node\Const_[$1, $3]; }
+;
+
+class_const_list:
+ class_const_list ',' class_const { push($1, $3); }
+ | class_const { init($1); }
+;
+
+class_const:
+ identifier '=' expr { $$ = Node\Const_[$1, $3]; }
+;
+
+inner_statement_list_ex:
+ inner_statement_list_ex inner_statement { pushNormalizing($1, $2); }
+ | /* empty */ { init(); }
+;
+
+inner_statement_list:
+ inner_statement_list_ex
+ { makeNop($nop, $this->lookaheadStartAttributes);
+ if ($nop !== null) { $1[] = $nop; } $$ = $1; }
+;
+
+inner_statement:
+ statement { $$ = $1; }
+ | function_declaration_statement { $$ = $1; }
+ | class_declaration_statement { $$ = $1; }
+ | T_HALT_COMPILER
+ { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); }
+;
+
+non_empty_statement:
+ '{' inner_statement_list '}' { $$ = $2; prependLeadingComments($$); }
+ | T_IF '(' expr ')' statement elseif_list else_single
+ { $$ = Stmt\If_[$3, ['stmts' => toArray($5), 'elseifs' => $6, 'else' => $7]]; }
+ | T_IF '(' expr ')' ':' inner_statement_list new_elseif_list new_else_single T_ENDIF ';'
+ { $$ = Stmt\If_[$3, ['stmts' => $6, 'elseifs' => $7, 'else' => $8]]; }
+ | T_WHILE '(' expr ')' while_statement { $$ = Stmt\While_[$3, $5]; }
+ | T_DO statement T_WHILE '(' expr ')' ';' { $$ = Stmt\Do_ [$5, toArray($2)]; }
+ | T_FOR '(' for_expr ';' for_expr ';' for_expr ')' for_statement
+ { $$ = Stmt\For_[['init' => $3, 'cond' => $5, 'loop' => $7, 'stmts' => $9]]; }
+ | T_SWITCH '(' expr ')' switch_case_list { $$ = Stmt\Switch_[$3, $5]; }
+ | T_BREAK optional_expr ';' { $$ = Stmt\Break_[$2]; }
+ | T_CONTINUE optional_expr ';' { $$ = Stmt\Continue_[$2]; }
+ | T_RETURN optional_expr ';' { $$ = Stmt\Return_[$2]; }
+ | T_GLOBAL global_var_list ';' { $$ = Stmt\Global_[$2]; }
+ | T_STATIC static_var_list ';' { $$ = Stmt\Static_[$2]; }
+ | T_ECHO expr_list ';' { $$ = Stmt\Echo_[$2]; }
+ | T_INLINE_HTML { $$ = Stmt\InlineHTML[$1]; }
+ | expr ';' { $$ = $1; }
+ | T_UNSET '(' variables_list ')' ';' { $$ = Stmt\Unset_[$3]; }
+ | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement
+ { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; }
+ | T_FOREACH '(' expr T_AS variable T_DOUBLE_ARROW foreach_variable ')' foreach_statement
+ { $$ = Stmt\Foreach_[$3, $7[0], ['keyVar' => $5, 'byRef' => $7[1], 'stmts' => $9]]; }
+ | T_DECLARE '(' declare_list ')' declare_statement { $$ = Stmt\Declare_[$3, $5]; }
+ | T_TRY '{' inner_statement_list '}' catches optional_finally
+ { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); }
+ | T_THROW expr ';' { $$ = Stmt\Throw_[$2]; }
+ | T_GOTO T_STRING ';' { $$ = Stmt\Goto_[$2]; }
+ | T_STRING ':' { $$ = Stmt\Label[$1]; }
+ | expr error { $$ = $1; }
+ | error { $$ = array(); /* means: no statement */ }
+;
+
+statement:
+ non_empty_statement { $$ = $1; }
+ | ';'
+ { makeNop($$, $this->startAttributeStack[#1]);
+ if ($$ === null) $$ = array(); /* means: no statement */ }
+;
+
+catches:
+ /* empty */ { init(); }
+ | catches catch { push($1, $2); }
+;
+
+name_union:
+ name { init($1); }
+ | name_union '|' name { push($1, $3); }
+;
+
+catch:
+ T_CATCH '(' name_union T_VARIABLE ')' '{' inner_statement_list '}'
+ { $$ = Stmt\Catch_[$3, parseVar($4), $7]; }
+;
+
+optional_finally:
+ /* empty */ { $$ = null; }
+ | T_FINALLY '{' inner_statement_list '}' { $$ = Stmt\Finally_[$3]; }
+;
+
+variables_list:
+ variable { init($1); }
+ | variables_list ',' variable { push($1, $3); }
+;
+
+optional_ref:
+ /* empty */ { $$ = false; }
+ | '&' { $$ = true; }
+;
+
+optional_ellipsis:
+ /* empty */ { $$ = false; }
+ | T_ELLIPSIS { $$ = true; }
+;
+
+function_declaration_statement:
+ T_FUNCTION optional_ref T_STRING '(' parameter_list ')' optional_return_type '{' inner_statement_list '}'
+ { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $9]]; }
+;
+
+class_declaration_statement:
+ class_entry_type T_STRING extends_from implements_list '{' class_statement_list '}'
+ { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6]];
+ $this->checkClass($$, #2); }
+ | T_INTERFACE T_STRING interface_extends_list '{' class_statement_list '}'
+ { $$ = Stmt\Interface_[$2, ['extends' => $3, 'stmts' => $5]];
+ $this->checkInterface($$, #2); }
+ | T_TRAIT T_STRING '{' class_statement_list '}'
+ { $$ = Stmt\Trait_[$2, ['stmts' => $4]]; }
+;
+
+class_entry_type:
+ T_CLASS { $$ = 0; }
+ | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
+ | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; }
+;
+
+extends_from:
+ /* empty */ { $$ = null; }
+ | T_EXTENDS name { $$ = $2; }
+;
+
+interface_extends_list:
+ /* empty */ { $$ = array(); }
+ | T_EXTENDS name_list { $$ = $2; }
+;
+
+implements_list:
+ /* empty */ { $$ = array(); }
+ | T_IMPLEMENTS name_list { $$ = $2; }
+;
+
+name_list:
+ name { init($1); }
+ | name_list ',' name { push($1, $3); }
+;
+
+for_statement:
+ statement { $$ = toArray($1); }
+ | ':' inner_statement_list T_ENDFOR ';' { $$ = $2; }
+;
+
+foreach_statement:
+ statement { $$ = toArray($1); }
+ | ':' inner_statement_list T_ENDFOREACH ';' { $$ = $2; }
+;
+
+declare_statement:
+ non_empty_statement { $$ = toArray($1); }
+ | ';' { $$ = null; }
+ | ':' inner_statement_list T_ENDDECLARE ';' { $$ = $2; }
+;
+
+declare_list:
+ declare_list_element { init($1); }
+ | declare_list ',' declare_list_element { push($1, $3); }
+;
+
+declare_list_element:
+ T_STRING '=' expr { $$ = Stmt\DeclareDeclare[$1, $3]; }
+;
+
+switch_case_list:
+ '{' case_list '}' { $$ = $2; }
+ | '{' ';' case_list '}' { $$ = $3; }
+ | ':' case_list T_ENDSWITCH ';' { $$ = $2; }
+ | ':' ';' case_list T_ENDSWITCH ';' { $$ = $3; }
+;
+
+case_list:
+ /* empty */ { init(); }
+ | case_list case { push($1, $2); }
+;
+
+case:
+ T_CASE expr case_separator inner_statement_list { $$ = Stmt\Case_[$2, $4]; }
+ | T_DEFAULT case_separator inner_statement_list { $$ = Stmt\Case_[null, $3]; }
+;
+
+case_separator:
+ ':'
+ | ';'
+;
+
+while_statement:
+ statement { $$ = toArray($1); }
+ | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; }
+;
+
+elseif_list:
+ /* empty */ { init(); }
+ | elseif_list elseif { push($1, $2); }
+;
+
+elseif:
+ T_ELSEIF '(' expr ')' statement { $$ = Stmt\ElseIf_[$3, toArray($5)]; }
+;
+
+new_elseif_list:
+ /* empty */ { init(); }
+ | new_elseif_list new_elseif { push($1, $2); }
+;
+
+new_elseif:
+ T_ELSEIF '(' expr ')' ':' inner_statement_list { $$ = Stmt\ElseIf_[$3, $6]; }
+;
+
+else_single:
+ /* empty */ { $$ = null; }
+ | T_ELSE statement { $$ = Stmt\Else_[toArray($2)]; }
+;
+
+new_else_single:
+ /* empty */ { $$ = null; }
+ | T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; }
+;
+
+foreach_variable:
+ variable { $$ = array($1, false); }
+ | '&' variable { $$ = array($2, true); }
+ | list_expr { $$ = array($1, false); }
+ | array_short_syntax { $$ = array($1, false); }
+;
+
+parameter_list:
+ non_empty_parameter_list { $$ = $1; }
+ | /* empty */ { $$ = array(); }
+;
+
+non_empty_parameter_list:
+ parameter { init($1); }
+ | non_empty_parameter_list ',' parameter { push($1, $3); }
+;
+
+parameter:
+ optional_param_type optional_ref optional_ellipsis T_VARIABLE
+ { $$ = Node\Param[parseVar($4), null, $1, $2, $3]; $this->checkParam($$); }
+ | optional_param_type optional_ref optional_ellipsis T_VARIABLE '=' expr
+ { $$ = Node\Param[parseVar($4), $6, $1, $2, $3]; $this->checkParam($$); }
+;
+
+type_expr:
+ type { $$ = $1; }
+ | '?' type { $$ = Node\NullableType[$2]; }
+;
+
+type:
+ name { $$ = $this->handleBuiltinTypes($1); }
+ | T_ARRAY { $$ = 'array'; }
+ | T_CALLABLE { $$ = 'callable'; }
+;
+
+optional_param_type:
+ /* empty */ { $$ = null; }
+ | type_expr { $$ = $1; }
+;
+
+optional_return_type:
+ /* empty */ { $$ = null; }
+ | ':' type_expr { $$ = $2; }
+;
+
+argument_list:
+ '(' ')' { $$ = array(); }
+ | '(' non_empty_argument_list ')' { $$ = $2; }
+;
+
+non_empty_argument_list:
+ argument { init($1); }
+ | non_empty_argument_list ',' argument { push($1, $3); }
+;
+
+argument:
+ expr { $$ = Node\Arg[$1, false, false]; }
+ | '&' variable { $$ = Node\Arg[$2, true, false]; }
+ | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; }
+;
+
+global_var_list:
+ global_var_list ',' global_var { push($1, $3); }
+ | global_var { init($1); }
+;
+
+global_var:
+ simple_variable { $$ = Expr\Variable[$1]; }
+;
+
+static_var_list:
+ static_var_list ',' static_var { push($1, $3); }
+ | static_var { init($1); }
+;
+
+static_var:
+ T_VARIABLE { $$ = Stmt\StaticVar[parseVar($1), null]; }
+ | T_VARIABLE '=' expr { $$ = Stmt\StaticVar[parseVar($1), $3]; }
+;
+
+class_statement_list:
+ class_statement_list class_statement { push($1, $2); }
+ | /* empty */ { init(); }
+;
+
+class_statement:
+ variable_modifiers property_declaration_list ';'
+ { $$ = Stmt\Property[$1, $2]; $this->checkProperty($$, #1); }
+ | method_modifiers T_CONST class_const_list ';'
+ { $$ = Stmt\ClassConst[$3, $1]; $this->checkClassConst($$, #1); }
+ | method_modifiers T_FUNCTION optional_ref identifier '(' parameter_list ')' optional_return_type method_body
+ { $$ = Stmt\ClassMethod[$4, ['type' => $1, 'byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9]];
+ $this->checkClassMethod($$, #1); }
+ | T_USE name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; }
+;
+
+trait_adaptations:
+ ';' { $$ = array(); }
+ | '{' trait_adaptation_list '}' { $$ = $2; }
+;
+
+trait_adaptation_list:
+ /* empty */ { init(); }
+ | trait_adaptation_list trait_adaptation { push($1, $2); }
+;
+
+trait_adaptation:
+ trait_method_reference_fully_qualified T_INSTEADOF name_list ';'
+ { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; }
+ | trait_method_reference T_AS member_modifier identifier ';'
+ { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, $4]; }
+ | trait_method_reference T_AS member_modifier ';'
+ { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], $3, null]; }
+ | trait_method_reference T_AS T_STRING ';'
+ { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; }
+ | trait_method_reference T_AS reserved_non_modifiers ';'
+ { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; }
+;
+
+trait_method_reference_fully_qualified:
+ name T_PAAMAYIM_NEKUDOTAYIM identifier { $$ = array($1, $3); }
+;
+trait_method_reference:
+ trait_method_reference_fully_qualified { $$ = $1; }
+ | identifier { $$ = array(null, $1); }
+;
+
+method_body:
+ ';' /* abstract method */ { $$ = null; }
+ | '{' inner_statement_list '}' { $$ = $2; }
+;
+
+variable_modifiers:
+ non_empty_member_modifiers { $$ = $1; }
+ | T_VAR { $$ = 0; }
+;
+
+method_modifiers:
+ /* empty */ { $$ = 0; }
+ | non_empty_member_modifiers { $$ = $1; }
+;
+
+non_empty_member_modifiers:
+ member_modifier { $$ = $1; }
+ | non_empty_member_modifiers member_modifier { $this->checkModifier($1, $2, #2); $$ = $1 | $2; }
+;
+
+member_modifier:
+ T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; }
+ | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; }
+ | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; }
+ | T_STATIC { $$ = Stmt\Class_::MODIFIER_STATIC; }
+ | T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; }
+ | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; }
+;
+
+property_declaration_list:
+ property_declaration { init($1); }
+ | property_declaration_list ',' property_declaration { push($1, $3); }
+;
+
+property_declaration:
+ T_VARIABLE { $$ = Stmt\PropertyProperty[parseVar($1), null]; }
+ | T_VARIABLE '=' expr { $$ = Stmt\PropertyProperty[parseVar($1), $3]; }
+;
+
+expr_list:
+ expr_list ',' expr { push($1, $3); }
+ | expr { init($1); }
+;
+
+for_expr:
+ /* empty */ { $$ = array(); }
+ | expr_list { $$ = $1; }
+;
+
+expr:
+ variable { $$ = $1; }
+ | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; }
+ | array_short_syntax '=' expr { $$ = Expr\Assign[$1, $3]; }
+ | variable '=' expr { $$ = Expr\Assign[$1, $3]; }
+ | variable '=' '&' variable { $$ = Expr\AssignRef[$1, $4]; }
+ | new_expr { $$ = $1; }
+ | T_CLONE expr { $$ = Expr\Clone_[$2]; }
+ | variable T_PLUS_EQUAL expr { $$ = Expr\AssignOp\Plus [$1, $3]; }
+ | variable T_MINUS_EQUAL expr { $$ = Expr\AssignOp\Minus [$1, $3]; }
+ | variable T_MUL_EQUAL expr { $$ = Expr\AssignOp\Mul [$1, $3]; }
+ | variable T_DIV_EQUAL expr { $$ = Expr\AssignOp\Div [$1, $3]; }
+ | variable T_CONCAT_EQUAL expr { $$ = Expr\AssignOp\Concat [$1, $3]; }
+ | variable T_MOD_EQUAL expr { $$ = Expr\AssignOp\Mod [$1, $3]; }
+ | variable T_AND_EQUAL expr { $$ = Expr\AssignOp\BitwiseAnd[$1, $3]; }
+ | variable T_OR_EQUAL expr { $$ = Expr\AssignOp\BitwiseOr [$1, $3]; }
+ | variable T_XOR_EQUAL expr { $$ = Expr\AssignOp\BitwiseXor[$1, $3]; }
+ | variable T_SL_EQUAL expr { $$ = Expr\AssignOp\ShiftLeft [$1, $3]; }
+ | variable T_SR_EQUAL expr { $$ = Expr\AssignOp\ShiftRight[$1, $3]; }
+ | variable T_POW_EQUAL expr { $$ = Expr\AssignOp\Pow [$1, $3]; }
+ | variable T_INC { $$ = Expr\PostInc[$1]; }
+ | T_INC variable { $$ = Expr\PreInc [$2]; }
+ | variable T_DEC { $$ = Expr\PostDec[$1]; }
+ | T_DEC variable { $$ = Expr\PreDec [$2]; }
+ | expr T_BOOLEAN_OR expr { $$ = Expr\BinaryOp\BooleanOr [$1, $3]; }
+ | expr T_BOOLEAN_AND expr { $$ = Expr\BinaryOp\BooleanAnd[$1, $3]; }
+ | expr T_LOGICAL_OR expr { $$ = Expr\BinaryOp\LogicalOr [$1, $3]; }
+ | expr T_LOGICAL_AND expr { $$ = Expr\BinaryOp\LogicalAnd[$1, $3]; }
+ | expr T_LOGICAL_XOR expr { $$ = Expr\BinaryOp\LogicalXor[$1, $3]; }
+ | expr '|' expr { $$ = Expr\BinaryOp\BitwiseOr [$1, $3]; }
+ | expr '&' expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; }
+ | expr '^' expr { $$ = Expr\BinaryOp\BitwiseXor[$1, $3]; }
+ | expr '.' expr { $$ = Expr\BinaryOp\Concat [$1, $3]; }
+ | expr '+' expr { $$ = Expr\BinaryOp\Plus [$1, $3]; }
+ | expr '-' expr { $$ = Expr\BinaryOp\Minus [$1, $3]; }
+ | expr '*' expr { $$ = Expr\BinaryOp\Mul [$1, $3]; }
+ | expr '/' expr { $$ = Expr\BinaryOp\Div [$1, $3]; }
+ | expr '%' expr { $$ = Expr\BinaryOp\Mod [$1, $3]; }
+ | expr T_SL expr { $$ = Expr\BinaryOp\ShiftLeft [$1, $3]; }
+ | expr T_SR expr { $$ = Expr\BinaryOp\ShiftRight[$1, $3]; }
+ | expr T_POW expr { $$ = Expr\BinaryOp\Pow [$1, $3]; }
+ | '+' expr %prec T_INC { $$ = Expr\UnaryPlus [$2]; }
+ | '-' expr %prec T_INC { $$ = Expr\UnaryMinus[$2]; }
+ | '!' expr { $$ = Expr\BooleanNot[$2]; }
+ | '~' expr { $$ = Expr\BitwiseNot[$2]; }
+ | expr T_IS_IDENTICAL expr { $$ = Expr\BinaryOp\Identical [$1, $3]; }
+ | expr T_IS_NOT_IDENTICAL expr { $$ = Expr\BinaryOp\NotIdentical [$1, $3]; }
+ | expr T_IS_EQUAL expr { $$ = Expr\BinaryOp\Equal [$1, $3]; }
+ | expr T_IS_NOT_EQUAL expr { $$ = Expr\BinaryOp\NotEqual [$1, $3]; }
+ | expr T_SPACESHIP expr { $$ = Expr\BinaryOp\Spaceship [$1, $3]; }
+ | expr '<' expr { $$ = Expr\BinaryOp\Smaller [$1, $3]; }
+ | expr T_IS_SMALLER_OR_EQUAL expr { $$ = Expr\BinaryOp\SmallerOrEqual[$1, $3]; }
+ | expr '>' expr { $$ = Expr\BinaryOp\Greater [$1, $3]; }
+ | expr T_IS_GREATER_OR_EQUAL expr { $$ = Expr\BinaryOp\GreaterOrEqual[$1, $3]; }
+ | expr T_INSTANCEOF class_name_reference { $$ = Expr\Instanceof_[$1, $3]; }
+ | '(' expr ')' { $$ = $2; }
+ | expr '?' expr ':' expr { $$ = Expr\Ternary[$1, $3, $5]; }
+ | expr '?' ':' expr { $$ = Expr\Ternary[$1, null, $4]; }
+ | expr T_COALESCE expr { $$ = Expr\BinaryOp\Coalesce[$1, $3]; }
+ | T_ISSET '(' variables_list ')' { $$ = Expr\Isset_[$3]; }
+ | T_EMPTY '(' expr ')' { $$ = Expr\Empty_[$3]; }
+ | T_INCLUDE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE]; }
+ | T_INCLUDE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_INCLUDE_ONCE]; }
+ | T_EVAL '(' expr ')' { $$ = Expr\Eval_[$3]; }
+ | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; }
+ | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; }
+ | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; }
+ | T_DOUBLE_CAST expr { $$ = Expr\Cast\Double [$2]; }
+ | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; }
+ | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; }
+ | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; }
+ | T_BOOL_CAST expr { $$ = Expr\Cast\Bool_ [$2]; }
+ | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; }
+ | T_EXIT exit_expr
+ { $attrs = attributes();
+ $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
+ $$ = new Expr\Exit_($2, $attrs); }
+ | '@' expr { $$ = Expr\ErrorSuppress[$2]; }
+ | scalar { $$ = $1; }
+ | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; }
+ | T_PRINT expr { $$ = Expr\Print_[$2]; }
+ | T_YIELD { $$ = Expr\Yield_[null, null]; }
+ | T_YIELD expr { $$ = Expr\Yield_[$2, null]; }
+ | T_YIELD expr T_DOUBLE_ARROW expr { $$ = Expr\Yield_[$4, $2]; }
+ | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; }
+ | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type
+ '{' inner_statement_list '}'
+ { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $9]]; }
+ | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type
+ '{' inner_statement_list '}'
+ { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $10]]; }
+;
+
+anonymous_class:
+ T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}'
+ { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $3, 'implements' => $4, 'stmts' => $6]], $2);
+ $this->checkClass($$[0], -1); }
+
+new_expr:
+ T_NEW class_name_reference ctor_arguments { $$ = Expr\New_[$2, $3]; }
+ | T_NEW anonymous_class
+ { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; }
+;
+
+lexical_vars:
+ /* empty */ { $$ = array(); }
+ | T_USE '(' lexical_var_list ')' { $$ = $3; }
+;
+
+lexical_var_list:
+ lexical_var { init($1); }
+ | lexical_var_list ',' lexical_var { push($1, $3); }
+;
+
+lexical_var:
+ optional_ref T_VARIABLE { $$ = Expr\ClosureUse[parseVar($2), $1]; }
+;
+
+function_call:
+ name argument_list { $$ = Expr\FuncCall[$1, $2]; }
+ | callable_expr argument_list { $$ = Expr\FuncCall[$1, $2]; }
+ | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM member_name argument_list
+ { $$ = Expr\StaticCall[$1, $3, $4]; }
+;
+
+class_name:
+ T_STATIC { $$ = Name[$1]; }
+ | name { $$ = $1; }
+;
+
+name:
+ namespace_name_parts { $$ = Name[$1]; }
+ | T_NS_SEPARATOR namespace_name_parts { $$ = Name\FullyQualified[$2]; }
+ | T_NAMESPACE T_NS_SEPARATOR namespace_name_parts { $$ = Name\Relative[$3]; }
+;
+
+class_name_reference:
+ class_name { $$ = $1; }
+ | new_variable { $$ = $1; }
+ | error { $$ = Expr\Error[]; $this->errorState = 2; }
+;
+
+class_name_or_var:
+ class_name { $$ = $1; }
+ | dereferencable { $$ = $1; }
+;
+
+exit_expr:
+ /* empty */ { $$ = null; }
+ | '(' optional_expr ')' { $$ = $2; }
+;
+
+backticks_expr:
+ /* empty */ { $$ = array(); }
+ | T_ENCAPSED_AND_WHITESPACE
+ { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); }
+ | encaps_list { parseEncapsed($1, '`', true); $$ = $1; }
+;
+
+ctor_arguments:
+ /* empty */ { $$ = array(); }
+ | argument_list { $$ = $1; }
+;
+
+constant:
+ name { $$ = Expr\ConstFetch[$1]; }
+ | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier
+ { $$ = Expr\ClassConstFetch[$1, $3]; }
+ /* We interpret and isolated FOO:: as an unfinished class constant fetch. It could also be
+ an unfinished static property fetch or unfinished scoped call. */
+ | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM error
+ { $$ = Expr\ClassConstFetch[$1, Expr\Error[]]; $this->errorState = 2; }
+;
+
+array_short_syntax:
+ '[' array_pair_list ']'
+ { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_SHORT;
+ $$ = new Expr\Array_($2, $attrs); }
+;
+
+dereferencable_scalar:
+ T_ARRAY '(' array_pair_list ')'
+ { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG;
+ $$ = new Expr\Array_($3, $attrs); }
+ | array_short_syntax { $$ = $1; }
+ | T_CONSTANT_ENCAPSED_STRING
+ { $attrs = attributes(); $attrs['kind'] = strKind($1);
+ $$ = new Scalar\String_(Scalar\String_::parse($1), $attrs); }
+;
+
+scalar:
+ T_LNUMBER { $$ = $this->parseLNumber($1, attributes()); }
+ | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; }
+ | T_LINE { $$ = Scalar\MagicConst\Line[]; }
+ | T_FILE { $$ = Scalar\MagicConst\File[]; }
+ | T_DIR { $$ = Scalar\MagicConst\Dir[]; }
+ | T_CLASS_C { $$ = Scalar\MagicConst\Class_[]; }
+ | T_TRAIT_C { $$ = Scalar\MagicConst\Trait_[]; }
+ | T_METHOD_C { $$ = Scalar\MagicConst\Method[]; }
+ | T_FUNC_C { $$ = Scalar\MagicConst\Function_[]; }
+ | T_NS_C { $$ = Scalar\MagicConst\Namespace_[]; }
+ | dereferencable_scalar { $$ = $1; }
+ | constant { $$ = $1; }
+ | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC
+ { $attrs = attributes(); setDocStringAttrs($attrs, $1);
+ $$ = new Scalar\String_(Scalar\String_::parseDocString($1, $2), $attrs); }
+ | T_START_HEREDOC T_END_HEREDOC
+ { $attrs = attributes(); setDocStringAttrs($attrs, $1);
+ $$ = new Scalar\String_('', $attrs); }
+ | '"' encaps_list '"'
+ { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
+ parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); }
+ | T_START_HEREDOC encaps_list T_END_HEREDOC
+ { $attrs = attributes(); setDocStringAttrs($attrs, $1);
+ parseEncapsedDoc($2, true); $$ = new Scalar\Encapsed($2, $attrs); }
+;
+
+optional_expr:
+ /* empty */ { $$ = null; }
+ | expr { $$ = $1; }
+;
+
+dereferencable:
+ variable { $$ = $1; }
+ | '(' expr ')' { $$ = $2; }
+ | dereferencable_scalar { $$ = $1; }
+;
+
+callable_expr:
+ callable_variable { $$ = $1; }
+ | '(' expr ')' { $$ = $2; }
+ | dereferencable_scalar { $$ = $1; }
+;
+
+callable_variable:
+ simple_variable { $$ = Expr\Variable[$1]; }
+ | dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | constant '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | function_call { $$ = $1; }
+ | dereferencable T_OBJECT_OPERATOR property_name argument_list
+ { $$ = Expr\MethodCall[$1, $3, $4]; }
+;
+
+variable:
+ callable_variable { $$ = $1; }
+ | static_member { $$ = $1; }
+ | dereferencable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; }
+;
+
+simple_variable:
+ T_VARIABLE { $$ = parseVar($1); }
+ | '$' '{' expr '}' { $$ = $3; }
+ | '$' simple_variable { $$ = Expr\Variable[$2]; }
+ | '$' error { $$ = Expr\Error[]; $this->errorState = 2; }
+;
+
+static_member:
+ class_name_or_var T_PAAMAYIM_NEKUDOTAYIM simple_variable
+ { $$ = Expr\StaticPropertyFetch[$1, $3]; }
+;
+
+new_variable:
+ simple_variable { $$ = Expr\Variable[$1]; }
+ | new_variable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | new_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | new_variable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; }
+ | class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable { $$ = Expr\StaticPropertyFetch[$1, $3]; }
+ | new_variable T_PAAMAYIM_NEKUDOTAYIM simple_variable { $$ = Expr\StaticPropertyFetch[$1, $3]; }
+;
+
+member_name:
+ identifier { $$ = $1; }
+ | '{' expr '}' { $$ = $2; }
+ | simple_variable { $$ = Expr\Variable[$1]; }
+;
+
+property_name:
+ T_STRING { $$ = $1; }
+ | '{' expr '}' { $$ = $2; }
+ | simple_variable { $$ = Expr\Variable[$1]; }
+ | error { $$ = Expr\Error[]; $this->errorState = 2; }
+;
+
+list_expr:
+ T_LIST '(' list_expr_elements ')' { $$ = Expr\List_[$3]; }
+;
+
+list_expr_elements:
+ list_expr_elements ',' list_expr_element { push($1, $3); }
+ | list_expr_element { init($1); }
+;
+
+list_expr_element:
+ variable { $$ = Expr\ArrayItem[$1, null, false]; }
+ | list_expr { $$ = Expr\ArrayItem[$1, null, false]; }
+ | expr T_DOUBLE_ARROW variable { $$ = Expr\ArrayItem[$3, $1, false]; }
+ | expr T_DOUBLE_ARROW list_expr { $$ = Expr\ArrayItem[$3, $1, false]; }
+ | /* empty */ { $$ = null; }
+;
+
+array_pair_list:
+ inner_array_pair_list
+ { $$ = $1; $end = count($$)-1; if ($$[$end] === null) unset($$[$end]); }
+;
+
+inner_array_pair_list:
+ inner_array_pair_list ',' array_pair { push($1, $3); }
+ | array_pair { init($1); }
+;
+
+array_pair:
+ expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; }
+ | expr { $$ = Expr\ArrayItem[$1, null, false]; }
+ | expr T_DOUBLE_ARROW '&' variable { $$ = Expr\ArrayItem[$4, $1, true]; }
+ | '&' variable { $$ = Expr\ArrayItem[$2, null, true]; }
+ | /* empty */ { $$ = null; }
+;
+
+encaps_list:
+ encaps_list encaps_var { push($1, $2); }
+ | encaps_list encaps_string_part { push($1, $2); }
+ | encaps_var { init($1); }
+ | encaps_string_part encaps_var { init($1, $2); }
+;
+
+encaps_string_part:
+ T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; }
+;
+
+encaps_base_var:
+ T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; }
+;
+
+encaps_var:
+ encaps_base_var { $$ = $1; }
+ | encaps_base_var '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; }
+ | encaps_base_var T_OBJECT_OPERATOR T_STRING { $$ = Expr\PropertyFetch[$1, $3]; }
+ | T_DOLLAR_OPEN_CURLY_BRACES expr '}' { $$ = Expr\Variable[$2]; }
+ | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '}' { $$ = Expr\Variable[$2]; }
+ | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}'
+ { $$ = Expr\ArrayDimFetch[Expr\Variable[$2], $4]; }
+ | T_CURLY_OPEN variable '}' { $$ = $2; }
+;
+
+encaps_var_offset:
+ T_STRING { $$ = Scalar\String_[$1]; }
+ | T_NUM_STRING { $$ = Scalar\String_[$1]; }
+ | T_VARIABLE { $$ = Expr\Variable[parseVar($1)]; }
+;
+
+%%
diff --git a/vendor/nikic/php-parser/grammar/rebuildParsers.php b/vendor/nikic/php-parser/grammar/rebuildParsers.php
new file mode 100644
index 0000000..0959981
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/rebuildParsers.php
@@ -0,0 +1,263 @@
+<?php
+
+$grammarFileToName = [
+ __DIR__ . '/php5.y' => 'Php5',
+ __DIR__ . '/php7.y' => 'Php7',
+];
+
+$tokensFile = __DIR__ . '/tokens.y';
+$tokensTemplate = __DIR__ . '/tokens.template';
+$skeletonFile = __DIR__ . '/parser.template';
+$tmpGrammarFile = __DIR__ . '/tmp_parser.phpy';
+$tmpResultFile = __DIR__ . '/tmp_parser.php';
+$resultDir = __DIR__ . '/../lib/PhpParser/Parser';
+$tokensResultsFile = $resultDir . '/Tokens.php';
+
+// check for kmyacc.exe binary in this directory, otherwise fall back to global name
+$kmyacc = __DIR__ . '/kmyacc.exe';
+if (!file_exists($kmyacc)) {
+ $kmyacc = 'kmyacc';
+}
+
+$options = array_flip($argv);
+$optionDebug = isset($options['--debug']);
+$optionKeepTmpGrammar = isset($options['--keep-tmp-grammar']);
+
+///////////////////////////////
+/// Utility regex constants ///
+///////////////////////////////
+
+const LIB = '(?(DEFINE)
+ (?<singleQuotedString>\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\')
+ (?<doubleQuotedString>"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+")
+ (?<string>(?&singleQuotedString)|(?&doubleQuotedString))
+ (?<comment>/\*[^*]*+(?:\*(?!/)[^*]*+)*+\*/)
+ (?<code>\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+})
+)';
+
+const PARAMS = '\[(?<params>[^[\]]*+(?:\[(?&params)\][^[\]]*+)*+)\]';
+const ARGS = '\((?<args>[^()]*+(?:\((?&args)\)[^()]*+)*+)\)';
+
+///////////////////
+/// Main script ///
+///////////////////
+
+$tokens = file_get_contents($tokensFile);
+
+foreach ($grammarFileToName as $grammarFile => $name) {
+ echo "Building temporary $name grammar file.\n";
+
+ $grammarCode = file_get_contents($grammarFile);
+ $grammarCode = str_replace('%tokens', $tokens, $grammarCode);
+
+ $grammarCode = resolveNodes($grammarCode);
+ $grammarCode = resolveMacros($grammarCode);
+ $grammarCode = resolveStackAccess($grammarCode);
+
+ file_put_contents($tmpGrammarFile, $grammarCode);
+
+ $additionalArgs = $optionDebug ? '-t -v' : '';
+
+ echo "Building $name parser.\n";
+ $output = trim(shell_exec("$kmyacc $additionalArgs -l -m $skeletonFile -p $name $tmpGrammarFile 2>&1"));
+ echo "Output: \"$output\"\n";
+
+ $resultCode = file_get_contents($tmpResultFile);
+ $resultCode = removeTrailingWhitespace($resultCode);
+
+ ensureDirExists($resultDir);
+ file_put_contents("$resultDir/$name.php", $resultCode);
+ unlink($tmpResultFile);
+
+ echo "Building token definition.\n";
+ $output = trim(shell_exec("$kmyacc -l -m $tokensTemplate $tmpGrammarFile 2>&1"));
+ assert($output === '');
+ rename($tmpResultFile, $tokensResultsFile);
+
+ if (!$optionKeepTmpGrammar) {
+ unlink($tmpGrammarFile);
+ }
+}
+
+///////////////////////////////
+/// Preprocessing functions ///
+///////////////////////////////
+
+function resolveNodes($code) {
+ return preg_replace_callback(
+ '~\b(?<name>[A-Z][a-zA-Z_\\\\]++)\s*' . PARAMS . '~',
+ function($matches) {
+ // recurse
+ $matches['params'] = resolveNodes($matches['params']);
+
+ $params = magicSplit(
+ '(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,',
+ $matches['params']
+ );
+
+ $paramCode = '';
+ foreach ($params as $param) {
+ $paramCode .= $param . ', ';
+ }
+
+ return 'new ' . $matches['name'] . '(' . $paramCode . 'attributes())';
+ },
+ $code
+ );
+}
+
+function resolveMacros($code) {
+ return preg_replace_callback(
+ '~\b(?<!::|->)(?!array\()(?<name>[a-z][A-Za-z]++)' . ARGS . '~',
+ function($matches) {
+ // recurse
+ $matches['args'] = resolveMacros($matches['args']);
+
+ $name = $matches['name'];
+ $args = magicSplit(
+ '(?:' . PARAMS . '|' . ARGS . ')(*SKIP)(*FAIL)|,',
+ $matches['args']
+ );
+
+ if ('attributes' == $name) {
+ assertArgs(0, $args, $name);
+ return '$this->startAttributeStack[#1] + $this->endAttributes';
+ }
+
+ if ('stackAttributes' == $name) {
+ assertArgs(1, $args, $name);
+ return '$this->startAttributeStack[' . $args[0] . ']'
+ . ' + $this->endAttributeStack[' . $args[0] . ']';
+ }
+
+ if ('init' == $name) {
+ return '$$ = array(' . implode(', ', $args) . ')';
+ }
+
+ if ('push' == $name) {
+ assertArgs(2, $args, $name);
+
+ return $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0];
+ }
+
+ if ('pushNormalizing' == $name) {
+ assertArgs(2, $args, $name);
+
+ return 'if (is_array(' . $args[1] . ')) { $$ = array_merge(' . $args[0] . ', ' . $args[1] . '); }'
+ . ' else { ' . $args[0] . '[] = ' . $args[1] . '; $$ = ' . $args[0] . '; }';
+ }
+
+ if ('toArray' == $name) {
+ assertArgs(1, $args, $name);
+
+ return 'is_array(' . $args[0] . ') ? ' . $args[0] . ' : array(' . $args[0] . ')';
+ }
+
+ if ('parseVar' == $name) {
+ assertArgs(1, $args, $name);
+
+ return 'substr(' . $args[0] . ', 1)';
+ }
+
+ if ('parseEncapsed' == $name) {
+ assertArgs(3, $args, $name);
+
+ return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {'
+ . ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, ' . $args[1] . ', ' . $args[2] . '); } }';
+ }
+
+ if ('parseEncapsedDoc' == $name) {
+ assertArgs(2, $args, $name);
+
+ return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {'
+ . ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, null, ' . $args[1] . '); } }'
+ . ' $s->value = preg_replace(\'~(\r\n|\n|\r)\z~\', \'\', $s->value);'
+ . ' if (\'\' === $s->value) array_pop(' . $args[0] . ');';
+ }
+
+ if ('makeNop' == $name) {
+ assertArgs(2, $args, $name);
+
+ return '$startAttributes = ' . $args[1] . ';'
+ . ' if (isset($startAttributes[\'comments\']))'
+ . ' { ' . $args[0] . ' = new Stmt\Nop([\'comments\' => $startAttributes[\'comments\']]); }'
+ . ' else { ' . $args[0] . ' = null; }';
+ }
+
+ if ('strKind' == $name) {
+ assertArgs(1, $args, $name);
+
+ return '(' . $args[0] . '[0] === "\'" || (' . $args[0] . '[1] === "\'" && '
+ . '(' . $args[0] . '[0] === \'b\' || ' . $args[0] . '[0] === \'B\')) '
+ . '? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED)';
+ }
+
+ if ('setDocStringAttrs' == $name) {
+ assertArgs(2, $args, $name);
+
+ return $args[0] . '[\'kind\'] = strpos(' . $args[1] . ', "\'") === false '
+ . '? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; '
+ . 'preg_match(\'/\A[bB]?<<<[ \t]*[\\\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\\\'"]?(?:\r\n|\n|\r)\z/\', ' . $args[1] . ', $matches); '
+ . $args[0] . '[\'docLabel\'] = $matches[1];';
+ }
+
+ if ('prependLeadingComments' == $name) {
+ assertArgs(1, $args, $name);
+
+ return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; '
+ . 'if (!empty($attrs[\'comments\']) && isset($stmts[0])) {'
+ . '$stmts[0]->setAttribute(\'comments\', '
+ . 'array_merge($attrs[\'comments\'], $stmts[0]->getAttribute(\'comments\', []))); }';
+ }
+
+ return $matches[0];
+ },
+ $code
+ );
+}
+
+function assertArgs($num, $args, $name) {
+ if ($num != count($args)) {
+ die('Wrong argument count for ' . $name . '().');
+ }
+}
+
+function resolveStackAccess($code) {
+ $code = preg_replace('/\$\d+/', '$this->semStack[$0]', $code);
+ $code = preg_replace('/#(\d+)/', '$$1', $code);
+ return $code;
+}
+
+function removeTrailingWhitespace($code) {
+ $lines = explode("\n", $code);
+ $lines = array_map('rtrim', $lines);
+ return implode("\n", $lines);
+}
+
+function ensureDirExists($dir) {
+ if (!is_dir($dir)) {
+ mkdir($dir, 0777, true);
+ }
+}
+
+//////////////////////////////
+/// Regex helper functions ///
+//////////////////////////////
+
+function regex($regex) {
+ return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~';
+}
+
+function magicSplit($regex, $string) {
+ $pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string);
+
+ foreach ($pieces as &$piece) {
+ $piece = trim($piece);
+ }
+
+ if ($pieces === ['']) {
+ return [];
+ }
+
+ return $pieces;
+}
diff --git a/vendor/nikic/php-parser/grammar/tokens.template b/vendor/nikic/php-parser/grammar/tokens.template
new file mode 100644
index 0000000..ba4e490
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/tokens.template
@@ -0,0 +1,17 @@
+<?php
+$meta #
+#semval($) $this->semValue
+#semval($,%t) $this->semValue
+#semval(%n) $this->stackPos-(%l-%n)
+#semval(%n,%t) $this->stackPos-(%l-%n)
+
+namespace PhpParser\Parser;
+#include;
+
+/* GENERATED file based on grammar/tokens.y */
+final class Tokens
+{
+#tokenval
+ const %s = %n;
+#endtokenval
+}
diff --git a/vendor/nikic/php-parser/grammar/tokens.y b/vendor/nikic/php-parser/grammar/tokens.y
new file mode 100644
index 0000000..2b54f80
--- /dev/null
+++ b/vendor/nikic/php-parser/grammar/tokens.y
@@ -0,0 +1,113 @@
+/* We currently rely on the token ID mapping to be the same between PHP 5 and PHP 7 - so the same lexer can be used for
+ * both. This is enforced by sharing this token file. */
+
+%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
+%left ','
+%left T_LOGICAL_OR
+%left T_LOGICAL_XOR
+%left T_LOGICAL_AND
+%right T_PRINT
+%right T_YIELD
+%right T_DOUBLE_ARROW
+%right T_YIELD_FROM
+%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL T_POW_EQUAL
+%left '?' ':'
+%right T_COALESCE
+%left T_BOOLEAN_OR
+%left T_BOOLEAN_AND
+%left '|'
+%left '^'
+%left '&'
+%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL T_SPACESHIP
+%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
+%left T_SL T_SR
+%left '+' '-' '.'
+%left '*' '/' '%'
+%right '!'
+%nonassoc T_INSTANCEOF
+%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
+%right T_POW
+%right '['
+%nonassoc T_NEW T_CLONE
+%token T_EXIT
+%token T_IF
+%left T_ELSEIF
+%left T_ELSE
+%left T_ENDIF
+%token T_LNUMBER
+%token T_DNUMBER
+%token T_STRING
+%token T_STRING_VARNAME
+%token T_VARIABLE
+%token T_NUM_STRING
+%token T_INLINE_HTML
+%token T_CHARACTER
+%token T_BAD_CHARACTER
+%token T_ENCAPSED_AND_WHITESPACE
+%token T_CONSTANT_ENCAPSED_STRING
+%token T_ECHO
+%token T_DO
+%token T_WHILE
+%token T_ENDWHILE
+%token T_FOR
+%token T_ENDFOR
+%token T_FOREACH
+%token T_ENDFOREACH
+%token T_DECLARE
+%token T_ENDDECLARE
+%token T_AS
+%token T_SWITCH
+%token T_ENDSWITCH
+%token T_CASE
+%token T_DEFAULT
+%token T_BREAK
+%token T_CONTINUE
+%token T_GOTO
+%token T_FUNCTION
+%token T_CONST
+%token T_RETURN
+%token T_TRY
+%token T_CATCH
+%token T_FINALLY
+%token T_THROW
+%token T_USE
+%token T_INSTEADOF
+%token T_GLOBAL
+%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC
+%token T_VAR
+%token T_UNSET
+%token T_ISSET
+%token T_EMPTY
+%token T_HALT_COMPILER
+%token T_CLASS
+%token T_TRAIT
+%token T_INTERFACE
+%token T_EXTENDS
+%token T_IMPLEMENTS
+%token T_OBJECT_OPERATOR
+%token T_DOUBLE_ARROW
+%token T_LIST
+%token T_ARRAY
+%token T_CALLABLE
+%token T_CLASS_C
+%token T_TRAIT_C
+%token T_METHOD_C
+%token T_FUNC_C
+%token T_LINE
+%token T_FILE
+%token T_COMMENT
+%token T_DOC_COMMENT
+%token T_OPEN_TAG
+%token T_OPEN_TAG_WITH_ECHO
+%token T_CLOSE_TAG
+%token T_WHITESPACE
+%token T_START_HEREDOC
+%token T_END_HEREDOC
+%token T_DOLLAR_OPEN_CURLY_BRACES
+%token T_CURLY_OPEN
+%token T_PAAMAYIM_NEKUDOTAYIM
+%token T_NAMESPACE
+%token T_NS_C
+%token T_DIR
+%token T_NS_SEPARATOR
+%token T_ELLIPSIS
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Autoloader.php b/vendor/nikic/php-parser/lib/PhpParser/Autoloader.php
new file mode 100644
index 0000000..809a06e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Autoloader.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace PhpParser;
+
+/**
+ * @codeCoverageIgnore
+ */
+class Autoloader
+{
+ /** @var bool Whether the autoloader has been registered. */
+ private static $registered = false;
+
+ /**
+ * Registers PhpParser\Autoloader as an SPL autoloader.
+ *
+ * @param bool $prepend Whether to prepend the autoloader instead of appending
+ */
+ static public function register($prepend = false) {
+ if (self::$registered === true) {
+ return;
+ }
+
+ spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
+ self::$registered = true;
+ }
+
+ /**
+ * Handles autoloading of classes.
+ *
+ * @param string $class A class name.
+ */
+ static public function autoload($class) {
+ if (0 === strpos($class, 'PhpParser\\')) {
+ $fileName = __DIR__ . strtr(substr($class, 9), '\\', '/') . '.php';
+ if (file_exists($fileName)) {
+ require $fileName;
+ }
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder.php b/vendor/nikic/php-parser/lib/PhpParser/Builder.php
new file mode 100644
index 0000000..95655e8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace PhpParser;
+
+interface Builder
+{
+ /**
+ * Returns the built node.
+ *
+ * @return Node The built node
+ */
+ public function getNode();
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php
new file mode 100644
index 0000000..f91f6a8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php
@@ -0,0 +1,121 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+use PhpParser\Node\Name;
+use PhpParser\Node\Stmt;
+
+class Class_ extends Declaration
+{
+ protected $name;
+
+ protected $extends = null;
+ protected $implements = array();
+ protected $flags = 0;
+
+ protected $uses = array();
+ protected $constants = array();
+ protected $properties = array();
+ protected $methods = array();
+
+ /**
+ * Creates a class builder.
+ *
+ * @param string $name Name of the class
+ */
+ public function __construct($name) {
+ $this->name = $name;
+ }
+
+ /**
+ * Extends a class.
+ *
+ * @param Name|string $class Name of class to extend
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function extend($class) {
+ $this->extends = $this->normalizeName($class);
+
+ return $this;
+ }
+
+ /**
+ * Implements one or more interfaces.
+ *
+ * @param Name|string ...$interfaces Names of interfaces to implement
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function implement() {
+ foreach (func_get_args() as $interface) {
+ $this->implements[] = $this->normalizeName($interface);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Makes the class abstract.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeAbstract() {
+ $this->setModifier(Stmt\Class_::MODIFIER_ABSTRACT);
+
+ return $this;
+ }
+
+ /**
+ * Makes the class final.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeFinal() {
+ $this->setModifier(Stmt\Class_::MODIFIER_FINAL);
+
+ return $this;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Stmt|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ $stmt = $this->normalizeNode($stmt);
+
+ $targets = array(
+ 'Stmt_TraitUse' => &$this->uses,
+ 'Stmt_ClassConst' => &$this->constants,
+ 'Stmt_Property' => &$this->properties,
+ 'Stmt_ClassMethod' => &$this->methods,
+ );
+
+ $type = $stmt->getType();
+ if (!isset($targets[$type])) {
+ throw new \LogicException(sprintf('Unexpected node of type "%s"', $type));
+ }
+
+ $targets[$type][] = $stmt;
+
+ return $this;
+ }
+
+ /**
+ * Returns the built class node.
+ *
+ * @return Stmt\Class_ The built class node
+ */
+ public function getNode() {
+ return new Stmt\Class_($this->name, array(
+ 'flags' => $this->flags,
+ 'extends' => $this->extends,
+ 'implements' => $this->implements,
+ 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods),
+ ), $this->attributes);
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php
new file mode 100644
index 0000000..30a1937
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+
+abstract class Declaration extends PhpParser\BuilderAbstract
+{
+ protected $attributes = array();
+
+ abstract public function addStmt($stmt);
+
+ /**
+ * Adds multiple statements.
+ *
+ * @param array $stmts The statements to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmts(array $stmts) {
+ foreach ($stmts as $stmt) {
+ $this->addStmt($stmt);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Sets doc comment for the declaration.
+ *
+ * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDocComment($docComment) {
+ $this->attributes['comments'] = array(
+ $this->normalizeDocComment($docComment)
+ );
+
+ return $this;
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php
new file mode 100644
index 0000000..28a2ea6
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php
@@ -0,0 +1,75 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+use PhpParser\Node;
+
+abstract class FunctionLike extends Declaration
+{
+ protected $returnByRef = false;
+ protected $params = array();
+
+ /** @var string|Node\Name|Node\NullableType|null */
+ protected $returnType = null;
+
+ /**
+ * Make the function return by reference.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeReturnByRef() {
+ $this->returnByRef = true;
+
+ return $this;
+ }
+
+ /**
+ * Adds a parameter.
+ *
+ * @param Node\Param|Param $param The parameter to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addParam($param) {
+ $param = $this->normalizeNode($param);
+
+ if (!$param instanceof Node\Param) {
+ throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType()));
+ }
+
+ $this->params[] = $param;
+
+ return $this;
+ }
+
+ /**
+ * Adds multiple parameters.
+ *
+ * @param array $params The parameters to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addParams(array $params) {
+ foreach ($params as $param) {
+ $this->addParam($param);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Sets the return type for PHP 7.
+ *
+ * @param string|Node\Name|Node\NullableType $type One of array, callable, string, int, float, bool, iterable,
+ * or a class/interface name.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setReturnType($type)
+ {
+ $this->returnType = $this->normalizeType($type);
+
+ return $this;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php
new file mode 100644
index 0000000..228bdfa
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php
@@ -0,0 +1,49 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+use PhpParser\Node;
+use PhpParser\Node\Stmt;
+
+class Function_ extends FunctionLike
+{
+ protected $name;
+ protected $stmts = array();
+
+ /**
+ * Creates a function builder.
+ *
+ * @param string $name Name of the function
+ */
+ public function __construct($name) {
+ $this->name = $name;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Node|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ $this->stmts[] = $this->normalizeNode($stmt);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built function node.
+ *
+ * @return Stmt\Function_ The built function node
+ */
+ public function getNode() {
+ return new Stmt\Function_($this->name, array(
+ 'byRef' => $this->returnByRef,
+ 'params' => $this->params,
+ 'returnType' => $this->returnType,
+ 'stmts' => $this->stmts,
+ ), $this->attributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php
new file mode 100644
index 0000000..8ebb292
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php
@@ -0,0 +1,80 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+use PhpParser\Node\Name;
+use PhpParser\Node\Stmt;
+
+class Interface_ extends Declaration
+{
+ protected $name;
+ protected $extends = array();
+ protected $constants = array();
+ protected $methods = array();
+
+ /**
+ * Creates an interface builder.
+ *
+ * @param string $name Name of the interface
+ */
+ public function __construct($name) {
+ $this->name = $name;
+ }
+
+ /**
+ * Extends one or more interfaces.
+ *
+ * @param Name|string ...$interfaces Names of interfaces to extend
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function extend() {
+ foreach (func_get_args() as $interface) {
+ $this->extends[] = $this->normalizeName($interface);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Stmt|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ $stmt = $this->normalizeNode($stmt);
+
+ $type = $stmt->getType();
+ switch ($type) {
+ case 'Stmt_ClassConst':
+ $this->constants[] = $stmt;
+ break;
+
+ case 'Stmt_ClassMethod':
+ // we erase all statements in the body of an interface method
+ $stmt->stmts = null;
+ $this->methods[] = $stmt;
+ break;
+
+ default:
+ throw new \LogicException(sprintf('Unexpected node of type "%s"', $type));
+ }
+
+ return $this;
+ }
+
+ /**
+ * Returns the built interface node.
+ *
+ * @return Stmt\Interface_ The built interface node
+ */
+ public function getNode() {
+ return new Stmt\Interface_($this->name, array(
+ 'extends' => $this->extends,
+ 'stmts' => array_merge($this->constants, $this->methods),
+ ), $this->attributes);
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php
new file mode 100644
index 0000000..1ed75ee
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php
@@ -0,0 +1,128 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+use PhpParser\Node;
+use PhpParser\Node\Stmt;
+
+class Method extends FunctionLike
+{
+ protected $name;
+ protected $flags = 0;
+
+ /** @var array|null */
+ protected $stmts = array();
+
+ /**
+ * Creates a method builder.
+ *
+ * @param string $name Name of the method
+ */
+ public function __construct($name) {
+ $this->name = $name;
+ }
+
+ /**
+ * Makes the method public.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePublic() {
+ $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC);
+
+ return $this;
+ }
+
+ /**
+ * Makes the method protected.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeProtected() {
+ $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED);
+
+ return $this;
+ }
+
+ /**
+ * Makes the method private.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePrivate() {
+ $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE);
+
+ return $this;
+ }
+
+ /**
+ * Makes the method static.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeStatic() {
+ $this->setModifier(Stmt\Class_::MODIFIER_STATIC);
+
+ return $this;
+ }
+
+ /**
+ * Makes the method abstract.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeAbstract() {
+ if (!empty($this->stmts)) {
+ throw new \LogicException('Cannot make method with statements abstract');
+ }
+
+ $this->setModifier(Stmt\Class_::MODIFIER_ABSTRACT);
+ $this->stmts = null; // abstract methods don't have statements
+
+ return $this;
+ }
+
+ /**
+ * Makes the method final.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeFinal() {
+ $this->setModifier(Stmt\Class_::MODIFIER_FINAL);
+
+ return $this;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Node|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ if (null === $this->stmts) {
+ throw new \LogicException('Cannot add statements to an abstract method');
+ }
+
+ $this->stmts[] = $this->normalizeNode($stmt);
+
+ return $this;
+ }
+
+ /**
+ * Returns the built method node.
+ *
+ * @return Stmt\ClassMethod The built method node
+ */
+ public function getNode() {
+ return new Stmt\ClassMethod($this->name, array(
+ 'flags' => $this->flags,
+ 'byRef' => $this->returnByRef,
+ 'params' => $this->params,
+ 'returnType' => $this->returnType,
+ 'stmts' => $this->stmts,
+ ), $this->attributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php
new file mode 100644
index 0000000..432fcc7
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php
@@ -0,0 +1,59 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+use PhpParser\Node;
+use PhpParser\Node\Stmt;
+
+class Namespace_ extends PhpParser\BuilderAbstract
+{
+ private $name;
+ private $stmts = array();
+
+ /**
+ * Creates a namespace builder.
+ *
+ * @param Node\Name|string|null $name Name of the namespace
+ */
+ public function __construct($name) {
+ $this->name = null !== $name ? $this->normalizeName($name) : null;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Node|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ $this->stmts[] = $this->normalizeNode($stmt);
+
+ return $this;
+ }
+
+ /**
+ * Adds multiple statements.
+ *
+ * @param array $stmts The statements to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmts(array $stmts) {
+ foreach ($stmts as $stmt) {
+ $this->addStmt($stmt);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Returns the built node.
+ *
+ * @return Node The built node
+ */
+ public function getNode() {
+ return new Stmt\Namespace_($this->name, $this->stmts);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php
new file mode 100644
index 0000000..3e6e0f7
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php
@@ -0,0 +1,78 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+use PhpParser\Node;
+
+class Param extends PhpParser\BuilderAbstract
+{
+ protected $name;
+
+ protected $default = null;
+
+ /** @var string|Node\Name|Node\NullableType|null */
+ protected $type = null;
+
+ protected $byRef = false;
+
+ /**
+ * Creates a parameter builder.
+ *
+ * @param string $name Name of the parameter
+ */
+ public function __construct($name) {
+ $this->name = $name;
+ }
+
+ /**
+ * Sets default value for the parameter.
+ *
+ * @param mixed $value Default value to use
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDefault($value) {
+ $this->default = $this->normalizeValue($value);
+
+ return $this;
+ }
+
+ /**
+ * Sets type hint for the parameter.
+ *
+ * @param string|Node\Name|Node\NullableType $type Type hint to use
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setTypeHint($type) {
+ $this->type = $this->normalizeType($type);
+ if ($this->type === 'void') {
+ throw new \LogicException('Parameter type cannot be void');
+ }
+
+ return $this;
+ }
+
+ /**
+ * Make the parameter accept the value by reference.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeByRef() {
+ $this->byRef = true;
+
+ return $this;
+ }
+
+ /**
+ * Returns the built parameter node.
+ *
+ * @return Node\Param The built parameter node
+ */
+ public function getNode() {
+ return new Node\Param(
+ $this->name, $this->default, $this->type, $this->byRef
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php
new file mode 100644
index 0000000..053c851
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php
@@ -0,0 +1,111 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+use PhpParser\Node\Stmt;
+
+class Property extends PhpParser\BuilderAbstract
+{
+ protected $name;
+
+ protected $flags = 0;
+ protected $default = null;
+ protected $attributes = array();
+
+ /**
+ * Creates a property builder.
+ *
+ * @param string $name Name of the property
+ */
+ public function __construct($name) {
+ $this->name = $name;
+ }
+
+ /**
+ * Makes the property public.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePublic() {
+ $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC);
+
+ return $this;
+ }
+
+ /**
+ * Makes the property protected.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeProtected() {
+ $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED);
+
+ return $this;
+ }
+
+ /**
+ * Makes the property private.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makePrivate() {
+ $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE);
+
+ return $this;
+ }
+
+ /**
+ * Makes the property static.
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function makeStatic() {
+ $this->setModifier(Stmt\Class_::MODIFIER_STATIC);
+
+ return $this;
+ }
+
+ /**
+ * Sets default value for the property.
+ *
+ * @param mixed $value Default value to use
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDefault($value) {
+ $this->default = $this->normalizeValue($value);
+
+ return $this;
+ }
+
+ /**
+ * Sets doc comment for the property.
+ *
+ * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function setDocComment($docComment) {
+ $this->attributes = array(
+ 'comments' => array($this->normalizeDocComment($docComment))
+ );
+
+ return $this;
+ }
+
+ /**
+ * Returns the built class node.
+ *
+ * @return Stmt\Property The built property node
+ */
+ public function getNode() {
+ return new Stmt\Property(
+ $this->flags !== 0 ? $this->flags : Stmt\Class_::MODIFIER_PUBLIC,
+ array(
+ new Stmt\PropertyProperty($this->name, $this->default)
+ ),
+ $this->attributes
+ );
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php
new file mode 100644
index 0000000..153437d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php
@@ -0,0 +1,56 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser;
+use PhpParser\Node\Stmt;
+
+class Trait_ extends Declaration
+{
+ protected $name;
+ protected $properties = array();
+ protected $methods = array();
+
+ /**
+ * Creates an interface builder.
+ *
+ * @param string $name Name of the interface
+ */
+ public function __construct($name) {
+ $this->name = $name;
+ }
+
+ /**
+ * Adds a statement.
+ *
+ * @param Stmt|PhpParser\Builder $stmt The statement to add
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ public function addStmt($stmt) {
+ $stmt = $this->normalizeNode($stmt);
+
+ if ($stmt instanceof Stmt\Property) {
+ $this->properties[] = $stmt;
+ } else if ($stmt instanceof Stmt\ClassMethod) {
+ $this->methods[] = $stmt;
+ } else {
+ throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
+ }
+
+ return $this;
+ }
+
+ /**
+ * Returns the built trait node.
+ *
+ * @return Stmt\Trait_ The built interface node
+ */
+ public function getNode() {
+ return new Stmt\Trait_(
+ $this->name, array(
+ 'stmts' => array_merge($this->properties, $this->methods)
+ ), $this->attributes
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php
new file mode 100644
index 0000000..f6d3a85
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php
@@ -0,0 +1,58 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser\BuilderAbstract;
+use PhpParser\Node;
+use PhpParser\Node\Stmt;
+
+/**
+ * @method $this as(string $alias) Sets alias for used name.
+ */
+class Use_ extends BuilderAbstract {
+ protected $name;
+ protected $type;
+ protected $alias = null;
+
+ /**
+ * Creates a name use (alias) builder.
+ *
+ * @param Node\Name|string $name Name of the entity (namespace, class, function, constant) to alias
+ * @param int $type One of the Stmt\Use_::TYPE_* constants
+ */
+ public function __construct($name, $type) {
+ $this->name = $this->normalizeName($name);
+ $this->type = $type;
+ }
+
+ /**
+ * Sets alias for used name.
+ *
+ * @param string $alias Alias to use (last component of full name by default)
+ *
+ * @return $this The builder instance (for fluid interface)
+ */
+ protected function as_($alias) {
+ $this->alias = $alias;
+ return $this;
+ }
+ public function __call($name, $args) {
+ if (method_exists($this, $name . '_')) {
+ return call_user_func_array(array($this, $name . '_'), $args);
+ }
+
+ throw new \LogicException(sprintf('Method "%s" does not exist', $name));
+ }
+
+ /**
+ * Returns the built node.
+ *
+ * @return Node The built node
+ */
+ public function getNode() {
+ $alias = null !== $this->alias ? $this->alias : $this->name->getLast();
+ return new Stmt\Use_(array(
+ new Stmt\UseUse($this->name, $alias)
+ ), $this->type);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderAbstract.php
new file mode 100644
index 0000000..1e0dc48
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderAbstract.php
@@ -0,0 +1,175 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Comment;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+use PhpParser\Node\NullableType;
+use PhpParser\Node\Scalar;
+use PhpParser\Node\Stmt;
+
+abstract class BuilderAbstract implements Builder {
+ /**
+ * Normalizes a node: Converts builder objects to nodes.
+ *
+ * @param Node|Builder $node The node to normalize
+ *
+ * @return Node The normalized node
+ */
+ protected function normalizeNode($node) {
+ if ($node instanceof Builder) {
+ return $node->getNode();
+ } elseif ($node instanceof Node) {
+ return $node;
+ }
+
+ throw new \LogicException('Expected node or builder object');
+ }
+
+ /**
+ * Normalizes a name: Converts plain string names to PhpParser\Node\Name.
+ *
+ * @param Name|string $name The name to normalize
+ *
+ * @return Name The normalized name
+ */
+ protected function normalizeName($name) {
+ if ($name instanceof Name) {
+ return $name;
+ } elseif (is_string($name)) {
+ if (!$name) {
+ throw new \LogicException('Name cannot be empty');
+ }
+
+ if ($name[0] == '\\') {
+ return new Name\FullyQualified(substr($name, 1));
+ } elseif (0 === strpos($name, 'namespace\\')) {
+ return new Name\Relative(substr($name, strlen('namespace\\')));
+ } else {
+ return new Name($name);
+ }
+ }
+
+ throw new \LogicException('Name must be a string or an instance of PhpParser\Node\Name');
+ }
+
+ /**
+ * Normalizes a type: Converts plain-text type names into proper AST representation.
+ *
+ * In particular, builtin types are left as strings, custom types become Names and nullables
+ * are wrapped in NullableType nodes.
+ *
+ * @param Name|string|NullableType $type The type to normalize
+ *
+ * @return Name|string|NullableType The normalized type
+ */
+ protected function normalizeType($type) {
+ if (!is_string($type)) {
+ if (!$type instanceof Name && !$type instanceof NullableType) {
+ throw new \LogicException(
+ 'Type must be a string, or an instance of Name or NullableType');
+ }
+ return $type;
+ }
+
+ $nullable = false;
+ if (strlen($type) > 0 && $type[0] === '?') {
+ $nullable = true;
+ $type = substr($type, 1);
+ }
+
+ $builtinTypes = array(
+ 'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void'
+ );
+
+ $lowerType = strtolower($type);
+ if (in_array($lowerType, $builtinTypes)) {
+ $type = $lowerType;
+ } else {
+ $type = $this->normalizeName($type);
+ }
+
+ if ($nullable && $type === 'void') {
+ throw new \LogicException('void type cannot be nullable');
+ }
+
+ return $nullable ? new Node\NullableType($type) : $type;
+ }
+
+ /**
+ * Normalizes a value: Converts nulls, booleans, integers,
+ * floats, strings and arrays into their respective nodes
+ *
+ * @param mixed $value The value to normalize
+ *
+ * @return Expr The normalized value
+ */
+ protected function normalizeValue($value) {
+ if ($value instanceof Node) {
+ return $value;
+ } elseif (is_null($value)) {
+ return new Expr\ConstFetch(
+ new Name('null')
+ );
+ } elseif (is_bool($value)) {
+ return new Expr\ConstFetch(
+ new Name($value ? 'true' : 'false')
+ );
+ } elseif (is_int($value)) {
+ return new Scalar\LNumber($value);
+ } elseif (is_float($value)) {
+ return new Scalar\DNumber($value);
+ } elseif (is_string($value)) {
+ return new Scalar\String_($value);
+ } elseif (is_array($value)) {
+ $items = array();
+ $lastKey = -1;
+ foreach ($value as $itemKey => $itemValue) {
+ // for consecutive, numeric keys don't generate keys
+ if (null !== $lastKey && ++$lastKey === $itemKey) {
+ $items[] = new Expr\ArrayItem(
+ $this->normalizeValue($itemValue)
+ );
+ } else {
+ $lastKey = null;
+ $items[] = new Expr\ArrayItem(
+ $this->normalizeValue($itemValue),
+ $this->normalizeValue($itemKey)
+ );
+ }
+ }
+
+ return new Expr\Array_($items);
+ } else {
+ throw new \LogicException('Invalid value');
+ }
+ }
+
+ /**
+ * Normalizes a doc comment: Converts plain strings to PhpParser\Comment\Doc.
+ *
+ * @param Comment\Doc|string $docComment The doc comment to normalize
+ *
+ * @return Comment\Doc The normalized doc comment
+ */
+ protected function normalizeDocComment($docComment) {
+ if ($docComment instanceof Comment\Doc) {
+ return $docComment;
+ } else if (is_string($docComment)) {
+ return new Comment\Doc($docComment);
+ } else {
+ throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc');
+ }
+ }
+
+ /**
+ * Sets a modifier in the $this->type property.
+ *
+ * @param int $modifier Modifier to set
+ */
+ protected function setModifier($modifier) {
+ Stmt\Class_::verifyModifier($this->flags, $modifier);
+ $this->flags |= $modifier;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php
new file mode 100644
index 0000000..42c7f61
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php
@@ -0,0 +1,127 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Builder;
+use PhpParser\Node\Stmt\Use_;
+
+/**
+ * The following methods use reserved keywords, so their implementation is defined with an underscore and made available
+ * with the reserved name through __call() magic.
+ *
+ * @method Builder\Namespace_ namespace(string $name) Creates a namespace builder.
+ * @method Builder\Class_ class(string $name) Creates a class builder.
+ * @method Builder\Interface_ interface(string $name) Creates an interface builder.
+ * @method Builder\Trait_ trait(string $name) Creates a trait builder.
+ * @method Builder\Function_ function(string $name) Creates a function builder.
+ * @method Builder\Use_ use(string $name) Creates a namespace/class use builder.
+ */
+class BuilderFactory
+{
+ /**
+ * Creates a namespace builder.
+ *
+ * @param null|string|Node\Name $name Name of the namespace
+ *
+ * @return Builder\Namespace_ The created namespace builder
+ */
+ protected function _namespace($name) {
+ return new Builder\Namespace_($name);
+ }
+
+ /**
+ * Creates a class builder.
+ *
+ * @param string $name Name of the class
+ *
+ * @return Builder\Class_ The created class builder
+ */
+ protected function _class($name) {
+ return new Builder\Class_($name);
+ }
+
+ /**
+ * Creates an interface builder.
+ *
+ * @param string $name Name of the interface
+ *
+ * @return Builder\Interface_ The created interface builder
+ */
+ protected function _interface($name) {
+ return new Builder\Interface_($name);
+ }
+
+ /**
+ * Creates a trait builder.
+ *
+ * @param string $name Name of the trait
+ *
+ * @return Builder\Trait_ The created trait builder
+ */
+ protected function _trait($name) {
+ return new Builder\Trait_($name);
+ }
+
+ /**
+ * Creates a method builder.
+ *
+ * @param string $name Name of the method
+ *
+ * @return Builder\Method The created method builder
+ */
+ public function method($name) {
+ return new Builder\Method($name);
+ }
+
+ /**
+ * Creates a parameter builder.
+ *
+ * @param string $name Name of the parameter
+ *
+ * @return Builder\Param The created parameter builder
+ */
+ public function param($name) {
+ return new Builder\Param($name);
+ }
+
+ /**
+ * Creates a property builder.
+ *
+ * @param string $name Name of the property
+ *
+ * @return Builder\Property The created property builder
+ */
+ public function property($name) {
+ return new Builder\Property($name);
+ }
+
+ /**
+ * Creates a function builder.
+ *
+ * @param string $name Name of the function
+ *
+ * @return Builder\Function_ The created function builder
+ */
+ protected function _function($name) {
+ return new Builder\Function_($name);
+ }
+
+ /**
+ * Creates a namespace/class use builder.
+ *
+ * @param string|Node\Name Name to alias
+ *
+ * @return Builder\Use_ The create use builder
+ */
+ protected function _use($name) {
+ return new Builder\Use_($name, Use_::TYPE_NORMAL);
+ }
+
+ public function __call($name, array $args) {
+ if (method_exists($this, '_' . $name)) {
+ return call_user_func_array(array($this, '_' . $name), $args);
+ }
+
+ throw new \LogicException(sprintf('Method "%s" does not exist', $name));
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment.php b/vendor/nikic/php-parser/lib/PhpParser/Comment.php
new file mode 100644
index 0000000..4034cfa
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Comment.php
@@ -0,0 +1,140 @@
+<?php
+
+namespace PhpParser;
+
+class Comment implements \JsonSerializable
+{
+ protected $text;
+ protected $line;
+ protected $filePos;
+
+ /**
+ * Constructs a comment node.
+ *
+ * @param string $text Comment text (including comment delimiters like /*)
+ * @param int $startLine Line number the comment started on
+ * @param int $startFilePos File offset the comment started on
+ */
+ public function __construct($text, $startLine = -1, $startFilePos = -1) {
+ $this->text = $text;
+ $this->line = $startLine;
+ $this->filePos = $startFilePos;
+ }
+
+ /**
+ * Gets the comment text.
+ *
+ * @return string The comment text (including comment delimiters like /*)
+ */
+ public function getText() {
+ return $this->text;
+ }
+
+ /**
+ * Gets the line number the comment started on.
+ *
+ * @return int Line number
+ */
+ public function getLine() {
+ return $this->line;
+ }
+
+ /**
+ * Gets the file offset the comment started on.
+ *
+ * @return int File offset
+ */
+ public function getFilePos() {
+ return $this->filePos;
+ }
+
+ /**
+ * Gets the comment text.
+ *
+ * @return string The comment text (including comment delimiters like /*)
+ */
+ public function __toString() {
+ return $this->text;
+ }
+
+ /**
+ * Gets the reformatted comment text.
+ *
+ * "Reformatted" here means that we try to clean up the whitespace at the
+ * starts of the lines. This is necessary because we receive the comments
+ * without trailing whitespace on the first line, but with trailing whitespace
+ * on all subsequent lines.
+ *
+ * @return mixed|string
+ */
+ public function getReformattedText() {
+ $text = trim($this->text);
+ $newlinePos = strpos($text, "\n");
+ if (false === $newlinePos) {
+ // Single line comments don't need further processing
+ return $text;
+ } elseif (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) {
+ // Multi line comment of the type
+ //
+ // /*
+ // * Some text.
+ // * Some more text.
+ // */
+ //
+ // is handled by replacing the whitespace sequences before the * by a single space
+ return preg_replace('(^\s+\*)m', ' *', $this->text);
+ } elseif (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) {
+ // Multi line comment of the type
+ //
+ // /*
+ // Some text.
+ // Some more text.
+ // */
+ //
+ // is handled by removing the whitespace sequence on the line before the closing
+ // */ on all lines. So if the last line is " */", then " " is removed at the
+ // start of all lines.
+ return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text);
+ } elseif (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) {
+ // Multi line comment of the type
+ //
+ // /* Some text.
+ // Some more text.
+ // Indented text.
+ // Even more text. */
+ //
+ // is handled by removing the difference between the shortest whitespace prefix on all
+ // lines and the length of the "/* " opening sequence.
+ $prefixLen = $this->getShortestWhitespacePrefixLen(substr($text, $newlinePos + 1));
+ $removeLen = $prefixLen - strlen($matches[0]);
+ return preg_replace('(^\s{' . $removeLen . '})m', '', $text);
+ }
+
+ // No idea how to format this comment, so simply return as is
+ return $text;
+ }
+
+ private function getShortestWhitespacePrefixLen($str) {
+ $lines = explode("\n", $str);
+ $shortestPrefixLen = INF;
+ foreach ($lines as $line) {
+ preg_match('(^\s*)', $line, $matches);
+ $prefixLen = strlen($matches[0]);
+ if ($prefixLen < $shortestPrefixLen) {
+ $shortestPrefixLen = $prefixLen;
+ }
+ }
+ return $shortestPrefixLen;
+ }
+
+ public function jsonSerialize() {
+ // Technically not a node, but we make it look like one anyway
+ $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment';
+ return [
+ 'nodeType' => $type,
+ 'text' => $this->text,
+ 'line' => $this->line,
+ 'filePos' => $this->filePos,
+ ];
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php
new file mode 100644
index 0000000..24fc6c9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace PhpParser\Comment;
+
+class Doc extends \PhpParser\Comment
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Error.php
new file mode 100644
index 0000000..4a23294
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Error.php
@@ -0,0 +1,166 @@
+<?php
+
+namespace PhpParser;
+
+class Error extends \RuntimeException
+{
+ protected $rawMessage;
+ protected $attributes;
+
+ /**
+ * Creates an Exception signifying a parse error.
+ *
+ * @param string $message Error message
+ * @param array|int $attributes Attributes of node/token where error occurred
+ * (or start line of error -- deprecated)
+ */
+ public function __construct($message, $attributes = array()) {
+ $this->rawMessage = (string) $message;
+ if (is_array($attributes)) {
+ $this->attributes = $attributes;
+ } else {
+ $this->attributes = array('startLine' => $attributes);
+ }
+ $this->updateMessage();
+ }
+
+ /**
+ * Gets the error message
+ *
+ * @return string Error message
+ */
+ public function getRawMessage() {
+ return $this->rawMessage;
+ }
+
+ /**
+ * Gets the line the error starts in.
+ *
+ * @return int Error start line
+ */
+ public function getStartLine() {
+ return isset($this->attributes['startLine']) ? $this->attributes['startLine'] : -1;
+ }
+
+ /**
+ * Gets the line the error ends in.
+ *
+ * @return int Error end line
+ */
+ public function getEndLine() {
+ return isset($this->attributes['endLine']) ? $this->attributes['endLine'] : -1;
+ }
+
+
+ /**
+ * Gets the attributes of the node/token the error occurred at.
+ *
+ * @return array
+ */
+ public function getAttributes() {
+ return $this->attributes;
+ }
+
+ /**
+ * Sets the attributes of the node/token the error occured at.
+ *
+ * @param array $attributes
+ */
+ public function setAttributes(array $attributes) {
+ $this->attributes = $attributes;
+ $this->updateMessage();
+ }
+
+ /**
+ * Sets the line of the PHP file the error occurred in.
+ *
+ * @param string $message Error message
+ */
+ public function setRawMessage($message) {
+ $this->rawMessage = (string) $message;
+ $this->updateMessage();
+ }
+
+ /**
+ * Sets the line the error starts in.
+ *
+ * @param int $line Error start line
+ */
+ public function setStartLine($line) {
+ $this->attributes['startLine'] = (int) $line;
+ $this->updateMessage();
+ }
+
+ /**
+ * Returns whether the error has start and end column information.
+ *
+ * For column information enable the startFilePos and endFilePos in the lexer options.
+ *
+ * @return bool
+ */
+ public function hasColumnInfo() {
+ return isset($this->attributes['startFilePos']) && isset($this->attributes['endFilePos']);
+ }
+
+ /**
+ * Gets the start column (1-based) into the line where the error started.
+ *
+ * @param string $code Source code of the file
+ * @return int
+ */
+ public function getStartColumn($code) {
+ if (!$this->hasColumnInfo()) {
+ throw new \RuntimeException('Error does not have column information');
+ }
+
+ return $this->toColumn($code, $this->attributes['startFilePos']);
+ }
+
+ /**
+ * Gets the end column (1-based) into the line where the error ended.
+ *
+ * @param string $code Source code of the file
+ * @return int
+ */
+ public function getEndColumn($code) {
+ if (!$this->hasColumnInfo()) {
+ throw new \RuntimeException('Error does not have column information');
+ }
+
+ return $this->toColumn($code, $this->attributes['endFilePos']);
+ }
+
+ public function getMessageWithColumnInfo($code) {
+ return sprintf(
+ '%s from %d:%d to %d:%d', $this->getRawMessage(),
+ $this->getStartLine(), $this->getStartColumn($code),
+ $this->getEndLine(), $this->getEndColumn($code)
+ );
+ }
+
+ private function toColumn($code, $pos) {
+ if ($pos > strlen($code)) {
+ throw new \RuntimeException('Invalid position information');
+ }
+
+ $lineStartPos = strrpos($code, "\n", $pos - strlen($code));
+ if (false === $lineStartPos) {
+ $lineStartPos = -1;
+ }
+
+ return $pos - $lineStartPos;
+ }
+
+ /**
+ * Updates the exception message after a change to rawMessage or rawLine.
+ */
+ protected function updateMessage() {
+ $this->message = $this->rawMessage;
+
+ if (-1 === $this->getStartLine()) {
+ $this->message .= ' on unknown line';
+ } else {
+ $this->message .= ' on line ' . $this->getStartLine();
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php
new file mode 100644
index 0000000..fa2c2f8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace PhpParser;
+
+interface ErrorHandler
+{
+ /**
+ * Handle an error generated during lexing, parsing or some other operation.
+ *
+ * @param Error $error The error that needs to be handled
+ */
+ public function handleError(Error $error);
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php
new file mode 100644
index 0000000..99290f0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php
@@ -0,0 +1,46 @@
+<?php
+
+namespace PhpParser\ErrorHandler;
+
+use PhpParser\Error;
+use PhpParser\ErrorHandler;
+
+/**
+ * Error handler that collects all errors into an array.
+ *
+ * This allows graceful handling of errors.
+ */
+class Collecting implements ErrorHandler
+{
+ /** @var Error[] Collected errors */
+ private $errors = [];
+
+ public function handleError(Error $error) {
+ $this->errors[] = $error;
+ }
+
+ /**
+ * Get collected errors.
+ *
+ * @return Error[]
+ */
+ public function getErrors() {
+ return $this->errors;
+ }
+
+ /**
+ * Check whether there are any errors.
+ *
+ * @return bool
+ */
+ public function hasErrors() {
+ return !empty($this->errors);
+ }
+
+ /**
+ * Reset/clear collected errors.
+ */
+ public function clearErrors() {
+ $this->errors = [];
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php
new file mode 100644
index 0000000..c5a76dd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace PhpParser\ErrorHandler;
+
+use PhpParser\Error;
+use PhpParser\ErrorHandler;
+
+/**
+ * Error handler that handles all errors by throwing them.
+ *
+ * This is the default strategy used by all components.
+ */
+class Throwing implements ErrorHandler
+{
+ public function handleError(Error $error) {
+ throw $error;
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php
new file mode 100644
index 0000000..52226c7
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php
@@ -0,0 +1,379 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Parser\Tokens;
+
+class Lexer
+{
+ protected $code;
+ protected $tokens;
+ protected $pos;
+ protected $line;
+ protected $filePos;
+ protected $prevCloseTagHasNewline;
+
+ protected $tokenMap;
+ protected $dropTokens;
+
+ protected $usedAttributes;
+
+ /**
+ * Creates a Lexer.
+ *
+ * @param array $options Options array. Currently only the 'usedAttributes' option is supported,
+ * which is an array of attributes to add to the AST nodes. Possible
+ * attributes are: 'comments', 'startLine', 'endLine', 'startTokenPos',
+ * 'endTokenPos', 'startFilePos', 'endFilePos'. The option defaults to the
+ * first three. For more info see getNextToken() docs.
+ */
+ public function __construct(array $options = array()) {
+ // map from internal tokens to PhpParser tokens
+ $this->tokenMap = $this->createTokenMap();
+
+ // map of tokens to drop while lexing (the map is only used for isset lookup,
+ // that's why the value is simply set to 1; the value is never actually used.)
+ $this->dropTokens = array_fill_keys(
+ array(T_WHITESPACE, T_OPEN_TAG, T_COMMENT, T_DOC_COMMENT), 1
+ );
+
+ // the usedAttributes member is a map of the used attribute names to a dummy
+ // value (here "true")
+ $options += array(
+ 'usedAttributes' => array('comments', 'startLine', 'endLine'),
+ );
+ $this->usedAttributes = array_fill_keys($options['usedAttributes'], true);
+ }
+
+ /**
+ * Initializes the lexer for lexing the provided source code.
+ *
+ * This function does not throw if lexing errors occur. Instead, errors may be retrieved using
+ * the getErrors() method.
+ *
+ * @param string $code The source code to lex
+ * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to
+ * ErrorHandler\Throwing
+ */
+ public function startLexing($code, ErrorHandler $errorHandler = null) {
+ if (null === $errorHandler) {
+ $errorHandler = new ErrorHandler\Throwing();
+ }
+
+ $this->code = $code; // keep the code around for __halt_compiler() handling
+ $this->pos = -1;
+ $this->line = 1;
+ $this->filePos = 0;
+
+ // If inline HTML occurs without preceding code, treat it as if it had a leading newline.
+ // This ensures proper composability, because having a newline is the "safe" assumption.
+ $this->prevCloseTagHasNewline = true;
+
+ $scream = ini_set('xdebug.scream', '0');
+
+ $this->resetErrors();
+ $this->tokens = @token_get_all($code);
+ $this->handleErrors($errorHandler);
+
+ if (false !== $scream) {
+ ini_set('xdebug.scream', $scream);
+ }
+ }
+
+ protected function resetErrors() {
+ if (function_exists('error_clear_last')) {
+ error_clear_last();
+ } else {
+ // set error_get_last() to defined state by forcing an undefined variable error
+ set_error_handler(function() { return false; }, 0);
+ @$undefinedVariable;
+ restore_error_handler();
+ }
+ }
+
+ private function handleInvalidCharacterRange($start, $end, $line, ErrorHandler $errorHandler) {
+ for ($i = $start; $i < $end; $i++) {
+ $chr = $this->code[$i];
+ if ($chr === 'b' || $chr === 'B') {
+ // HHVM does not treat b" tokens correctly, so ignore these
+ continue;
+ }
+
+ if ($chr === "\0") {
+ // PHP cuts error message after null byte, so need special case
+ $errorMsg = 'Unexpected null byte';
+ } else {
+ $errorMsg = sprintf(
+ 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr)
+ );
+ }
+
+ $errorHandler->handleError(new Error($errorMsg, [
+ 'startLine' => $line,
+ 'endLine' => $line,
+ 'startFilePos' => $i,
+ 'endFilePos' => $i,
+ ]));
+ }
+ }
+
+ private function isUnterminatedComment($token) {
+ return ($token[0] === T_COMMENT || $token[0] === T_DOC_COMMENT)
+ && substr($token[1], 0, 2) === '/*'
+ && substr($token[1], -2) !== '*/';
+ }
+
+ private function errorMayHaveOccurred() {
+ if (defined('HHVM_VERSION')) {
+ // In HHVM token_get_all() does not throw warnings, so we need to conservatively
+ // assume that an error occurred
+ return true;
+ }
+
+ $error = error_get_last();
+ return null !== $error
+ && false === strpos($error['message'], 'Undefined variable');
+ }
+
+ protected function handleErrors(ErrorHandler $errorHandler) {
+ if (!$this->errorMayHaveOccurred()) {
+ return;
+ }
+
+ // PHP's error handling for token_get_all() is rather bad, so if we want detailed
+ // error information we need to compute it ourselves. Invalid character errors are
+ // detected by finding "gaps" in the token array. Unterminated comments are detected
+ // by checking if a trailing comment has a "*/" at the end.
+
+ $filePos = 0;
+ $line = 1;
+ foreach ($this->tokens as $i => $token) {
+ $tokenValue = \is_string($token) ? $token : $token[1];
+ $tokenLen = \strlen($tokenValue);
+
+ if (substr($this->code, $filePos, $tokenLen) !== $tokenValue) {
+ // Something is missing, must be an invalid character
+ $nextFilePos = strpos($this->code, $tokenValue, $filePos);
+ $this->handleInvalidCharacterRange(
+ $filePos, $nextFilePos, $line, $errorHandler);
+ $filePos = $nextFilePos;
+ }
+
+ $filePos += $tokenLen;
+ $line += substr_count($tokenValue, "\n");
+ }
+
+ if ($filePos !== \strlen($this->code)) {
+ if (substr($this->code, $filePos, 2) === '/*') {
+ // Unlike PHP, HHVM will drop unterminated comments entirely
+ $comment = substr($this->code, $filePos);
+ $errorHandler->handleError(new Error('Unterminated comment', [
+ 'startLine' => $line,
+ 'endLine' => $line + substr_count($comment, "\n"),
+ 'startFilePos' => $filePos,
+ 'endFilePos' => $filePos + \strlen($comment),
+ ]));
+
+ // Emulate the PHP behavior
+ $isDocComment = isset($comment[3]) && $comment[3] === '*';
+ $this->tokens[] = [$isDocComment ? T_DOC_COMMENT : T_COMMENT, $comment, $line];
+ } else {
+ // Invalid characters at the end of the input
+ $this->handleInvalidCharacterRange(
+ $filePos, \strlen($this->code), $line, $errorHandler);
+ }
+ return;
+ }
+
+ // Check for unterminated comment
+ $lastToken = $this->tokens[count($this->tokens) - 1];
+ if ($this->isUnterminatedComment($lastToken)) {
+ $errorHandler->handleError(new Error('Unterminated comment', [
+ 'startLine' => $line - substr_count($lastToken[1], "\n"),
+ 'endLine' => $line,
+ 'startFilePos' => $filePos - \strlen($lastToken[1]),
+ 'endFilePos' => $filePos,
+ ]));
+ }
+ }
+
+ /**
+ * Fetches the next token.
+ *
+ * The available attributes are determined by the 'usedAttributes' option, which can
+ * be specified in the constructor. The following attributes are supported:
+ *
+ * * 'comments' => Array of PhpParser\Comment or PhpParser\Comment\Doc instances,
+ * representing all comments that occurred between the previous
+ * non-discarded token and the current one.
+ * * 'startLine' => Line in which the node starts.
+ * * 'endLine' => Line in which the node ends.
+ * * 'startTokenPos' => Offset into the token array of the first token in the node.
+ * * 'endTokenPos' => Offset into the token array of the last token in the node.
+ * * 'startFilePos' => Offset into the code string of the first character that is part of the node.
+ * * 'endFilePos' => Offset into the code string of the last character that is part of the node.
+ *
+ * @param mixed $value Variable to store token content in
+ * @param mixed $startAttributes Variable to store start attributes in
+ * @param mixed $endAttributes Variable to store end attributes in
+ *
+ * @return int Token id
+ */
+ public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) {
+ $startAttributes = array();
+ $endAttributes = array();
+
+ while (1) {
+ if (isset($this->tokens[++$this->pos])) {
+ $token = $this->tokens[$this->pos];
+ } else {
+ // EOF token with ID 0
+ $token = "\0";
+ }
+
+ if (isset($this->usedAttributes['startLine'])) {
+ $startAttributes['startLine'] = $this->line;
+ }
+ if (isset($this->usedAttributes['startTokenPos'])) {
+ $startAttributes['startTokenPos'] = $this->pos;
+ }
+ if (isset($this->usedAttributes['startFilePos'])) {
+ $startAttributes['startFilePos'] = $this->filePos;
+ }
+
+ if (\is_string($token)) {
+ $value = $token;
+ if (isset($token[1])) {
+ // bug in token_get_all
+ $this->filePos += 2;
+ $id = ord('"');
+ } else {
+ $this->filePos += 1;
+ $id = ord($token);
+ }
+ } elseif (!isset($this->dropTokens[$token[0]])) {
+ $value = $token[1];
+ $id = $this->tokenMap[$token[0]];
+ if (T_CLOSE_TAG === $token[0]) {
+ $this->prevCloseTagHasNewline = false !== strpos($token[1], "\n");
+ } else if (T_INLINE_HTML === $token[0]) {
+ $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline;
+ }
+
+ $this->line += substr_count($value, "\n");
+ $this->filePos += \strlen($value);
+ } else {
+ if (T_COMMENT === $token[0] || T_DOC_COMMENT === $token[0]) {
+ if (isset($this->usedAttributes['comments'])) {
+ $comment = T_DOC_COMMENT === $token[0]
+ ? new Comment\Doc($token[1], $this->line, $this->filePos)
+ : new Comment($token[1], $this->line, $this->filePos);
+ $startAttributes['comments'][] = $comment;
+ }
+ }
+
+ $this->line += substr_count($token[1], "\n");
+ $this->filePos += \strlen($token[1]);
+ continue;
+ }
+
+ if (isset($this->usedAttributes['endLine'])) {
+ $endAttributes['endLine'] = $this->line;
+ }
+ if (isset($this->usedAttributes['endTokenPos'])) {
+ $endAttributes['endTokenPos'] = $this->pos;
+ }
+ if (isset($this->usedAttributes['endFilePos'])) {
+ $endAttributes['endFilePos'] = $this->filePos - 1;
+ }
+
+ return $id;
+ }
+
+ throw new \RuntimeException('Reached end of lexer loop');
+ }
+
+ /**
+ * Returns the token array for current code.
+ *
+ * The token array is in the same format as provided by the
+ * token_get_all() function and does not discard tokens (i.e.
+ * whitespace and comments are included). The token position
+ * attributes are against this token array.
+ *
+ * @return array Array of tokens in token_get_all() format
+ */
+ public function getTokens() {
+ return $this->tokens;
+ }
+
+ /**
+ * Handles __halt_compiler() by returning the text after it.
+ *
+ * @return string Remaining text
+ */
+ public function handleHaltCompiler() {
+ // text after T_HALT_COMPILER, still including ();
+ $textAfter = substr($this->code, $this->filePos);
+
+ // ensure that it is followed by ();
+ // this simplifies the situation, by not allowing any comments
+ // in between of the tokens.
+ if (!preg_match('~^\s*\(\s*\)\s*(?:;|\?>\r?\n?)~', $textAfter, $matches)) {
+ throw new Error('__HALT_COMPILER must be followed by "();"');
+ }
+
+ // prevent the lexer from returning any further tokens
+ $this->pos = count($this->tokens);
+
+ // return with (); removed
+ return (string) substr($textAfter, strlen($matches[0])); // (string) converts false to ''
+ }
+
+ /**
+ * Creates the token map.
+ *
+ * The token map maps the PHP internal token identifiers
+ * to the identifiers used by the Parser. Additionally it
+ * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'.
+ *
+ * @return array The token map
+ */
+ protected function createTokenMap() {
+ $tokenMap = array();
+
+ // 256 is the minimum possible token number, as everything below
+ // it is an ASCII value
+ for ($i = 256; $i < 1000; ++$i) {
+ if (T_DOUBLE_COLON === $i) {
+ // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM
+ $tokenMap[$i] = Tokens::T_PAAMAYIM_NEKUDOTAYIM;
+ } elseif(T_OPEN_TAG_WITH_ECHO === $i) {
+ // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO
+ $tokenMap[$i] = Tokens::T_ECHO;
+ } elseif(T_CLOSE_TAG === $i) {
+ // T_CLOSE_TAG is equivalent to ';'
+ $tokenMap[$i] = ord(';');
+ } elseif ('UNKNOWN' !== $name = token_name($i)) {
+ if ('T_HASHBANG' === $name) {
+ // HHVM uses a special token for #! hashbang lines
+ $tokenMap[$i] = Tokens::T_INLINE_HTML;
+ } else if (defined($name = 'PhpParser\Parser\Tokens::' . $name)) {
+ // Other tokens can be mapped directly
+ $tokenMap[$i] = constant($name);
+ }
+ }
+ }
+
+ // HHVM uses a special token for numbers that overflow to double
+ if (defined('T_ONUMBER')) {
+ $tokenMap[T_ONUMBER] = Tokens::T_DNUMBER;
+ }
+ // HHVM also has a separate token for the __COMPILER_HALT_OFFSET__ constant
+ if (defined('T_COMPILER_HALT_OFFSET')) {
+ $tokenMap[T_COMPILER_HALT_OFFSET] = Tokens::T_STRING;
+ }
+
+ return $tokenMap;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php
new file mode 100644
index 0000000..739a328
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php
@@ -0,0 +1,174 @@
+<?php
+
+namespace PhpParser\Lexer;
+
+use PhpParser\ErrorHandler;
+use PhpParser\Parser\Tokens;
+
+class Emulative extends \PhpParser\Lexer
+{
+ protected $newKeywords;
+ protected $inObjectAccess;
+
+ const T_ELLIPSIS = 1001;
+ const T_POW = 1002;
+ const T_POW_EQUAL = 1003;
+ const T_COALESCE = 1004;
+ const T_SPACESHIP = 1005;
+ const T_YIELD_FROM = 1006;
+
+ const PHP_7_0 = '7.0.0dev';
+ const PHP_5_6 = '5.6.0rc1';
+
+ public function __construct(array $options = array()) {
+ parent::__construct($options);
+
+ $newKeywordsPerVersion = array(
+ // No new keywords since PHP 5.5
+ );
+
+ $this->newKeywords = array();
+ foreach ($newKeywordsPerVersion as $version => $newKeywords) {
+ if (version_compare(PHP_VERSION, $version, '>=')) {
+ break;
+ }
+
+ $this->newKeywords += $newKeywords;
+ }
+
+ if (version_compare(PHP_VERSION, self::PHP_7_0, '>=')) {
+ return;
+ }
+ $this->tokenMap[self::T_COALESCE] = Tokens::T_COALESCE;
+ $this->tokenMap[self::T_SPACESHIP] = Tokens::T_SPACESHIP;
+ $this->tokenMap[self::T_YIELD_FROM] = Tokens::T_YIELD_FROM;
+
+ if (version_compare(PHP_VERSION, self::PHP_5_6, '>=')) {
+ return;
+ }
+ $this->tokenMap[self::T_ELLIPSIS] = Tokens::T_ELLIPSIS;
+ $this->tokenMap[self::T_POW] = Tokens::T_POW;
+ $this->tokenMap[self::T_POW_EQUAL] = Tokens::T_POW_EQUAL;
+ }
+
+ public function startLexing($code, ErrorHandler $errorHandler = null) {
+ $this->inObjectAccess = false;
+
+ parent::startLexing($code, $errorHandler);
+ if ($this->requiresEmulation($code)) {
+ $this->emulateTokens();
+ }
+ }
+
+ /*
+ * Checks if the code is potentially using features that require emulation.
+ */
+ protected function requiresEmulation($code) {
+ if (version_compare(PHP_VERSION, self::PHP_7_0, '>=')) {
+ return false;
+ }
+
+ if (preg_match('(\?\?|<=>|yield[ \n\r\t]+from)', $code)) {
+ return true;
+ }
+
+ if (version_compare(PHP_VERSION, self::PHP_5_6, '>=')) {
+ return false;
+ }
+
+ return preg_match('(\.\.\.|(?<!/)\*\*(?!/))', $code);
+ }
+
+ /*
+ * Emulates tokens for newer PHP versions.
+ */
+ protected function emulateTokens() {
+ // We need to manually iterate and manage a count because we'll change
+ // the tokens array on the way
+ $line = 1;
+ for ($i = 0, $c = count($this->tokens); $i < $c; ++$i) {
+ $replace = null;
+ if (isset($this->tokens[$i + 1])) {
+ if ($this->tokens[$i] === '?' && $this->tokens[$i + 1] === '?') {
+ array_splice($this->tokens, $i, 2, array(
+ array(self::T_COALESCE, '??', $line)
+ ));
+ $c--;
+ continue;
+ }
+ if ($this->tokens[$i][0] === T_IS_SMALLER_OR_EQUAL
+ && $this->tokens[$i + 1] === '>'
+ ) {
+ array_splice($this->tokens, $i, 2, array(
+ array(self::T_SPACESHIP, '<=>', $line)
+ ));
+ $c--;
+ continue;
+ }
+ if ($this->tokens[$i] === '*' && $this->tokens[$i + 1] === '*') {
+ array_splice($this->tokens, $i, 2, array(
+ array(self::T_POW, '**', $line)
+ ));
+ $c--;
+ continue;
+ }
+ if ($this->tokens[$i] === '*' && $this->tokens[$i + 1][0] === T_MUL_EQUAL) {
+ array_splice($this->tokens, $i, 2, array(
+ array(self::T_POW_EQUAL, '**=', $line)
+ ));
+ $c--;
+ continue;
+ }
+ }
+
+ if (isset($this->tokens[$i + 2])) {
+ if ($this->tokens[$i][0] === T_YIELD && $this->tokens[$i + 1][0] === T_WHITESPACE
+ && $this->tokens[$i + 2][0] === T_STRING
+ && !strcasecmp($this->tokens[$i + 2][1], 'from')
+ ) {
+ array_splice($this->tokens, $i, 3, array(
+ array(
+ self::T_YIELD_FROM,
+ $this->tokens[$i][1] . $this->tokens[$i + 1][1] . $this->tokens[$i + 2][1],
+ $line
+ )
+ ));
+ $c -= 2;
+ $line += substr_count($this->tokens[$i][1], "\n");
+ continue;
+ }
+ if ($this->tokens[$i] === '.' && $this->tokens[$i + 1] === '.'
+ && $this->tokens[$i + 2] === '.'
+ ) {
+ array_splice($this->tokens, $i, 3, array(
+ array(self::T_ELLIPSIS, '...', $line)
+ ));
+ $c -= 2;
+ continue;
+ }
+ }
+
+ if (\is_array($this->tokens[$i])) {
+ $line += substr_count($this->tokens[$i][1], "\n");
+ }
+ }
+ }
+
+ public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) {
+ $token = parent::getNextToken($value, $startAttributes, $endAttributes);
+
+ // replace new keywords by their respective tokens. This is not done
+ // if we currently are in an object access (e.g. in $obj->namespace
+ // "namespace" stays a T_STRING tokens and isn't converted to T_NAMESPACE)
+ if (Tokens::T_STRING === $token && !$this->inObjectAccess) {
+ if (isset($this->newKeywords[strtolower($value)])) {
+ return $this->newKeywords[strtolower($value)];
+ }
+ } else {
+ // keep track of whether we currently are in an object access (after ->)
+ $this->inObjectAccess = Tokens::T_OBJECT_OPERATOR === $token;
+ }
+
+ return $token;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node.php b/vendor/nikic/php-parser/lib/PhpParser/Node.php
new file mode 100644
index 0000000..9da9245
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node.php
@@ -0,0 +1,86 @@
+<?php
+
+namespace PhpParser;
+
+interface Node
+{
+ /**
+ * Gets the type of the node.
+ *
+ * @return string Type of the node
+ */
+ public function getType();
+
+ /**
+ * Gets the names of the sub nodes.
+ *
+ * @return array Names of sub nodes
+ */
+ public function getSubNodeNames();
+
+ /**
+ * Gets line the node started in.
+ *
+ * @return int Line
+ */
+ public function getLine();
+
+ /**
+ * Sets line the node started in.
+ *
+ * @param int $line Line
+ */
+ public function setLine($line);
+
+ /**
+ * Gets the doc comment of the node.
+ *
+ * The doc comment has to be the last comment associated with the node.
+ *
+ * @return null|Comment\Doc Doc comment object or null
+ */
+ public function getDocComment();
+
+ /**
+ * Sets the doc comment of the node.
+ *
+ * This will either replace an existing doc comment or add it to the comments array.
+ *
+ * @param Comment\Doc $docComment Doc comment to set
+ */
+ public function setDocComment(Comment\Doc $docComment);
+
+ /**
+ * Sets an attribute on a node.
+ *
+ * @param string $key
+ * @param mixed $value
+ */
+ public function setAttribute($key, $value);
+
+ /**
+ * Returns whether an attribute exists.
+ *
+ * @param string $key
+ *
+ * @return bool
+ */
+ public function hasAttribute($key);
+
+ /**
+ * Returns the value of an attribute.
+ *
+ * @param string $key
+ * @param mixed $default
+ *
+ * @return mixed
+ */
+ public function &getAttribute($key, $default = null);
+
+ /**
+ * Returns all attributes for the given node.
+ *
+ * @return array
+ */
+ public function getAttributes();
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php
new file mode 100644
index 0000000..0887669
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace PhpParser\Node;
+
+use PhpParser\NodeAbstract;
+
+class Arg extends NodeAbstract
+{
+ /** @var Expr Value to pass */
+ public $value;
+ /** @var bool Whether to pass by ref */
+ public $byRef;
+ /** @var bool Whether to unpack the argument */
+ public $unpack;
+
+ /**
+ * Constructs a function call argument node.
+ *
+ * @param Expr $value Value to pass
+ * @param bool $byRef Whether to pass by ref
+ * @param bool $unpack Whether to unpack the argument
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $value, $byRef = false, $unpack = false, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->value = $value;
+ $this->byRef = $byRef;
+ $this->unpack = $unpack;
+ }
+
+ public function getSubNodeNames() {
+ return array('value', 'byRef', 'unpack');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php
new file mode 100644
index 0000000..26322d4
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node;
+
+use PhpParser\NodeAbstract;
+
+class Const_ extends NodeAbstract
+{
+ /** @var string Name */
+ public $name;
+ /** @var Expr Value */
+ public $value;
+
+ /**
+ * Constructs a const node for use in class const and const statements.
+ *
+ * @param string $name Name
+ * @param Expr $value Value
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, Expr $value, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() {
+ return array('name', 'value');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php
new file mode 100644
index 0000000..2dae5bf
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node;
+
+use PhpParser\NodeAbstract;
+
+abstract class Expr extends NodeAbstract
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php
new file mode 100644
index 0000000..b2e58f6
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class ArrayDimFetch extends Expr
+{
+ /** @var Expr Variable */
+ public $var;
+ /** @var null|Expr Array index / dim */
+ public $dim;
+
+ /**
+ * Constructs an array index fetch node.
+ *
+ * @param Expr $var Variable
+ * @param null|Expr $dim Array index / dim
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, Expr $dim = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ $this->dim = $dim;
+ }
+
+ public function getSubnodeNames() {
+ return array('var', 'dim');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php
new file mode 100644
index 0000000..de73ef4
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class ArrayItem extends Expr
+{
+ /** @var null|Expr Key */
+ public $key;
+ /** @var Expr Value */
+ public $value;
+ /** @var bool Whether to assign by reference */
+ public $byRef;
+
+ /**
+ * Constructs an array item node.
+ *
+ * @param Expr $value Value
+ * @param null|Expr $key Key
+ * @param bool $byRef Whether to assign by reference
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $value, Expr $key = null, $byRef = false, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->key = $key;
+ $this->value = $value;
+ $this->byRef = $byRef;
+ }
+
+ public function getSubNodeNames() {
+ return array('key', 'value', 'byRef');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
new file mode 100644
index 0000000..9151f27
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Array_ extends Expr
+{
+ // For use in "kind" attribute
+ const KIND_LONG = 1; // array() syntax
+ const KIND_SHORT = 2; // [] syntax
+
+ /** @var ArrayItem[] Items */
+ public $items;
+
+ /**
+ * Constructs an array node.
+ *
+ * @param ArrayItem[] $items Items of the array
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $items = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->items = $items;
+ }
+
+ public function getSubNodeNames() {
+ return array('items');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php
new file mode 100644
index 0000000..1f280ff
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Assign extends Expr
+{
+ /** @var Expr Variable */
+ public $var;
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs an assignment node.
+ *
+ * @param Expr $var Variable
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('var', 'expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php
new file mode 100644
index 0000000..83540a0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+abstract class AssignOp extends Expr
+{
+ /** @var Expr Variable */
+ public $var;
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs a compound assignment operation node.
+ *
+ * @param Expr $var Variable
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('var', 'expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
new file mode 100644
index 0000000..9e3ed82
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class BitwiseAnd extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
new file mode 100644
index 0000000..a9fd4e9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class BitwiseOr extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php
new file mode 100644
index 0000000..aabe552
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class BitwiseXor extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php
new file mode 100644
index 0000000..215445d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class Concat extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php
new file mode 100644
index 0000000..87893bb
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class Div extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php
new file mode 100644
index 0000000..32cad52
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class Minus extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php
new file mode 100644
index 0000000..a0a1571
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class Mod extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php
new file mode 100644
index 0000000..88c582b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class Mul extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php
new file mode 100644
index 0000000..bd4d77e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class Plus extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php
new file mode 100644
index 0000000..b5e5d98
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class Pow extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php
new file mode 100644
index 0000000..84b2d56
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class ShiftLeft extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php
new file mode 100644
index 0000000..0c8e237
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\AssignOp;
+
+use PhpParser\Node\Expr\AssignOp;
+
+class ShiftRight extends AssignOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php
new file mode 100644
index 0000000..7578df3
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class AssignRef extends Expr
+{
+ /** @var Expr Variable reference is assigned to */
+ public $var;
+ /** @var Expr Variable which is referenced */
+ public $expr;
+
+ /**
+ * Constructs an assignment node.
+ *
+ * @param Expr $var Variable
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('var', 'expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php
new file mode 100644
index 0000000..6f87e23
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+abstract class BinaryOp extends Expr
+{
+ /** @var Expr The left hand side expression */
+ public $left;
+ /** @var Expr The right hand side expression */
+ public $right;
+
+ /**
+ * Constructs a bitwise and node.
+ *
+ * @param Expr $left The left hand side expression
+ * @param Expr $right The right hand side expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $left, Expr $right, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->left = $left;
+ $this->right = $right;
+ }
+
+ public function getSubNodeNames() {
+ return array('left', 'right');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php
new file mode 100644
index 0000000..bd6c5c1
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class BitwiseAnd extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php
new file mode 100644
index 0000000..aa0f114
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class BitwiseOr extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php
new file mode 100644
index 0000000..ce951d0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class BitwiseXor extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php
new file mode 100644
index 0000000..0671f33
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class BooleanAnd extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php
new file mode 100644
index 0000000..22d743f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class BooleanOr extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php
new file mode 100644
index 0000000..55c2379
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Coalesce extends BinaryOp
+{
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php
new file mode 100644
index 0000000..f65dfa5
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Concat extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php
new file mode 100644
index 0000000..78d7f44
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Div extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php
new file mode 100644
index 0000000..d9cb204
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Equal extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php
new file mode 100644
index 0000000..2f53a99
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Greater extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php
new file mode 100644
index 0000000..9bd93a1
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class GreaterOrEqual extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php
new file mode 100644
index 0000000..9562680
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Identical extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php
new file mode 100644
index 0000000..5e8bae0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class LogicalAnd extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php
new file mode 100644
index 0000000..da92f80
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class LogicalOr extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php
new file mode 100644
index 0000000..5fa9652
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class LogicalXor extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php
new file mode 100644
index 0000000..4a3b117
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Minus extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php
new file mode 100644
index 0000000..0b10669
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Mod extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php
new file mode 100644
index 0000000..2338d0b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Mul extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php
new file mode 100644
index 0000000..c205ee2
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class NotEqual extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php
new file mode 100644
index 0000000..b7682d7
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class NotIdentical extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php
new file mode 100644
index 0000000..4025e63
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Plus extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php
new file mode 100644
index 0000000..007b6cb
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Pow extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php
new file mode 100644
index 0000000..398ec0b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class ShiftLeft extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php
new file mode 100644
index 0000000..6f98db8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class ShiftRight extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php
new file mode 100644
index 0000000..ba2c28b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Smaller extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php
new file mode 100644
index 0000000..ebb1911
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class SmallerOrEqual extends BinaryOp
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php
new file mode 100644
index 0000000..f6a97ca
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\BinaryOp;
+
+use PhpParser\Node\Expr\BinaryOp;
+
+class Spaceship extends BinaryOp
+{
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php
new file mode 100644
index 0000000..1d92264
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class BitwiseNot extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs a bitwise not node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php
new file mode 100644
index 0000000..8f543b8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class BooleanNot extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs a boolean not node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php
new file mode 100644
index 0000000..bf850dc
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+abstract class Cast extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs a cast node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php
new file mode 100644
index 0000000..08b3a38
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\Cast;
+
+use PhpParser\Node\Expr\Cast;
+
+class Array_ extends Cast
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php
new file mode 100644
index 0000000..4a1bd8f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\Cast;
+
+use PhpParser\Node\Expr\Cast;
+
+class Bool_ extends Cast
+{
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php
new file mode 100644
index 0000000..eede472
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\Cast;
+
+use PhpParser\Node\Expr\Cast;
+
+class Double extends Cast
+{
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php
new file mode 100644
index 0000000..02a7327
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\Cast;
+
+use PhpParser\Node\Expr\Cast;
+
+class Int_ extends Cast
+{
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php
new file mode 100644
index 0000000..4e9d74f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\Cast;
+
+use PhpParser\Node\Expr\Cast;
+
+class Object_ extends Cast
+{
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php
new file mode 100644
index 0000000..7c648db
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\Cast;
+
+use PhpParser\Node\Expr\Cast;
+
+class String_ extends Cast
+{
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php
new file mode 100644
index 0000000..5cfd3ef
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node\Expr\Cast;
+
+use PhpParser\Node\Expr\Cast;
+
+class Unset_ extends Cast
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php
new file mode 100644
index 0000000..99cf5cd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+
+class ClassConstFetch extends Expr
+{
+ /** @var Name|Expr Class name */
+ public $class;
+ /** @var string Constant name */
+ public $name;
+
+ /**
+ * Constructs a class const fetch node.
+ *
+ * @param Name|Expr $class Class name
+ * @param string $name Constant name
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($class, $name, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->class = $class;
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() {
+ return array('class', 'name');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php
new file mode 100644
index 0000000..198ec4d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Clone_ extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs a clone node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php
new file mode 100644
index 0000000..5d37655
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php
@@ -0,0 +1,65 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+use PhpParser\Node\FunctionLike;
+
+class Closure extends Expr implements FunctionLike
+{
+ /** @var bool Whether the closure is static */
+ public $static;
+ /** @var bool Whether to return by reference */
+ public $byRef;
+ /** @var Node\Param[] Parameters */
+ public $params;
+ /** @var ClosureUse[] use()s */
+ public $uses;
+ /** @var null|string|Node\Name|Node\NullableType Return type */
+ public $returnType;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a lambda function node.
+ *
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'static' => false : Whether the closure is static
+ * 'byRef' => false : Whether to return by reference
+ * 'params' => array(): Parameters
+ * 'uses' => array(): use()s
+ * 'returnType' => null : Return type
+ * 'stmts' => array(): Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->static = isset($subNodes['static']) ? $subNodes['static'] : false;
+ $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
+ $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
+ $this->uses = isset($subNodes['uses']) ? $subNodes['uses'] : array();
+ $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
+ $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
+ }
+
+ public function getSubNodeNames() {
+ return array('static', 'byRef', 'params', 'uses', 'returnType', 'stmts');
+ }
+
+ public function returnsByRef() {
+ return $this->byRef;
+ }
+
+ public function getParams() {
+ return $this->params;
+ }
+
+ public function getReturnType() {
+ return $this->returnType;
+ }
+
+ public function getStmts() {
+ return $this->stmts;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php
new file mode 100644
index 0000000..f4d0202
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class ClosureUse extends Expr
+{
+ /** @var string Name of variable */
+ public $var;
+ /** @var bool Whether to use by reference */
+ public $byRef;
+
+ /**
+ * Constructs a closure use node.
+ *
+ * @param string $var Name of variable
+ * @param bool $byRef Whether to use by reference
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($var, $byRef = false, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ $this->byRef = $byRef;
+ }
+
+ public function getSubNodeNames() {
+ return array('var', 'byRef');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php
new file mode 100644
index 0000000..98e51d5
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+
+class ConstFetch extends Expr
+{
+ /** @var Name Constant name */
+ public $name;
+
+ /**
+ * Constructs a const fetch node.
+ *
+ * @param Name $name Constant name
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Name $name, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() {
+ return array('name');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php
new file mode 100644
index 0000000..0c0509e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Empty_ extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs an empty() node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php
new file mode 100644
index 0000000..5ab8fd4
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+/**
+ * Error node used during parsing with error recovery.
+ *
+ * An error node may be placed at a position where an expression is required, but an error occurred.
+ * Error nodes will not be present if the parser is run in throwOnError mode (the default).
+ */
+class Error extends Expr
+{
+ /**
+ * Constructs an error node.
+ *
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $attributes = array()) {
+ parent::__construct($attributes);
+ }
+
+ public function getSubNodeNames() {
+ return array();
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php
new file mode 100644
index 0000000..750c814
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class ErrorSuppress extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs an error suppress node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php
new file mode 100644
index 0000000..eadffd0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Eval_ extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs an eval() node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php
new file mode 100644
index 0000000..b0b94cf
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Exit_ extends Expr
+{
+ /* For use in "kind" attribute */
+ const KIND_EXIT = 1;
+ const KIND_DIE = 2;
+
+ /** @var null|Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs an exit() node.
+ *
+ * @param null|Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php
new file mode 100644
index 0000000..60d0050
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+
+class FuncCall extends Expr
+{
+ /** @var Node\Name|Expr Function name */
+ public $name;
+ /** @var Node\Arg[] Arguments */
+ public $args;
+
+ /**
+ * Constructs a function call node.
+ *
+ * @param Node\Name|Expr $name Function name
+ * @param Node\Arg[] $args Arguments
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $args = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ $this->args = $args;
+ }
+
+ public function getSubNodeNames() {
+ return array('name', 'args');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php
new file mode 100644
index 0000000..b27f3af
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Include_ extends Expr
+{
+ const TYPE_INCLUDE = 1;
+ const TYPE_INCLUDE_ONCE = 2;
+ const TYPE_REQUIRE = 3;
+ const TYPE_REQUIRE_ONCE = 4;
+
+ /** @var Expr Expression */
+ public $expr;
+ /** @var int Type of include */
+ public $type;
+
+ /**
+ * Constructs an include node.
+ *
+ * @param Expr $expr Expression
+ * @param int $type Type of include
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, $type, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ $this->type = $type;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr', 'type');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php
new file mode 100644
index 0000000..69573d8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+
+class Instanceof_ extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+ /** @var Name|Expr Class name */
+ public $class;
+
+ /**
+ * Constructs an instanceof check node.
+ *
+ * @param Expr $expr Expression
+ * @param Name|Expr $class Class name
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, $class, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ $this->class = $class;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr', 'class');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php
new file mode 100644
index 0000000..4ec1d02
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Isset_ extends Expr
+{
+ /** @var Expr[] Variables */
+ public $vars;
+
+ /**
+ * Constructs an array node.
+ *
+ * @param Expr[] $vars Variables
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $vars, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->vars = $vars;
+ }
+
+ public function getSubNodeNames() {
+ return array('vars');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php
new file mode 100644
index 0000000..30f3dc1
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class List_ extends Expr
+{
+ /** @var ArrayItem[] List of items to assign to */
+ public $items;
+
+ /**
+ * Constructs a list() destructuring node.
+ *
+ * @param ArrayItem[] $items List of items to assign to
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $items, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->items = $items;
+ }
+
+ public function getSubNodeNames() {
+ return array('items');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php
new file mode 100644
index 0000000..a6cdd07
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Arg;
+use PhpParser\Node\Expr;
+
+class MethodCall extends Expr
+{
+ /** @var Expr Variable holding object */
+ public $var;
+ /** @var string|Expr Method name */
+ public $name;
+ /** @var Arg[] Arguments */
+ public $args;
+
+ /**
+ * Constructs a function call node.
+ *
+ * @param Expr $var Variable holding object
+ * @param string|Expr $name Method name
+ * @param Arg[] $args Arguments
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, $name, array $args = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ $this->name = $name;
+ $this->args = $args;
+ }
+
+ public function getSubNodeNames() {
+ return array('var', 'name', 'args');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php
new file mode 100644
index 0000000..a8c8779
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+
+class New_ extends Expr
+{
+ /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */
+ public $class;
+ /** @var Node\Arg[] Arguments */
+ public $args;
+
+ /**
+ * Constructs a function call node.
+ *
+ * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes)
+ * @param Node\Arg[] $args Arguments
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($class, array $args = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->class = $class;
+ $this->args = $args;
+ }
+
+ public function getSubNodeNames() {
+ return array('class', 'args');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php
new file mode 100644
index 0000000..06ce547
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class PostDec extends Expr
+{
+ /** @var Expr Variable */
+ public $var;
+
+ /**
+ * Constructs a post decrement node.
+ *
+ * @param Expr $var Variable
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ }
+
+ public function getSubNodeNames() {
+ return array('var');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php
new file mode 100644
index 0000000..54865ba
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class PostInc extends Expr
+{
+ /** @var Expr Variable */
+ public $var;
+
+ /**
+ * Constructs a post increment node.
+ *
+ * @param Expr $var Variable
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ }
+
+ public function getSubNodeNames() {
+ return array('var');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php
new file mode 100644
index 0000000..db30f51
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class PreDec extends Expr
+{
+ /** @var Expr Variable */
+ public $var;
+
+ /**
+ * Constructs a pre decrement node.
+ *
+ * @param Expr $var Variable
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ }
+
+ public function getSubNodeNames() {
+ return array('var');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php
new file mode 100644
index 0000000..0635602
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class PreInc extends Expr
+{
+ /** @var Expr Variable */
+ public $var;
+
+ /**
+ * Constructs a pre increment node.
+ *
+ * @param Expr $var Variable
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ }
+
+ public function getSubNodeNames() {
+ return array('var');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php
new file mode 100644
index 0000000..0666ab8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Print_ extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs an print() node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php
new file mode 100644
index 0000000..adcf21c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class PropertyFetch extends Expr
+{
+ /** @var Expr Variable holding object */
+ public $var;
+ /** @var string|Expr Property name */
+ public $name;
+
+ /**
+ * Constructs a function call node.
+ *
+ * @param Expr $var Variable holding object
+ * @param string|Expr $name Property name
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $var, $name, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->var = $var;
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() {
+ return array('var', 'name');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php
new file mode 100644
index 0000000..9516a32
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class ShellExec extends Expr
+{
+ /** @var array Encapsed string array */
+ public $parts;
+
+ /**
+ * Constructs a shell exec (backtick) node.
+ *
+ * @param array $parts Encapsed string array
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $parts, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->parts = $parts;
+ }
+
+ public function getSubNodeNames() {
+ return array('parts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php
new file mode 100644
index 0000000..5118f34
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+
+class StaticCall extends Expr
+{
+ /** @var Node\Name|Expr Class name */
+ public $class;
+ /** @var string|Expr Method name */
+ public $name;
+ /** @var Node\Arg[] Arguments */
+ public $args;
+
+ /**
+ * Constructs a static method call node.
+ *
+ * @param Node\Name|Expr $class Class name
+ * @param string|Expr $name Method name
+ * @param Node\Arg[] $args Arguments
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($class, $name, array $args = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->class = $class;
+ $this->name = $name;
+ $this->args = $args;
+ }
+
+ public function getSubNodeNames() {
+ return array('class', 'name', 'args');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php
new file mode 100644
index 0000000..477a69d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+
+class StaticPropertyFetch extends Expr
+{
+ /** @var Name|Expr Class name */
+ public $class;
+ /** @var string|Expr Property name */
+ public $name;
+
+ /**
+ * Constructs a static property fetch node.
+ *
+ * @param Name|Expr $class Class name
+ * @param string|Expr $name Property name
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($class, $name, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->class = $class;
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() {
+ return array('class', 'name');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php
new file mode 100644
index 0000000..5730139
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Ternary extends Expr
+{
+ /** @var Expr Condition */
+ public $cond;
+ /** @var null|Expr Expression for true */
+ public $if;
+ /** @var Expr Expression for false */
+ public $else;
+
+ /**
+ * Constructs a ternary operator node.
+ *
+ * @param Expr $cond Condition
+ * @param null|Expr $if Expression for true
+ * @param Expr $else Expression for false
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $cond, $if, Expr $else, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->cond = $cond;
+ $this->if = $if;
+ $this->else = $else;
+ }
+
+ public function getSubNodeNames() {
+ return array('cond', 'if', 'else');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php
new file mode 100644
index 0000000..94635d6
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class UnaryMinus extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs a unary minus node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php
new file mode 100644
index 0000000..6514120
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class UnaryPlus extends Expr
+{
+ /** @var Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs a unary plus node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php
new file mode 100644
index 0000000..3ae3ecd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Variable extends Expr
+{
+ /** @var string|Expr Name */
+ public $name;
+
+ /**
+ * Constructs a variable node.
+ *
+ * @param string|Expr $name Name
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() {
+ return array('name');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php
new file mode 100644
index 0000000..993c82c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class YieldFrom extends Expr
+{
+ /** @var Expr Expression to yield from */
+ public $expr;
+
+ /**
+ * Constructs an "yield from" node.
+ *
+ * @param Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php
new file mode 100644
index 0000000..f3ca88e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Expr;
+
+use PhpParser\Node\Expr;
+
+class Yield_ extends Expr
+{
+ /** @var null|Expr Key expression */
+ public $key;
+ /** @var null|Expr Value expression */
+ public $value;
+
+ /**
+ * Constructs a yield expression node.
+ *
+ * @param null|Expr $value Value expression
+ * @param null|Expr $key Key expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Expr $value = null, Expr $key = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->key = $key;
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() {
+ return array('key', 'value');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php
new file mode 100644
index 0000000..8256945
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace PhpParser\Node;
+
+use PhpParser\Node;
+
+interface FunctionLike extends Node
+{
+ /**
+ * Whether to return by reference
+ *
+ * @return bool
+ */
+ public function returnsByRef();
+
+ /**
+ * List of parameters
+ *
+ * @return Node\Param[]
+ */
+ public function getParams();
+
+ /**
+ * Get the declared return type or null
+ *
+ * @return null|string|Node\Name|Node\NullableType
+ */
+ public function getReturnType();
+
+ /**
+ * The function body
+ *
+ * @return Node\Stmt[]
+ */
+ public function getStmts();
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php
new file mode 100644
index 0000000..d3d33ea
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php
@@ -0,0 +1,197 @@
+<?php
+
+namespace PhpParser\Node;
+
+use PhpParser\NodeAbstract;
+
+class Name extends NodeAbstract
+{
+ /**
+ * @var string[] Parts of the name
+ * @deprecated Avoid directly accessing $parts, use methods instead.
+ */
+ public $parts;
+
+ /**
+ * Constructs a name node.
+ *
+ * @param string|array|self $name Name as string, part array or Name instance (copy ctor)
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->parts = self::prepareName($name);
+ }
+
+ public function getSubNodeNames() {
+ return array('parts');
+ }
+
+ /**
+ * Gets the first part of the name, i.e. everything before the first namespace separator.
+ *
+ * @return string First part of the name
+ */
+ public function getFirst() {
+ return $this->parts[0];
+ }
+
+ /**
+ * Gets the last part of the name, i.e. everything after the last namespace separator.
+ *
+ * @return string Last part of the name
+ */
+ public function getLast() {
+ return $this->parts[count($this->parts) - 1];
+ }
+
+ /**
+ * Checks whether the name is unqualified. (E.g. Name)
+ *
+ * @return bool Whether the name is unqualified
+ */
+ public function isUnqualified() {
+ return 1 == count($this->parts);
+ }
+
+ /**
+ * Checks whether the name is qualified. (E.g. Name\Name)
+ *
+ * @return bool Whether the name is qualified
+ */
+ public function isQualified() {
+ return 1 < count($this->parts);
+ }
+
+ /**
+ * Checks whether the name is fully qualified. (E.g. \Name)
+ *
+ * @return bool Whether the name is fully qualified
+ */
+ public function isFullyQualified() {
+ return false;
+ }
+
+ /**
+ * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
+ *
+ * @return bool Whether the name is relative
+ */
+ public function isRelative() {
+ return false;
+ }
+
+ /**
+ * Returns a string representation of the name by imploding the namespace parts with the
+ * namespace separator.
+ *
+ * @return string String representation
+ */
+ public function toString() {
+ return implode('\\', $this->parts);
+ }
+
+ /**
+ * Returns a string representation of the name by imploding the namespace parts with the
+ * namespace separator.
+ *
+ * @return string String representation
+ */
+ public function __toString() {
+ return implode('\\', $this->parts);
+ }
+
+ /**
+ * Gets a slice of a name (similar to array_slice).
+ *
+ * This method returns a new instance of the same type as the original and with the same
+ * attributes.
+ *
+ * If the slice is empty, null is returned. The null value will be correctly handled in
+ * concatenations using concat().
+ *
+ * Offset and length have the same meaning as in array_slice().
+ *
+ * @param int $offset Offset to start the slice at (may be negative)
+ * @param int|null $length Length of the slice (may be negative)
+ *
+ * @return static|null Sliced name
+ */
+ public function slice($offset, $length = null) {
+ $numParts = count($this->parts);
+
+ $realOffset = $offset < 0 ? $offset + $numParts : $offset;
+ if ($realOffset < 0 || $realOffset > $numParts) {
+ throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset));
+ }
+
+ if (null === $length) {
+ $realLength = $numParts - $realOffset;
+ } else {
+ $realLength = $length < 0 ? $length + $numParts - $realOffset : $length;
+ if ($realLength < 0 || $realLength > $numParts) {
+ throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length));
+ }
+ }
+
+ if ($realLength === 0) {
+ // Empty slice is represented as null
+ return null;
+ }
+
+ return new static(array_slice($this->parts, $realOffset, $realLength), $this->attributes);
+ }
+
+ /**
+ * Concatenate two names, yielding a new Name instance.
+ *
+ * The type of the generated instance depends on which class this method is called on, for
+ * example Name\FullyQualified::concat() will yield a Name\FullyQualified instance.
+ *
+ * If one of the arguments is null, a new instance of the other name will be returned. If both
+ * arguments are null, null will be returned. As such, writing
+ * Name::concat($namespace, $shortName)
+ * where $namespace is a Name node or null will work as expected.
+ *
+ * @param string|array|self|null $name1 The first name
+ * @param string|array|self|null $name2 The second name
+ * @param array $attributes Attributes to assign to concatenated name
+ *
+ * @return static|null Concatenated name
+ */
+ public static function concat($name1, $name2, array $attributes = []) {
+ if (null === $name1 && null === $name2) {
+ return null;
+ } elseif (null === $name1) {
+ return new static(self::prepareName($name2), $attributes);
+ } else if (null === $name2) {
+ return new static(self::prepareName($name1), $attributes);
+ } else {
+ return new static(
+ array_merge(self::prepareName($name1), self::prepareName($name2)), $attributes
+ );
+ }
+ }
+
+ /**
+ * Prepares a (string, array or Name node) name for use in name changing methods by converting
+ * it to an array.
+ *
+ * @param string|array|self $name Name to prepare
+ *
+ * @return array Prepared name
+ */
+ private static function prepareName($name) {
+ if (\is_string($name)) {
+ return explode('\\', $name);
+ } elseif (\is_array($name)) {
+ return $name;
+ } elseif ($name instanceof self) {
+ return $name->parts;
+ }
+
+ throw new \InvalidArgumentException(
+ 'Expected string, array of parts or Name instance'
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php
new file mode 100644
index 0000000..97cc111
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace PhpParser\Node\Name;
+
+class FullyQualified extends \PhpParser\Node\Name
+{
+ /**
+ * Checks whether the name is unqualified. (E.g. Name)
+ *
+ * @return bool Whether the name is unqualified
+ */
+ public function isUnqualified() {
+ return false;
+ }
+
+ /**
+ * Checks whether the name is qualified. (E.g. Name\Name)
+ *
+ * @return bool Whether the name is qualified
+ */
+ public function isQualified() {
+ return false;
+ }
+
+ /**
+ * Checks whether the name is fully qualified. (E.g. \Name)
+ *
+ * @return bool Whether the name is fully qualified
+ */
+ public function isFullyQualified() {
+ return true;
+ }
+
+ /**
+ * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
+ *
+ * @return bool Whether the name is relative
+ */
+ public function isRelative() {
+ return false;
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php
new file mode 100644
index 0000000..25676ce
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace PhpParser\Node\Name;
+
+class Relative extends \PhpParser\Node\Name
+{
+ /**
+ * Checks whether the name is unqualified. (E.g. Name)
+ *
+ * @return bool Whether the name is unqualified
+ */
+ public function isUnqualified() {
+ return false;
+ }
+
+ /**
+ * Checks whether the name is qualified. (E.g. Name\Name)
+ *
+ * @return bool Whether the name is qualified
+ */
+ public function isQualified() {
+ return false;
+ }
+
+ /**
+ * Checks whether the name is fully qualified. (E.g. \Name)
+ *
+ * @return bool Whether the name is fully qualified
+ */
+ public function isFullyQualified() {
+ return false;
+ }
+
+ /**
+ * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name)
+ *
+ * @return bool Whether the name is relative
+ */
+ public function isRelative() {
+ return true;
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php
new file mode 100644
index 0000000..d887b32
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node;
+
+use PhpParser\NodeAbstract;
+
+class NullableType extends NodeAbstract
+{
+ /** @var string|Name Type */
+ public $type;
+
+ /**
+ * Constructs a nullable type (wrapping another type).
+ *
+ * @param string|Name $type Type
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($type, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->type = $type;
+ }
+
+ public function getSubNodeNames() {
+ return array('type');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php
new file mode 100644
index 0000000..b35ee4e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace PhpParser\Node;
+
+use PhpParser\NodeAbstract;
+
+class Param extends NodeAbstract
+{
+ /** @var null|string|Name|NullableType Typehint */
+ public $type;
+ /** @var bool Whether parameter is passed by reference */
+ public $byRef;
+ /** @var bool Whether this is a variadic argument */
+ public $variadic;
+ /** @var string Name */
+ public $name;
+ /** @var null|Expr Default value */
+ public $default;
+
+ /**
+ * Constructs a parameter node.
+ *
+ * @param string $name Name
+ * @param null|Expr $default Default value
+ * @param null|string|Name|NullableType $type Typehint
+ * @param bool $byRef Whether is passed by reference
+ * @param bool $variadic Whether this is a variadic argument
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, Expr $default = null, $type = null, $byRef = false, $variadic = false, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->type = $type;
+ $this->byRef = $byRef;
+ $this->variadic = $variadic;
+ $this->name = $name;
+ $this->default = $default;
+ }
+
+ public function getSubNodeNames() {
+ return array('type', 'byRef', 'variadic', 'name', 'default');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php
new file mode 100644
index 0000000..0117753
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace PhpParser\Node;
+
+abstract class Scalar extends Expr
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php
new file mode 100644
index 0000000..84ef75d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php
@@ -0,0 +1,64 @@
+<?php
+
+namespace PhpParser\Node\Scalar;
+
+use PhpParser\Node\Scalar;
+
+class DNumber extends Scalar
+{
+ /** @var float Number value */
+ public $value;
+
+ /**
+ * Constructs a float number scalar node.
+ *
+ * @param float $value Value of the number
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($value, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() {
+ return array('value');
+ }
+
+ /**
+ * @internal
+ *
+ * Parses a DNUMBER token like PHP would.
+ *
+ * @param string $str A string number
+ *
+ * @return float The parsed number
+ */
+ public static function parse($str) {
+ // if string contains any of .eE just cast it to float
+ if (false !== strpbrk($str, '.eE')) {
+ return (float) $str;
+ }
+
+ // otherwise it's an integer notation that overflowed into a float
+ // if it starts with 0 it's one of the special integer notations
+ if ('0' === $str[0]) {
+ // hex
+ if ('x' === $str[1] || 'X' === $str[1]) {
+ return hexdec($str);
+ }
+
+ // bin
+ if ('b' === $str[1] || 'B' === $str[1]) {
+ return bindec($str);
+ }
+
+ // oct
+ // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit (8 or 9)
+ // so that only the digits before that are used
+ return octdec(substr($str, 0, strcspn($str, '89')));
+ }
+
+ // dec
+ return (float) $str;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php
new file mode 100644
index 0000000..4f9b433
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace PhpParser\Node\Scalar;
+
+use PhpParser\Node\Expr;
+use PhpParser\Node\Scalar;
+
+class Encapsed extends Scalar
+{
+ /** @var Expr[] list of string parts */
+ public $parts;
+
+ /**
+ * Constructs an encapsed string node.
+ *
+ * @param array $parts Encaps list
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $parts, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->parts = $parts;
+ }
+
+ public function getSubNodeNames() {
+ return array('parts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php
new file mode 100644
index 0000000..50cb1af
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Scalar;
+
+use PhpParser\Node\Scalar;
+
+class EncapsedStringPart extends Scalar
+{
+ /** @var string String value */
+ public $value;
+
+ /**
+ * Constructs a node representing a string part of an encapsed string.
+ *
+ * @param string $value String value
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($value, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() {
+ return array('value');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
new file mode 100644
index 0000000..3559b98
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php
@@ -0,0 +1,67 @@
+<?php
+
+namespace PhpParser\Node\Scalar;
+
+use PhpParser\Error;
+use PhpParser\Node\Scalar;
+
+class LNumber extends Scalar
+{
+ /* For use in "kind" attribute */
+ const KIND_BIN = 2;
+ const KIND_OCT = 8;
+ const KIND_DEC = 10;
+ const KIND_HEX = 16;
+
+ /** @var int Number value */
+ public $value;
+
+ /**
+ * Constructs an integer number scalar node.
+ *
+ * @param int $value Value of the number
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($value, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() {
+ return array('value');
+ }
+
+ /**
+ * Constructs an LNumber node from a string number literal.
+ *
+ * @param string $str String number literal (decimal, octal, hex or binary)
+ * @param array $attributes Additional attributes
+ * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5)
+ *
+ * @return LNumber The constructed LNumber, including kind attribute
+ */
+ public static function fromString($str, array $attributes = array(), $allowInvalidOctal = false) {
+ if ('0' !== $str[0] || '0' === $str) {
+ $attributes['kind'] = LNumber::KIND_DEC;
+ return new LNumber((int) $str, $attributes);
+ }
+
+ if ('x' === $str[1] || 'X' === $str[1]) {
+ $attributes['kind'] = LNumber::KIND_HEX;
+ return new LNumber(hexdec($str), $attributes);
+ }
+
+ if ('b' === $str[1] || 'B' === $str[1]) {
+ $attributes['kind'] = LNumber::KIND_BIN;
+ return new LNumber(bindec($str), $attributes);
+ }
+
+ if (!$allowInvalidOctal && strpbrk($str, '89')) {
+ throw new Error('Invalid numeric literal', $attributes);
+ }
+
+ // use intval instead of octdec to get proper cutting behavior with malformed numbers
+ $attributes['kind'] = LNumber::KIND_OCT;
+ return new LNumber(intval($str, 8), $attributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php
new file mode 100644
index 0000000..a50d68f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace PhpParser\Node\Scalar;
+
+use PhpParser\Node\Scalar;
+
+abstract class MagicConst extends Scalar
+{
+ /**
+ * Constructs a magic constant node.
+ *
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $attributes = array()) {
+ parent::__construct($attributes);
+ }
+
+ public function getSubNodeNames() {
+ return array();
+ }
+
+ /**
+ * Get name of magic constant.
+ *
+ * @return string Name of magic constant
+ */
+ abstract public function getName();
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php
new file mode 100644
index 0000000..3466b21
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace PhpParser\Node\Scalar\MagicConst;
+
+use PhpParser\Node\Scalar\MagicConst;
+
+class Class_ extends MagicConst
+{
+ public function getName() {
+ return '__CLASS__';
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php
new file mode 100644
index 0000000..9a86ae9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace PhpParser\Node\Scalar\MagicConst;
+
+use PhpParser\Node\Scalar\MagicConst;
+
+class Dir extends MagicConst
+{
+ public function getName() {
+ return '__DIR__';
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php
new file mode 100644
index 0000000..db293ef
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace PhpParser\Node\Scalar\MagicConst;
+
+use PhpParser\Node\Scalar\MagicConst;
+
+class File extends MagicConst
+{
+ public function getName() {
+ return '__FILE__';
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php
new file mode 100644
index 0000000..435a8ae
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace PhpParser\Node\Scalar\MagicConst;
+
+use PhpParser\Node\Scalar\MagicConst;
+
+class Function_ extends MagicConst
+{
+ public function getName() {
+ return '__FUNCTION__';
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php
new file mode 100644
index 0000000..35f89bc
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace PhpParser\Node\Scalar\MagicConst;
+
+use PhpParser\Node\Scalar\MagicConst;
+
+class Line extends MagicConst
+{
+ public function getName() {
+ return '__LINE__';
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php
new file mode 100644
index 0000000..7791b9d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace PhpParser\Node\Scalar\MagicConst;
+
+use PhpParser\Node\Scalar\MagicConst;
+
+class Method extends MagicConst
+{
+ public function getName() {
+ return '__METHOD__';
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php
new file mode 100644
index 0000000..07f5aff
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace PhpParser\Node\Scalar\MagicConst;
+
+use PhpParser\Node\Scalar\MagicConst;
+
+class Namespace_ extends MagicConst
+{
+ public function getName() {
+ return '__NAMESPACE__';
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php
new file mode 100644
index 0000000..1ac3f78
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace PhpParser\Node\Scalar\MagicConst;
+
+use PhpParser\Node\Scalar\MagicConst;
+
+class Trait_ extends MagicConst
+{
+ public function getName() {
+ return '__TRAIT__';
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php
new file mode 100644
index 0000000..d7bbf83
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php
@@ -0,0 +1,153 @@
+<?php
+
+namespace PhpParser\Node\Scalar;
+
+use PhpParser\Error;
+use PhpParser\Node\Scalar;
+
+class String_ extends Scalar
+{
+ /* For use in "kind" attribute */
+ const KIND_SINGLE_QUOTED = 1;
+ const KIND_DOUBLE_QUOTED = 2;
+ const KIND_HEREDOC = 3;
+ const KIND_NOWDOC = 4;
+
+ /** @var string String value */
+ public $value;
+
+ protected static $replacements = array(
+ '\\' => '\\',
+ '$' => '$',
+ 'n' => "\n",
+ 'r' => "\r",
+ 't' => "\t",
+ 'f' => "\f",
+ 'v' => "\v",
+ 'e' => "\x1B",
+ );
+
+ /**
+ * Constructs a string scalar node.
+ *
+ * @param string $value Value of the string
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($value, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() {
+ return array('value');
+ }
+
+ /**
+ * @internal
+ *
+ * Parses a string token.
+ *
+ * @param string $str String token content
+ * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
+ *
+ * @return string The parsed string
+ */
+ public static function parse($str, $parseUnicodeEscape = true) {
+ $bLength = 0;
+ if ('b' === $str[0] || 'B' === $str[0]) {
+ $bLength = 1;
+ }
+
+ if ('\'' === $str[$bLength]) {
+ return str_replace(
+ array('\\\\', '\\\''),
+ array( '\\', '\''),
+ substr($str, $bLength + 1, -1)
+ );
+ } else {
+ return self::parseEscapeSequences(
+ substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape
+ );
+ }
+ }
+
+ /**
+ * @internal
+ *
+ * Parses escape sequences in strings (all string types apart from single quoted).
+ *
+ * @param string $str String without quotes
+ * @param null|string $quote Quote type
+ * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
+ *
+ * @return string String with escape sequences parsed
+ */
+ public static function parseEscapeSequences($str, $quote, $parseUnicodeEscape = true) {
+ if (null !== $quote) {
+ $str = str_replace('\\' . $quote, $quote, $str);
+ }
+
+ $extra = '';
+ if ($parseUnicodeEscape) {
+ $extra = '|u\{([0-9a-fA-F]+)\}';
+ }
+
+ return preg_replace_callback(
+ '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~',
+ function($matches) {
+ $str = $matches[1];
+
+ if (isset(self::$replacements[$str])) {
+ return self::$replacements[$str];
+ } elseif ('x' === $str[0] || 'X' === $str[0]) {
+ return chr(hexdec($str));
+ } elseif ('u' === $str[0]) {
+ return self::codePointToUtf8(hexdec($matches[2]));
+ } else {
+ return chr(octdec($str));
+ }
+ },
+ $str
+ );
+ }
+
+ private static function codePointToUtf8($num) {
+ if ($num <= 0x7F) {
+ return chr($num);
+ }
+ if ($num <= 0x7FF) {
+ return chr(($num>>6) + 0xC0) . chr(($num&0x3F) + 0x80);
+ }
+ if ($num <= 0xFFFF) {
+ return chr(($num>>12) + 0xE0) . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80);
+ }
+ if ($num <= 0x1FFFFF) {
+ return chr(($num>>18) + 0xF0) . chr((($num>>12)&0x3F) + 0x80)
+ . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80);
+ }
+ throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large');
+ }
+
+ /**
+ * @internal
+ *
+ * Parses a constant doc string.
+ *
+ * @param string $startToken Doc string start token content (<<<SMTHG)
+ * @param string $str String token content
+ * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes
+ *
+ * @return string Parsed string
+ */
+ public static function parseDocString($startToken, $str, $parseUnicodeEscape = true) {
+ // strip last newline (thanks tokenizer for sticking it into the string!)
+ $str = preg_replace('~(\r\n|\n|\r)\z~', '', $str);
+
+ // nowdoc string
+ if (false !== strpos($startToken, '\'')) {
+ return $str;
+ }
+
+ return self::parseEscapeSequences($str, null, $parseUnicodeEscape);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php
new file mode 100644
index 0000000..baa2f3e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace PhpParser\Node;
+
+use PhpParser\NodeAbstract;
+
+abstract class Stmt extends NodeAbstract
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php
new file mode 100644
index 0000000..c177c9a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Break_ extends Node\Stmt
+{
+ /** @var null|Node\Expr Number of loops to break */
+ public $num;
+
+ /**
+ * Constructs a break node.
+ *
+ * @param null|Node\Expr $num Number of loops to break
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $num = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->num = $num;
+ }
+
+ public function getSubNodeNames() {
+ return array('num');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php
new file mode 100644
index 0000000..03f892c
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Case_ extends Node\Stmt
+{
+ /** @var null|Node\Expr $cond Condition (null for default) */
+ public $cond;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a case node.
+ *
+ * @param null|Node\Expr $cond Condition (null for default)
+ * @param Node[] $stmts Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($cond, array $stmts = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->cond = $cond;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() {
+ return array('cond', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php
new file mode 100644
index 0000000..58337ad
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Catch_ extends Node\Stmt
+{
+ /** @var Node\Name[] Types of exceptions to catch */
+ public $types;
+ /** @var string Variable for exception */
+ public $var;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a catch node.
+ *
+ * @param Node\Name[] $types Types of exceptions to catch
+ * @param string $var Variable for exception
+ * @param Node[] $stmts Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $types, $var, array $stmts = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->types = $types;
+ $this->var = $var;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() {
+ return array('types', 'var', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php
new file mode 100644
index 0000000..5e566fc
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php
@@ -0,0 +1,47 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class ClassConst extends Node\Stmt
+{
+ /** @var int Modifiers */
+ public $flags;
+ /** @var Node\Const_[] Constant declarations */
+ public $consts;
+
+ /**
+ * Constructs a class const list node.
+ *
+ * @param Node\Const_[] $consts Constant declarations
+ * @param int $flags Modifiers
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $consts, $flags = 0, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->flags = $flags;
+ $this->consts = $consts;
+ }
+
+ public function getSubNodeNames() {
+ return array('flags', 'consts');
+ }
+
+ public function isPublic() {
+ return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
+ || ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0;
+ }
+
+ public function isProtected() {
+ return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
+ }
+
+ public function isPrivate() {
+ return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);
+ }
+
+ public function isStatic() {
+ return (bool) ($this->flags & Class_::MODIFIER_STATIC);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php
new file mode 100644
index 0000000..f905335
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php
@@ -0,0 +1,44 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+abstract class ClassLike extends Node\Stmt {
+ /** @var string|null Name */
+ public $name;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Gets all methods defined directly in this class/interface/trait
+ *
+ * @return ClassMethod[]
+ */
+ public function getMethods() {
+ $methods = array();
+ foreach ($this->stmts as $stmt) {
+ if ($stmt instanceof ClassMethod) {
+ $methods[] = $stmt;
+ }
+ }
+ return $methods;
+ }
+
+ /**
+ * Gets method with the given name defined directly in this class/interface/trait.
+ *
+ * @param string $name Name of the method (compared case-insensitively)
+ *
+ * @return ClassMethod|null Method node or null if the method does not exist
+ */
+ public function getMethod($name) {
+ $lowerName = strtolower($name);
+ foreach ($this->stmts as $stmt) {
+ if ($stmt instanceof ClassMethod && $lowerName === strtolower($stmt->name)) {
+ return $stmt;
+ }
+ }
+ return null;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php
new file mode 100644
index 0000000..6391c41
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php
@@ -0,0 +1,94 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+use PhpParser\Node\FunctionLike;
+
+class ClassMethod extends Node\Stmt implements FunctionLike
+{
+ /** @var int Flags */
+ public $flags;
+ /** @var bool Whether to return by reference */
+ public $byRef;
+ /** @var string Name */
+ public $name;
+ /** @var Node\Param[] Parameters */
+ public $params;
+ /** @var null|string|Node\Name|Node\NullableType Return type */
+ public $returnType;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /** @deprecated Use $flags instead */
+ public $type;
+
+ /**
+ * Constructs a class method node.
+ *
+ * @param string $name Name
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'flags => MODIFIER_PUBLIC: Flags
+ * 'byRef' => false : Whether to return by reference
+ * 'params' => array() : Parameters
+ * 'returnType' => null : Return type
+ * 'stmts' => array() : Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->flags = isset($subNodes['flags']) ? $subNodes['flags']
+ : (isset($subNodes['type']) ? $subNodes['type'] : 0);
+ $this->type = $this->flags;
+ $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
+ $this->name = $name;
+ $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
+ $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
+ $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : array();
+ }
+
+ public function getSubNodeNames() {
+ return array('flags', 'byRef', 'name', 'params', 'returnType', 'stmts');
+ }
+
+ public function returnsByRef() {
+ return $this->byRef;
+ }
+
+ public function getParams() {
+ return $this->params;
+ }
+
+ public function getReturnType() {
+ return $this->returnType;
+ }
+
+ public function getStmts() {
+ return $this->stmts;
+ }
+
+ public function isPublic() {
+ return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
+ || ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0;
+ }
+
+ public function isProtected() {
+ return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
+ }
+
+ public function isPrivate() {
+ return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);
+ }
+
+ public function isAbstract() {
+ return (bool) ($this->flags & Class_::MODIFIER_ABSTRACT);
+ }
+
+ public function isFinal() {
+ return (bool) ($this->flags & Class_::MODIFIER_FINAL);
+ }
+
+ public function isStatic() {
+ return (bool) ($this->flags & Class_::MODIFIER_STATIC);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php
new file mode 100644
index 0000000..7e624da
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php
@@ -0,0 +1,97 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Error;
+use PhpParser\Node;
+
+class Class_ extends ClassLike
+{
+ const MODIFIER_PUBLIC = 1;
+ const MODIFIER_PROTECTED = 2;
+ const MODIFIER_PRIVATE = 4;
+ const MODIFIER_STATIC = 8;
+ const MODIFIER_ABSTRACT = 16;
+ const MODIFIER_FINAL = 32;
+
+ const VISIBILITY_MODIFER_MASK = 7; // 1 | 2 | 4
+
+ /** @var int Type */
+ public $flags;
+ /** @var null|Node\Name Name of extended class */
+ public $extends;
+ /** @var Node\Name[] Names of implemented interfaces */
+ public $implements;
+
+ /** @deprecated Use $flags instead */
+ public $type;
+
+ protected static $specialNames = array(
+ 'self' => true,
+ 'parent' => true,
+ 'static' => true,
+ );
+
+ /**
+ * Constructs a class node.
+ *
+ * @param string|null $name Name
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'flags' => 0 : Flags
+ * 'extends' => null : Name of extended class
+ * 'implements' => array(): Names of implemented interfaces
+ * 'stmts' => array(): Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->flags = isset($subNodes['flags']) ? $subNodes['flags']
+ : (isset($subNodes['type']) ? $subNodes['type'] : 0);
+ $this->type = $this->flags;
+ $this->name = $name;
+ $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : null;
+ $this->implements = isset($subNodes['implements']) ? $subNodes['implements'] : array();
+ $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
+ }
+
+ public function getSubNodeNames() {
+ return array('flags', 'name', 'extends', 'implements', 'stmts');
+ }
+
+ public function isAbstract() {
+ return (bool) ($this->flags & self::MODIFIER_ABSTRACT);
+ }
+
+ public function isFinal() {
+ return (bool) ($this->flags & self::MODIFIER_FINAL);
+ }
+
+ public function isAnonymous() {
+ return null === $this->name;
+ }
+
+ /**
+ * @internal
+ */
+ public static function verifyModifier($a, $b) {
+ if ($a & self::VISIBILITY_MODIFER_MASK && $b & self::VISIBILITY_MODIFER_MASK) {
+ throw new Error('Multiple access type modifiers are not allowed');
+ }
+
+ if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) {
+ throw new Error('Multiple abstract modifiers are not allowed');
+ }
+
+ if ($a & self::MODIFIER_STATIC && $b & self::MODIFIER_STATIC) {
+ throw new Error('Multiple static modifiers are not allowed');
+ }
+
+ if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) {
+ throw new Error('Multiple final modifiers are not allowed');
+ }
+
+ if ($a & 48 && $b & 48) {
+ throw new Error('Cannot use the final modifier on an abstract class member');
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php
new file mode 100644
index 0000000..8b2eecd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Const_ extends Node\Stmt
+{
+ /** @var Node\Const_[] Constant declarations */
+ public $consts;
+
+ /**
+ * Constructs a const list node.
+ *
+ * @param Node\Const_[] $consts Constant declarations
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $consts, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->consts = $consts;
+ }
+
+ public function getSubNodeNames() {
+ return array('consts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php
new file mode 100644
index 0000000..f78e19a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Continue_ extends Node\Stmt
+{
+ /** @var null|Node\Expr Number of loops to continue */
+ public $num;
+
+ /**
+ * Constructs a continue node.
+ *
+ * @param null|Node\Expr $num Number of loops to continue
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $num = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->num = $num;
+ }
+
+ public function getSubNodeNames() {
+ return array('num');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php
new file mode 100644
index 0000000..829dbaf
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class DeclareDeclare extends Node\Stmt
+{
+ /** @var string Key */
+ public $key;
+ /** @var Node\Expr Value */
+ public $value;
+
+ /**
+ * Constructs a declare key=>value pair node.
+ *
+ * @param string $key Key
+ * @param Node\Expr $value Value
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($key, Node\Expr $value, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->key = $key;
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() {
+ return array('key', 'value');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php
new file mode 100644
index 0000000..32739f3
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Declare_ extends Node\Stmt
+{
+ /** @var DeclareDeclare[] List of declares */
+ public $declares;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a declare node.
+ *
+ * @param DeclareDeclare[] $declares List of declares
+ * @param Node[]|null $stmts Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $declares, array $stmts = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->declares = $declares;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() {
+ return array('declares', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php
new file mode 100644
index 0000000..dd4c6c8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Do_ extends Node\Stmt
+{
+ /** @var Node\Expr Condition */
+ public $cond;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a do while node.
+ *
+ * @param Node\Expr $cond Condition
+ * @param Node[] $stmts Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $cond, array $stmts = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->cond = $cond;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() {
+ return array('cond', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php
new file mode 100644
index 0000000..11e1070
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Echo_ extends Node\Stmt
+{
+ /** @var Node\Expr[] Expressions */
+ public $exprs;
+
+ /**
+ * Constructs an echo node.
+ *
+ * @param Node\Expr[] $exprs Expressions
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $exprs, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->exprs = $exprs;
+ }
+
+ public function getSubNodeNames() {
+ return array('exprs');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php
new file mode 100644
index 0000000..608878f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class ElseIf_ extends Node\Stmt
+{
+ /** @var Node\Expr Condition */
+ public $cond;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs an elseif node.
+ *
+ * @param Node\Expr $cond Condition
+ * @param Node[] $stmts Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $cond, array $stmts = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->cond = $cond;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() {
+ return array('cond', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php
new file mode 100644
index 0000000..c91a148
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Else_ extends Node\Stmt
+{
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs an else node.
+ *
+ * @param Node[] $stmts Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $stmts = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() {
+ return array('stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php
new file mode 100644
index 0000000..0e3eabb
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Finally_ extends Node\Stmt
+{
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a finally node.
+ *
+ * @param Node[] $stmts Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $stmts = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() {
+ return array('stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php
new file mode 100644
index 0000000..2ca88a3
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class For_ extends Node\Stmt
+{
+ /** @var Node\Expr[] Init expressions */
+ public $init;
+ /** @var Node\Expr[] Loop conditions */
+ public $cond;
+ /** @var Node\Expr[] Loop expressions */
+ public $loop;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a for loop node.
+ *
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'init' => array(): Init expressions
+ * 'cond' => array(): Loop conditions
+ * 'loop' => array(): Loop expressions
+ * 'stmts' => array(): Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->init = isset($subNodes['init']) ? $subNodes['init'] : array();
+ $this->cond = isset($subNodes['cond']) ? $subNodes['cond'] : array();
+ $this->loop = isset($subNodes['loop']) ? $subNodes['loop'] : array();
+ $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
+ }
+
+ public function getSubNodeNames() {
+ return array('init', 'cond', 'loop', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php
new file mode 100644
index 0000000..d2c6432
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Foreach_ extends Node\Stmt
+{
+ /** @var Node\Expr Expression to iterate */
+ public $expr;
+ /** @var null|Node\Expr Variable to assign key to */
+ public $keyVar;
+ /** @var bool Whether to assign value by reference */
+ public $byRef;
+ /** @var Node\Expr Variable to assign value to */
+ public $valueVar;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a foreach node.
+ *
+ * @param Node\Expr $expr Expression to iterate
+ * @param Node\Expr $valueVar Variable to assign value to
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'keyVar' => null : Variable to assign key to
+ * 'byRef' => false : Whether to assign value by reference
+ * 'stmts' => array(): Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ $this->keyVar = isset($subNodes['keyVar']) ? $subNodes['keyVar'] : null;
+ $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
+ $this->valueVar = $valueVar;
+ $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
+ }
+
+ public function getSubNodeNames() {
+ return array('expr', 'keyVar', 'byRef', 'valueVar', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php
new file mode 100644
index 0000000..4c1f48d
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php
@@ -0,0 +1,60 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+use PhpParser\Node\FunctionLike;
+
+class Function_ extends Node\Stmt implements FunctionLike
+{
+ /** @var bool Whether function returns by reference */
+ public $byRef;
+ /** @var string Name */
+ public $name;
+ /** @var Node\Param[] Parameters */
+ public $params;
+ /** @var null|string|Node\Name|Node\NullableType Return type */
+ public $returnType;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a function node.
+ *
+ * @param string $name Name
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'byRef' => false : Whether to return by reference
+ * 'params' => array(): Parameters
+ * 'returnType' => null : Return type
+ * 'stmts' => array(): Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
+ $this->name = $name;
+ $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
+ $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
+ $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
+ }
+
+ public function getSubNodeNames() {
+ return array('byRef', 'name', 'params', 'returnType', 'stmts');
+ }
+
+ public function returnsByRef() {
+ return $this->byRef;
+ }
+
+ public function getParams() {
+ return $this->params;
+ }
+
+ public function getReturnType() {
+ return $this->returnType;
+ }
+
+ public function getStmts() {
+ return $this->stmts;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php
new file mode 100644
index 0000000..29fbc48
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Global_ extends Node\Stmt
+{
+ /** @var Node\Expr[] Variables */
+ public $vars;
+
+ /**
+ * Constructs a global variables list node.
+ *
+ * @param Node\Expr[] $vars Variables to unset
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $vars, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->vars = $vars;
+ }
+
+ public function getSubNodeNames() {
+ return array('vars');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php
new file mode 100644
index 0000000..b087fe0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node\Stmt;
+
+class Goto_ extends Stmt
+{
+ /** @var string Name of label to jump to */
+ public $name;
+
+ /**
+ * Constructs a goto node.
+ *
+ * @param string $name Name of label to jump to
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() {
+ return array('name');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php
new file mode 100644
index 0000000..30837dd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node\Name;
+use PhpParser\Node\Stmt;
+
+class GroupUse extends Stmt
+{
+ /** @var int Type of group use */
+ public $type;
+ /** @var Name Prefix for uses */
+ public $prefix;
+ /** @var UseUse[] Uses */
+ public $uses;
+
+ /**
+ * Constructs a group use node.
+ *
+ * @param Name $prefix Prefix for uses
+ * @param UseUse[] $uses Uses
+ * @param int $type Type of group use
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Name $prefix, array $uses, $type = Use_::TYPE_NORMAL, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->type = $type;
+ $this->prefix = $prefix;
+ $this->uses = $uses;
+ }
+
+ public function getSubNodeNames() {
+ return array('type', 'prefix', 'uses');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php
new file mode 100644
index 0000000..c33ec9f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node\Stmt;
+
+class HaltCompiler extends Stmt
+{
+ /** @var string Remaining text after halt compiler statement. */
+ public $remaining;
+
+ /**
+ * Constructs a __halt_compiler node.
+ *
+ * @param string $remaining Remaining text after halt compiler statement.
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($remaining, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->remaining = $remaining;
+ }
+
+ public function getSubNodeNames() {
+ return array('remaining');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php
new file mode 100644
index 0000000..98bda35
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class If_ extends Node\Stmt
+{
+ /** @var Node\Expr Condition expression */
+ public $cond;
+ /** @var Node[] Statements */
+ public $stmts;
+ /** @var ElseIf_[] Elseif clauses */
+ public $elseifs;
+ /** @var null|Else_ Else clause */
+ public $else;
+
+ /**
+ * Constructs an if node.
+ *
+ * @param Node\Expr $cond Condition
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'stmts' => array(): Statements
+ * 'elseifs' => array(): Elseif clauses
+ * 'else' => null : Else clause
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $cond, array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->cond = $cond;
+ $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
+ $this->elseifs = isset($subNodes['elseifs']) ? $subNodes['elseifs'] : array();
+ $this->else = isset($subNodes['else']) ? $subNodes['else'] : null;
+ }
+
+ public function getSubNodeNames() {
+ return array('cond', 'stmts', 'elseifs', 'else');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php
new file mode 100644
index 0000000..accebe6
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node\Stmt;
+
+class InlineHTML extends Stmt
+{
+ /** @var string String */
+ public $value;
+
+ /**
+ * Constructs an inline HTML node.
+ *
+ * @param string $value String
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($value, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->value = $value;
+ }
+
+ public function getSubNodeNames() {
+ return array('value');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php
new file mode 100644
index 0000000..efb5891
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Interface_ extends ClassLike
+{
+ /** @var Node\Name[] Extended interfaces */
+ public $extends;
+
+ /**
+ * Constructs a class node.
+ *
+ * @param string $name Name
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'extends' => array(): Name of extended interfaces
+ * 'stmts' => array(): Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : array();
+ $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
+ }
+
+ public function getSubNodeNames() {
+ return array('name', 'extends', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php
new file mode 100644
index 0000000..edd0ee9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node\Stmt;
+
+class Label extends Stmt
+{
+ /** @var string Name */
+ public $name;
+
+ /**
+ * Constructs a label node.
+ *
+ * @param string $name Name
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ }
+
+ public function getSubNodeNames() {
+ return array('name');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php
new file mode 100644
index 0000000..8b2d48e
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Namespace_ extends Node\Stmt
+{
+ /** @var null|Node\Name Name */
+ public $name;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a namespace node.
+ *
+ * @param null|Node\Name $name Name
+ * @param null|Node[] $stmts Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Name $name = null, $stmts = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() {
+ return array('name', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php
new file mode 100644
index 0000000..270dd09
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+/** Nop/empty statement (;). */
+class Nop extends Node\Stmt
+{
+ public function getSubNodeNames() {
+ return array();
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php
new file mode 100644
index 0000000..2a94ca4
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php
@@ -0,0 +1,51 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Property extends Node\Stmt
+{
+ /** @var int Modifiers */
+ public $flags;
+ /** @var PropertyProperty[] Properties */
+ public $props;
+
+ /** @deprecated Use $flags instead */
+ public $type;
+
+ /**
+ * Constructs a class property list node.
+ *
+ * @param int $flags Modifiers
+ * @param PropertyProperty[] $props Properties
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($flags, array $props, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->flags = $flags;
+ $this->type = $flags;
+ $this->props = $props;
+ }
+
+ public function getSubNodeNames() {
+ return array('flags', 'props');
+ }
+
+ public function isPublic() {
+ return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0
+ || ($this->flags & Class_::VISIBILITY_MODIFER_MASK) === 0;
+ }
+
+ public function isProtected() {
+ return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);
+ }
+
+ public function isPrivate() {
+ return (bool) ($this->flags & Class_::MODIFIER_PRIVATE);
+ }
+
+ public function isStatic() {
+ return (bool) ($this->flags & Class_::MODIFIER_STATIC);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php
new file mode 100644
index 0000000..b2d29dc
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class PropertyProperty extends Node\Stmt
+{
+ /** @var string Name */
+ public $name;
+ /** @var null|Node\Expr Default */
+ public $default;
+
+ /**
+ * Constructs a class property node.
+ *
+ * @param string $name Name
+ * @param null|Node\Expr $default Default value
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, Node\Expr $default = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ $this->default = $default;
+ }
+
+ public function getSubNodeNames() {
+ return array('name', 'default');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php
new file mode 100644
index 0000000..b642841
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Return_ extends Node\Stmt
+{
+ /** @var null|Node\Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs a return node.
+ *
+ * @param null|Node\Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $expr = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php
new file mode 100644
index 0000000..4bc5dd2
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class StaticVar extends Node\Stmt
+{
+ /** @var string Name */
+ public $name;
+ /** @var null|Node\Expr Default value */
+ public $default;
+
+ /**
+ * Constructs a static variable node.
+ *
+ * @param string $name Name
+ * @param null|Node\Expr $default Default value
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, Node\Expr $default = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ $this->default = $default;
+ }
+
+ public function getSubNodeNames() {
+ return array('name', 'default');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php
new file mode 100644
index 0000000..37cc0b3
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node\Stmt;
+
+class Static_ extends Stmt
+{
+ /** @var StaticVar[] Variable definitions */
+ public $vars;
+
+ /**
+ * Constructs a static variables list node.
+ *
+ * @param StaticVar[] $vars Variable definitions
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $vars, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->vars = $vars;
+ }
+
+ public function getSubNodeNames() {
+ return array('vars');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php
new file mode 100644
index 0000000..72d667b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Switch_ extends Node\Stmt
+{
+ /** @var Node\Expr Condition */
+ public $cond;
+ /** @var Case_[] Case list */
+ public $cases;
+
+ /**
+ * Constructs a case node.
+ *
+ * @param Node\Expr $cond Condition
+ * @param Case_[] $cases Case list
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $cond, array $cases, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->cond = $cond;
+ $this->cases = $cases;
+ }
+
+ public function getSubNodeNames() {
+ return array('cond', 'cases');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php
new file mode 100644
index 0000000..f8ff6aa
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Throw_ extends Node\Stmt
+{
+ /** @var Node\Expr Expression */
+ public $expr;
+
+ /**
+ * Constructs a throw node.
+ *
+ * @param Node\Expr $expr Expression
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $expr, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->expr = $expr;
+ }
+
+ public function getSubNodeNames() {
+ return array('expr');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php
new file mode 100644
index 0000000..a29874b
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+
+class TraitUse extends Node\Stmt
+{
+ /** @var Node\Name[] Traits */
+ public $traits;
+ /** @var TraitUseAdaptation[] Adaptations */
+ public $adaptations;
+
+ /**
+ * Constructs a trait use node.
+ *
+ * @param Node\Name[] $traits Traits
+ * @param TraitUseAdaptation[] $adaptations Adaptations
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $traits, array $adaptations = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->traits = $traits;
+ $this->adaptations = $adaptations;
+ }
+
+ public function getSubNodeNames() {
+ return array('traits', 'adaptations');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php
new file mode 100644
index 0000000..c6038c8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+abstract class TraitUseAdaptation extends Node\Stmt
+{
+ /** @var Node\Name Trait name */
+ public $trait;
+ /** @var string Method name */
+ public $method;
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php
new file mode 100644
index 0000000..e9b5065
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace PhpParser\Node\Stmt\TraitUseAdaptation;
+
+use PhpParser\Node;
+
+class Alias extends Node\Stmt\TraitUseAdaptation
+{
+ /** @var null|int New modifier */
+ public $newModifier;
+ /** @var null|string New name */
+ public $newName;
+
+ /**
+ * Constructs a trait use precedence adaptation node.
+ *
+ * @param null|Node\Name $trait Trait name
+ * @param string $method Method name
+ * @param null|int $newModifier New modifier
+ * @param null|string $newName New name
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($trait, $method, $newModifier, $newName, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->trait = $trait;
+ $this->method = $method;
+ $this->newModifier = $newModifier;
+ $this->newName = $newName;
+ }
+
+ public function getSubNodeNames() {
+ return array('trait', 'method', 'newModifier', 'newName');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php
new file mode 100644
index 0000000..1f6bc1f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt\TraitUseAdaptation;
+
+use PhpParser\Node;
+
+class Precedence extends Node\Stmt\TraitUseAdaptation
+{
+ /** @var Node\Name[] Overwritten traits */
+ public $insteadof;
+
+ /**
+ * Constructs a trait use precedence adaptation node.
+ *
+ * @param Node\Name $trait Trait name
+ * @param string $method Method name
+ * @param Node\Name[] $insteadof Overwritten traits
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->trait = $trait;
+ $this->method = $method;
+ $this->insteadof = $insteadof;
+ }
+
+ public function getSubNodeNames() {
+ return array('trait', 'method', 'insteadof');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php
new file mode 100644
index 0000000..eed5844
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Trait_ extends ClassLike
+{
+ /**
+ * Constructs a trait node.
+ *
+ * @param string $name Name
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'stmts' => array(): Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct($name, array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->name = $name;
+ $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
+ }
+
+ public function getSubNodeNames() {
+ return array('name', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php
new file mode 100644
index 0000000..0ff36cc
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class TryCatch extends Node\Stmt
+{
+ /** @var Node[] Statements */
+ public $stmts;
+ /** @var Catch_[] Catches */
+ public $catches;
+ /** @var null|Finally_ Optional finally node */
+ public $finally;
+
+ /**
+ * Constructs a try catch node.
+ *
+ * @param Node[] $stmts Statements
+ * @param Catch_[] $catches Catches
+ * @param null|Finally_ $finally Optionaly finally node
+ * @param array|null $attributes Additional attributes
+ */
+ public function __construct(array $stmts, array $catches, Finally_ $finally = null, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->stmts = $stmts;
+ $this->catches = $catches;
+ $this->finally = $finally;
+ }
+
+ public function getSubNodeNames() {
+ return array('stmts', 'catches', 'finally');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php
new file mode 100644
index 0000000..0f00fe9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class Unset_ extends Node\Stmt
+{
+ /** @var Node\Expr[] Variables to unset */
+ public $vars;
+
+ /**
+ * Constructs an unset node.
+ *
+ * @param Node\Expr[] $vars Variables to unset
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $vars, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->vars = $vars;
+ }
+
+ public function getSubNodeNames() {
+ return array('vars');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php
new file mode 100644
index 0000000..2de8432
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php
@@ -0,0 +1,38 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class UseUse extends Node\Stmt
+{
+ /** @var int One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for mixed group uses */
+ public $type;
+ /** @var Node\Name Namespace, class, function or constant to alias */
+ public $name;
+ /** @var string Alias */
+ public $alias;
+
+ /**
+ * Constructs an alias (use) node.
+ *
+ * @param Node\Name $name Namespace/Class to alias
+ * @param null|string $alias Alias
+ * @param int $type Type of the use element (for mixed group use declarations only)
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Name $name, $alias = null, $type = Use_::TYPE_UNKNOWN, array $attributes = array()) {
+ if (null === $alias) {
+ $alias = $name->getLast();
+ }
+
+ parent::__construct($attributes);
+ $this->type = $type;
+ $this->name = $name;
+ $this->alias = $alias;
+ }
+
+ public function getSubNodeNames() {
+ return array('type', 'name', 'alias');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php
new file mode 100644
index 0000000..6c89ebb
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node\Stmt;
+
+class Use_ extends Stmt
+{
+ /**
+ * Unknown type. Both Stmt\Use_ / Stmt\GroupUse and Stmt\UseUse have a $type property, one of them will always be
+ * TYPE_UNKNOWN while the other has one of the three other possible types. For normal use statements the type on the
+ * Stmt\UseUse is unknown. It's only the other way around for mixed group use declarations.
+ */
+ const TYPE_UNKNOWN = 0;
+ /** Class or namespace import */
+ const TYPE_NORMAL = 1;
+ /** Function import */
+ const TYPE_FUNCTION = 2;
+ /** Constant import */
+ const TYPE_CONSTANT = 3;
+
+ /** @var int Type of alias */
+ public $type;
+ /** @var UseUse[] Aliases */
+ public $uses;
+
+ /**
+ * Constructs an alias (use) list node.
+ *
+ * @param UseUse[] $uses Aliases
+ * @param int $type Type of alias
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(array $uses, $type = self::TYPE_NORMAL, array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->type = $type;
+ $this->uses = $uses;
+ }
+
+ public function getSubNodeNames() {
+ return array('type', 'uses');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php
new file mode 100644
index 0000000..afad1b2
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class While_ extends Node\Stmt
+{
+ /** @var Node\Expr Condition */
+ public $cond;
+ /** @var Node[] Statements */
+ public $stmts;
+
+ /**
+ * Constructs a while node.
+ *
+ * @param Node\Expr $cond Condition
+ * @param Node[] $stmts Statements
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $cond, array $stmts = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->cond = $cond;
+ $this->stmts = $stmts;
+ }
+
+ public function getSubNodeNames() {
+ return array('cond', 'stmts');
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php
new file mode 100644
index 0000000..62a96da
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php
@@ -0,0 +1,111 @@
+<?php
+
+namespace PhpParser;
+
+abstract class NodeAbstract implements Node, \JsonSerializable
+{
+ protected $attributes;
+
+ /**
+ * Creates a Node.
+ *
+ * @param array $attributes Array of attributes
+ */
+ public function __construct(array $attributes = array()) {
+ $this->attributes = $attributes;
+ }
+
+ /**
+ * Gets the type of the node.
+ *
+ * @return string Type of the node
+ */
+ public function getType() {
+ return strtr(substr(rtrim(get_class($this), '_'), 15), '\\', '_');
+ }
+
+ /**
+ * Gets line the node started in.
+ *
+ * @return int Line
+ */
+ public function getLine() {
+ return $this->getAttribute('startLine', -1);
+ }
+
+ /**
+ * Sets line the node started in.
+ *
+ * @param int $line Line
+ */
+ public function setLine($line) {
+ $this->setAttribute('startLine', (int) $line);
+ }
+
+ /**
+ * Gets the doc comment of the node.
+ *
+ * The doc comment has to be the last comment associated with the node.
+ *
+ * @return null|Comment\Doc Doc comment object or null
+ */
+ public function getDocComment() {
+ $comments = $this->getAttribute('comments');
+ if (!$comments) {
+ return null;
+ }
+
+ $lastComment = $comments[count($comments) - 1];
+ if (!$lastComment instanceof Comment\Doc) {
+ return null;
+ }
+
+ return $lastComment;
+ }
+
+ /**
+ * Sets the doc comment of the node.
+ *
+ * This will either replace an existing doc comment or add it to the comments array.
+ *
+ * @param Comment\Doc $docComment Doc comment to set
+ */
+ public function setDocComment(Comment\Doc $docComment) {
+ $comments = $this->getAttribute('comments', []);
+
+ $numComments = count($comments);
+ if ($numComments > 0 && $comments[$numComments - 1] instanceof Comment\Doc) {
+ // Replace existing doc comment
+ $comments[$numComments - 1] = $docComment;
+ } else {
+ // Append new comment
+ $comments[] = $docComment;
+ }
+
+ $this->setAttribute('comments', $comments);
+ }
+
+ public function setAttribute($key, $value) {
+ $this->attributes[$key] = $value;
+ }
+
+ public function hasAttribute($key) {
+ return array_key_exists($key, $this->attributes);
+ }
+
+ public function &getAttribute($key, $default = null) {
+ if (!array_key_exists($key, $this->attributes)) {
+ return $default;
+ } else {
+ return $this->attributes[$key];
+ }
+ }
+
+ public function getAttributes() {
+ return $this->attributes;
+ }
+
+ public function jsonSerialize() {
+ return ['nodeType' => $this->getType()] + get_object_vars($this);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php
new file mode 100644
index 0000000..9946eb8
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php
@@ -0,0 +1,196 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Node\Expr\Include_;
+use PhpParser\Node\Stmt\Class_;
+use PhpParser\Node\Stmt\GroupUse;
+use PhpParser\Node\Stmt\Use_;
+use PhpParser\Node\Stmt\UseUse;
+
+class NodeDumper
+{
+ private $dumpComments;
+ private $dumpPositions;
+ private $code;
+
+ /**
+ * Constructs a NodeDumper.
+ *
+ * Supported options:
+ * * bool dumpComments: Whether comments should be dumped.
+ * * bool dumpPositions: Whether line/offset information should be dumped. To dump offset
+ * information, the code needs to be passed to dump().
+ *
+ * @param array $options Options (see description)
+ */
+ public function __construct(array $options = []) {
+ $this->dumpComments = !empty($options['dumpComments']);
+ $this->dumpPositions = !empty($options['dumpPositions']);
+ }
+
+ /**
+ * Dumps a node or array.
+ *
+ * @param array|Node $node Node or array to dump
+ * @param string|null $code Code corresponding to dumped AST. This only needs to be passed if
+ * the dumpPositions option is enabled and the dumping of node offsets
+ * is desired.
+ *
+ * @return string Dumped value
+ */
+ public function dump($node, $code = null) {
+ $this->code = $code;
+ return $this->dumpRecursive($node);
+ }
+
+ protected function dumpRecursive($node) {
+ if ($node instanceof Node) {
+ $r = $node->getType();
+ if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) {
+ $r .= $p;
+ }
+ $r .= '(';
+
+ foreach ($node->getSubNodeNames() as $key) {
+ $r .= "\n " . $key . ': ';
+
+ $value = $node->$key;
+ if (null === $value) {
+ $r .= 'null';
+ } elseif (false === $value) {
+ $r .= 'false';
+ } elseif (true === $value) {
+ $r .= 'true';
+ } elseif (is_scalar($value)) {
+ if ('flags' === $key || 'newModifier' === $key) {
+ $r .= $this->dumpFlags($value);
+ } else if ('type' === $key && $node instanceof Include_) {
+ $r .= $this->dumpIncludeType($value);
+ } else if ('type' === $key
+ && ($node instanceof Use_ || $node instanceof UseUse || $node instanceof GroupUse)) {
+ $r .= $this->dumpUseType($value);
+ } else {
+ $r .= $value;
+ }
+ } else {
+ $r .= str_replace("\n", "\n ", $this->dumpRecursive($value));
+ }
+ }
+
+ if ($this->dumpComments && $comments = $node->getAttribute('comments')) {
+ $r .= "\n comments: " . str_replace("\n", "\n ", $this->dumpRecursive($comments));
+ }
+ } elseif (is_array($node)) {
+ $r = 'array(';
+
+ foreach ($node as $key => $value) {
+ $r .= "\n " . $key . ': ';
+
+ if (null === $value) {
+ $r .= 'null';
+ } elseif (false === $value) {
+ $r .= 'false';
+ } elseif (true === $value) {
+ $r .= 'true';
+ } elseif (is_scalar($value)) {
+ $r .= $value;
+ } else {
+ $r .= str_replace("\n", "\n ", $this->dumpRecursive($value));
+ }
+ }
+ } elseif ($node instanceof Comment) {
+ return $node->getReformattedText();
+ } else {
+ throw new \InvalidArgumentException('Can only dump nodes and arrays.');
+ }
+
+ return $r . "\n)";
+ }
+
+ protected function dumpFlags($flags) {
+ $strs = [];
+ if ($flags & Class_::MODIFIER_PUBLIC) {
+ $strs[] = 'MODIFIER_PUBLIC';
+ }
+ if ($flags & Class_::MODIFIER_PROTECTED) {
+ $strs[] = 'MODIFIER_PROTECTED';
+ }
+ if ($flags & Class_::MODIFIER_PRIVATE) {
+ $strs[] = 'MODIFIER_PRIVATE';
+ }
+ if ($flags & Class_::MODIFIER_ABSTRACT) {
+ $strs[] = 'MODIFIER_ABSTRACT';
+ }
+ if ($flags & Class_::MODIFIER_STATIC) {
+ $strs[] = 'MODIFIER_STATIC';
+ }
+ if ($flags & Class_::MODIFIER_FINAL) {
+ $strs[] = 'MODIFIER_FINAL';
+ }
+
+ if ($strs) {
+ return implode(' | ', $strs) . ' (' . $flags . ')';
+ } else {
+ return $flags;
+ }
+ }
+
+ protected function dumpIncludeType($type) {
+ $map = [
+ Include_::TYPE_INCLUDE => 'TYPE_INCLUDE',
+ Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE',
+ Include_::TYPE_REQUIRE => 'TYPE_REQUIRE',
+ Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQURE_ONCE',
+ ];
+
+ if (!isset($map[$type])) {
+ return $type;
+ }
+ return $map[$type] . ' (' . $type . ')';
+ }
+
+ protected function dumpUseType($type) {
+ $map = [
+ Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN',
+ Use_::TYPE_NORMAL => 'TYPE_NORMAL',
+ Use_::TYPE_FUNCTION => 'TYPE_FUNCTION',
+ Use_::TYPE_CONSTANT => 'TYPE_CONSTANT',
+ ];
+
+ if (!isset($map[$type])) {
+ return $type;
+ }
+ return $map[$type] . ' (' . $type . ')';
+ }
+
+ protected function dumpPosition(Node $node) {
+ if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) {
+ return null;
+ }
+
+ $start = $node->getAttribute('startLine');
+ $end = $node->getAttribute('endLine');
+ if ($node->hasAttribute('startFilePos') && $node->hasAttribute('endFilePos')
+ && null !== $this->code
+ ) {
+ $start .= ':' . $this->toColumn($this->code, $node->getAttribute('startFilePos'));
+ $end .= ':' . $this->toColumn($this->code, $node->getAttribute('endFilePos'));
+ }
+ return "[$start - $end]";
+ }
+
+ // Copied from Error class
+ private function toColumn($code, $pos) {
+ if ($pos > strlen($code)) {
+ throw new \RuntimeException('Invalid position information');
+ }
+
+ $lineStartPos = strrpos($code, "\n", $pos - strlen($code));
+ if (false === $lineStartPos) {
+ $lineStartPos = -1;
+ }
+
+ return $pos - $lineStartPos;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php
new file mode 100644
index 0000000..ae3cfbf
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php
@@ -0,0 +1,166 @@
+<?php
+
+namespace PhpParser;
+
+class NodeTraverser implements NodeTraverserInterface
+{
+ /**
+ * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes
+ * of the current node will not be traversed for any visitors.
+ *
+ * For subsequent visitors enterNode() will still be called on the current
+ * node and leaveNode() will also be invoked for the current node.
+ */
+ const DONT_TRAVERSE_CHILDREN = 1;
+
+ /**
+ * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs
+ * in an array, it will be removed from the array.
+ *
+ * For subsequent visitors leaveNode() will still be invoked for the
+ * removed node.
+ */
+ const REMOVE_NODE = false;
+
+ /** @var NodeVisitor[] Visitors */
+ protected $visitors;
+
+ /**
+ * Constructs a node traverser.
+ */
+ public function __construct() {
+ $this->visitors = array();
+ }
+
+ /**
+ * Adds a visitor.
+ *
+ * @param NodeVisitor $visitor Visitor to add
+ */
+ public function addVisitor(NodeVisitor $visitor) {
+ $this->visitors[] = $visitor;
+ }
+
+ /**
+ * Removes an added visitor.
+ *
+ * @param NodeVisitor $visitor
+ */
+ public function removeVisitor(NodeVisitor $visitor) {
+ foreach ($this->visitors as $index => $storedVisitor) {
+ if ($storedVisitor === $visitor) {
+ unset($this->visitors[$index]);
+ break;
+ }
+ }
+ }
+
+ /**
+ * Traverses an array of nodes using the registered visitors.
+ *
+ * @param Node[] $nodes Array of nodes
+ *
+ * @return Node[] Traversed array of nodes
+ */
+ public function traverse(array $nodes) {
+ foreach ($this->visitors as $visitor) {
+ if (null !== $return = $visitor->beforeTraverse($nodes)) {
+ $nodes = $return;
+ }
+ }
+
+ $nodes = $this->traverseArray($nodes);
+
+ foreach ($this->visitors as $visitor) {
+ if (null !== $return = $visitor->afterTraverse($nodes)) {
+ $nodes = $return;
+ }
+ }
+
+ return $nodes;
+ }
+
+ protected function traverseNode(Node $node) {
+ foreach ($node->getSubNodeNames() as $name) {
+ $subNode =& $node->$name;
+
+ if (is_array($subNode)) {
+ $subNode = $this->traverseArray($subNode);
+ } elseif ($subNode instanceof Node) {
+ $traverseChildren = true;
+ foreach ($this->visitors as $visitor) {
+ $return = $visitor->enterNode($subNode);
+ if (self::DONT_TRAVERSE_CHILDREN === $return) {
+ $traverseChildren = false;
+ } else if (null !== $return) {
+ $subNode = $return;
+ }
+ }
+
+ if ($traverseChildren) {
+ $subNode = $this->traverseNode($subNode);
+ }
+
+ foreach ($this->visitors as $visitor) {
+ if (null !== $return = $visitor->leaveNode($subNode)) {
+ if (is_array($return)) {
+ throw new \LogicException(
+ 'leaveNode() may only return an array ' .
+ 'if the parent structure is an array'
+ );
+ }
+ $subNode = $return;
+ }
+ }
+ }
+ }
+
+ return $node;
+ }
+
+ protected function traverseArray(array $nodes) {
+ $doNodes = array();
+
+ foreach ($nodes as $i => &$node) {
+ if (is_array($node)) {
+ $node = $this->traverseArray($node);
+ } elseif ($node instanceof Node) {
+ $traverseChildren = true;
+ foreach ($this->visitors as $visitor) {
+ $return = $visitor->enterNode($node);
+ if (self::DONT_TRAVERSE_CHILDREN === $return) {
+ $traverseChildren = false;
+ } else if (null !== $return) {
+ $node = $return;
+ }
+ }
+
+ if ($traverseChildren) {
+ $node = $this->traverseNode($node);
+ }
+
+ foreach ($this->visitors as $visitor) {
+ $return = $visitor->leaveNode($node);
+
+ if (self::REMOVE_NODE === $return) {
+ $doNodes[] = array($i, array());
+ break;
+ } elseif (is_array($return)) {
+ $doNodes[] = array($i, $return);
+ break;
+ } elseif (null !== $return) {
+ $node = $return;
+ }
+ }
+ }
+ }
+
+ if (!empty($doNodes)) {
+ while (list($i, $replace) = array_pop($doNodes)) {
+ array_splice($nodes, $i, 1, $replace);
+ }
+ }
+
+ return $nodes;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php
new file mode 100644
index 0000000..0f88e46
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace PhpParser;
+
+interface NodeTraverserInterface
+{
+ /**
+ * Adds a visitor.
+ *
+ * @param NodeVisitor $visitor Visitor to add
+ */
+ function addVisitor(NodeVisitor $visitor);
+
+ /**
+ * Removes an added visitor.
+ *
+ * @param NodeVisitor $visitor
+ */
+ function removeVisitor(NodeVisitor $visitor);
+
+ /**
+ * Traverses an array of nodes using the registered visitors.
+ *
+ * @param Node[] $nodes Array of nodes
+ *
+ * @return Node[] Traversed array of nodes
+ */
+ function traverse(array $nodes);
+}
+
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php
new file mode 100644
index 0000000..706a5d2
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php
@@ -0,0 +1,60 @@
+<?php
+
+namespace PhpParser;
+
+interface NodeVisitor
+{
+ /**
+ * Called once before traversal.
+ *
+ * Return value semantics:
+ * * null: $nodes stays as-is
+ * * otherwise: $nodes is set to the return value
+ *
+ * @param Node[] $nodes Array of nodes
+ *
+ * @return null|Node[] Array of nodes
+ */
+ public function beforeTraverse(array $nodes);
+
+ /**
+ * Called when entering a node.
+ *
+ * Return value semantics:
+ * * null: $node stays as-is
+ * * otherwise: $node is set to the return value
+ *
+ * @param Node $node Node
+ *
+ * @return null|Node Node
+ */
+ public function enterNode(Node $node);
+
+ /**
+ * Called when leaving a node.
+ *
+ * Return value semantics:
+ * * null: $node stays as-is
+ * * false: $node is removed from the parent array
+ * * array: The return value is merged into the parent array (at the position of the $node)
+ * * otherwise: $node is set to the return value
+ *
+ * @param Node $node Node
+ *
+ * @return null|Node|false|Node[] Node
+ */
+ public function leaveNode(Node $node);
+
+ /**
+ * Called once after traversal.
+ *
+ * Return value semantics:
+ * * null: $nodes stays as-is
+ * * otherwise: $nodes is set to the return value
+ *
+ * @param Node[] $nodes Array of nodes
+ *
+ * @return null|Node[] Array of nodes
+ */
+ public function afterTraverse(array $nodes);
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php
new file mode 100644
index 0000000..856c327
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php
@@ -0,0 +1,248 @@
+<?php
+
+namespace PhpParser\NodeVisitor;
+
+use PhpParser\Error;
+use PhpParser\ErrorHandler;
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+use PhpParser\Node\Name\FullyQualified;
+use PhpParser\Node\Stmt;
+use PhpParser\NodeVisitorAbstract;
+
+class NameResolver extends NodeVisitorAbstract
+{
+ /** @var null|Name Current namespace */
+ protected $namespace;
+
+ /** @var array Map of format [aliasType => [aliasName => originalName]] */
+ protected $aliases;
+
+ /** @var ErrorHandler Error handler */
+ protected $errorHandler;
+
+ /**
+ * Constructs a name resolution visitor.
+ *
+ * @param ErrorHandler|null $errorHandler Error handler
+ */
+ public function __construct(ErrorHandler $errorHandler = null) {
+ $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing;
+ }
+
+ public function beforeTraverse(array $nodes) {
+ $this->resetState();
+ }
+
+ public function enterNode(Node $node) {
+ if ($node instanceof Stmt\Namespace_) {
+ $this->resetState($node->name);
+ } elseif ($node instanceof Stmt\Use_) {
+ foreach ($node->uses as $use) {
+ $this->addAlias($use, $node->type, null);
+ }
+ } elseif ($node instanceof Stmt\GroupUse) {
+ foreach ($node->uses as $use) {
+ $this->addAlias($use, $node->type, $node->prefix);
+ }
+ } elseif ($node instanceof Stmt\Class_) {
+ if (null !== $node->extends) {
+ $node->extends = $this->resolveClassName($node->extends);
+ }
+
+ foreach ($node->implements as &$interface) {
+ $interface = $this->resolveClassName($interface);
+ }
+
+ if (null !== $node->name) {
+ $this->addNamespacedName($node);
+ }
+ } elseif ($node instanceof Stmt\Interface_) {
+ foreach ($node->extends as &$interface) {
+ $interface = $this->resolveClassName($interface);
+ }
+
+ $this->addNamespacedName($node);
+ } elseif ($node instanceof Stmt\Trait_) {
+ $this->addNamespacedName($node);
+ } elseif ($node instanceof Stmt\Function_) {
+ $this->addNamespacedName($node);
+ $this->resolveSignature($node);
+ } elseif ($node instanceof Stmt\ClassMethod
+ || $node instanceof Expr\Closure
+ ) {
+ $this->resolveSignature($node);
+ } elseif ($node instanceof Stmt\Const_) {
+ foreach ($node->consts as $const) {
+ $this->addNamespacedName($const);
+ }
+ } elseif ($node instanceof Expr\StaticCall
+ || $node instanceof Expr\StaticPropertyFetch
+ || $node instanceof Expr\ClassConstFetch
+ || $node instanceof Expr\New_
+ || $node instanceof Expr\Instanceof_
+ ) {
+ if ($node->class instanceof Name) {
+ $node->class = $this->resolveClassName($node->class);
+ }
+ } elseif ($node instanceof Stmt\Catch_) {
+ foreach ($node->types as &$type) {
+ $type = $this->resolveClassName($type);
+ }
+ } elseif ($node instanceof Expr\FuncCall) {
+ if ($node->name instanceof Name) {
+ $node->name = $this->resolveOtherName($node->name, Stmt\Use_::TYPE_FUNCTION);
+ }
+ } elseif ($node instanceof Expr\ConstFetch) {
+ $node->name = $this->resolveOtherName($node->name, Stmt\Use_::TYPE_CONSTANT);
+ } elseif ($node instanceof Stmt\TraitUse) {
+ foreach ($node->traits as &$trait) {
+ $trait = $this->resolveClassName($trait);
+ }
+
+ foreach ($node->adaptations as $adaptation) {
+ if (null !== $adaptation->trait) {
+ $adaptation->trait = $this->resolveClassName($adaptation->trait);
+ }
+
+ if ($adaptation instanceof Stmt\TraitUseAdaptation\Precedence) {
+ foreach ($adaptation->insteadof as &$insteadof) {
+ $insteadof = $this->resolveClassName($insteadof);
+ }
+ }
+ }
+ } elseif ($node instanceof Node\NullableType) {
+ if ($node->type instanceof Name) {
+ $node->type = $this->resolveClassName($node->type);
+ }
+ }
+ }
+
+ protected function resetState(Name $namespace = null) {
+ $this->namespace = $namespace;
+ $this->aliases = array(
+ Stmt\Use_::TYPE_NORMAL => array(),
+ Stmt\Use_::TYPE_FUNCTION => array(),
+ Stmt\Use_::TYPE_CONSTANT => array(),
+ );
+ }
+
+ protected function addAlias(Stmt\UseUse $use, $type, Name $prefix = null) {
+ // Add prefix for group uses
+ $name = $prefix ? Name::concat($prefix, $use->name) : $use->name;
+ // Type is determined either by individual element or whole use declaration
+ $type |= $use->type;
+
+ // Constant names are case sensitive, everything else case insensitive
+ if ($type === Stmt\Use_::TYPE_CONSTANT) {
+ $aliasName = $use->alias;
+ } else {
+ $aliasName = strtolower($use->alias);
+ }
+
+ if (isset($this->aliases[$type][$aliasName])) {
+ $typeStringMap = array(
+ Stmt\Use_::TYPE_NORMAL => '',
+ Stmt\Use_::TYPE_FUNCTION => 'function ',
+ Stmt\Use_::TYPE_CONSTANT => 'const ',
+ );
+
+ $this->errorHandler->handleError(new Error(
+ sprintf(
+ 'Cannot use %s%s as %s because the name is already in use',
+ $typeStringMap[$type], $name, $use->alias
+ ),
+ $use->getAttributes()
+ ));
+ return;
+ }
+
+ $this->aliases[$type][$aliasName] = $name;
+ }
+
+ /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure $node */
+ private function resolveSignature($node) {
+ foreach ($node->params as $param) {
+ if ($param->type instanceof Name) {
+ $param->type = $this->resolveClassName($param->type);
+ }
+ }
+ if ($node->returnType instanceof Name) {
+ $node->returnType = $this->resolveClassName($node->returnType);
+ }
+ }
+
+ protected function resolveClassName(Name $name) {
+ // don't resolve special class names
+ if (in_array(strtolower($name->toString()), array('self', 'parent', 'static'))) {
+ if (!$name->isUnqualified()) {
+ $this->errorHandler->handleError(new Error(
+ sprintf("'\\%s' is an invalid class name", $name->toString()),
+ $name->getAttributes()
+ ));
+ }
+
+ return $name;
+ }
+
+ // fully qualified names are already resolved
+ if ($name->isFullyQualified()) {
+ return $name;
+ }
+
+ $aliasName = strtolower($name->getFirst());
+ if (!$name->isRelative() && isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$aliasName])) {
+ // resolve aliases (for non-relative names)
+ $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$aliasName];
+ return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes());
+ }
+
+ // if no alias exists prepend current namespace
+ return FullyQualified::concat($this->namespace, $name, $name->getAttributes());
+ }
+
+ protected function resolveOtherName(Name $name, $type) {
+ // fully qualified names are already resolved
+ if ($name->isFullyQualified()) {
+ return $name;
+ }
+
+ // resolve aliases for qualified names
+ $aliasName = strtolower($name->getFirst());
+ if ($name->isQualified() && isset($this->aliases[Stmt\Use_::TYPE_NORMAL][$aliasName])) {
+ $alias = $this->aliases[Stmt\Use_::TYPE_NORMAL][$aliasName];
+ return FullyQualified::concat($alias, $name->slice(1), $name->getAttributes());
+ }
+
+ if ($name->isUnqualified()) {
+ if ($type === Stmt\Use_::TYPE_CONSTANT) {
+ // constant aliases are case-sensitive, function aliases case-insensitive
+ $aliasName = $name->getFirst();
+ }
+
+ if (isset($this->aliases[$type][$aliasName])) {
+ // resolve unqualified aliases
+ return new FullyQualified($this->aliases[$type][$aliasName], $name->getAttributes());
+ }
+
+ if (null === $this->namespace) {
+ // outside of a namespace unaliased unqualified is same as fully qualified
+ return new FullyQualified($name, $name->getAttributes());
+ }
+
+ // unqualified names inside a namespace cannot be resolved at compile-time
+ // add the namespaced version of the name as an attribute
+ $name->setAttribute('namespacedName',
+ FullyQualified::concat($this->namespace, $name, $name->getAttributes()));
+ return $name;
+ }
+
+ // if no alias exists prepend current namespace
+ return FullyQualified::concat($this->namespace, $name, $name->getAttributes());
+ }
+
+ protected function addNamespacedName(Node $node) {
+ $node->namespacedName = Name::concat($this->namespace, $node->name);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php
new file mode 100644
index 0000000..3e1743a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace PhpParser;
+
+/**
+ * @codeCoverageIgnore
+ */
+class NodeVisitorAbstract implements NodeVisitor
+{
+ public function beforeTraverse(array $nodes) { }
+ public function enterNode(Node $node) { }
+ public function leaveNode(Node $node) { }
+ public function afterTraverse(array $nodes) { }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser.php b/vendor/nikic/php-parser/lib/PhpParser/Parser.php
new file mode 100644
index 0000000..fb7dcad
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser.php
@@ -0,0 +1,17 @@
+<?php
+
+namespace PhpParser;
+
+interface Parser {
+ /**
+ * Parses PHP code into a node tree.
+ *
+ * @param string $code The source code to parse
+ * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
+ * to ErrorHandler\Throwing.
+ *
+ * @return Node[]|null Array of statements (or null if the 'throwOnError' option is disabled and the parser was
+ * unable to recover from an error).
+ */
+ public function parse($code, ErrorHandler $errorHandler = null);
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php
new file mode 100644
index 0000000..25296a4
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php
@@ -0,0 +1,54 @@
+<?php
+
+namespace PhpParser\Parser;
+
+use PhpParser\Error;
+use PhpParser\ErrorHandler;
+use PhpParser\Parser;
+
+class Multiple implements Parser {
+ /** @var Parser[] List of parsers to try, in order of preference */
+ private $parsers;
+
+ /**
+ * Create a parser which will try multiple parsers in an order of preference.
+ *
+ * Parsers will be invoked in the order they're provided to the constructor. If one of the
+ * parsers runs without throwing, it's output is returned. Otherwise the exception that the
+ * first parser generated is thrown.
+ *
+ * @param Parser[] $parsers
+ */
+ public function __construct(array $parsers) {
+ $this->parsers = $parsers;
+ }
+
+ public function parse($code, ErrorHandler $errorHandler = null) {
+ if (null === $errorHandler) {
+ $errorHandler = new ErrorHandler\Throwing;
+ }
+
+ list($firstStmts, $firstError) = $this->tryParse($this->parsers[0], $errorHandler, $code);
+ if ($firstError === null) {
+ return $firstStmts;
+ }
+
+ for ($i = 1, $c = count($this->parsers); $i < $c; ++$i) {
+ list($stmts, $error) = $this->tryParse($this->parsers[$i], $errorHandler, $code);
+ if ($error === null) {
+ return $stmts;
+ }
+ }
+
+ throw $firstError;
+ }
+
+ private function tryParse(Parser $parser, ErrorHandler $errorHandler, $code) {
+ $stmts = null;
+ $error = null;
+ try {
+ $stmts = $parser->parse($code, $errorHandler);
+ } catch (Error $error) {}
+ return [$stmts, $error];
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php
new file mode 100644
index 0000000..46d31db
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php
@@ -0,0 +1,3140 @@
+<?php
+
+namespace PhpParser\Parser;
+
+use PhpParser\Error;
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+use PhpParser\Node\Scalar;
+use PhpParser\Node\Stmt;
+
+/* This is an automatically GENERATED file, which should not be manually edited.
+ * Instead edit one of the following:
+ * * the grammar files grammar/php5.y or grammar/php7.y
+ * * the skeleton file grammar/parser.template
+ * * the preprocessing script grammar/rebuildParsers.php
+ */
+class Php5 extends \PhpParser\ParserAbstract
+{
+ protected $tokenToSymbolMapSize = 392;
+ protected $actionTableSize = 1012;
+ protected $gotoTableSize = 652;
+
+ protected $invalidSymbol = 157;
+ protected $errorSymbol = 1;
+ protected $defaultAction = -32766;
+ protected $unexpectedTokenRule = 32767;
+
+ protected $YY2TBLSTATE = 405;
+ protected $YYNLSTATES = 667;
+
+ protected $symbolToName = array(
+ "EOF",
+ "error",
+ "T_INCLUDE",
+ "T_INCLUDE_ONCE",
+ "T_EVAL",
+ "T_REQUIRE",
+ "T_REQUIRE_ONCE",
+ "','",
+ "T_LOGICAL_OR",
+ "T_LOGICAL_XOR",
+ "T_LOGICAL_AND",
+ "T_PRINT",
+ "T_YIELD",
+ "T_DOUBLE_ARROW",
+ "T_YIELD_FROM",
+ "'='",
+ "T_PLUS_EQUAL",
+ "T_MINUS_EQUAL",
+ "T_MUL_EQUAL",
+ "T_DIV_EQUAL",
+ "T_CONCAT_EQUAL",
+ "T_MOD_EQUAL",
+ "T_AND_EQUAL",
+ "T_OR_EQUAL",
+ "T_XOR_EQUAL",
+ "T_SL_EQUAL",
+ "T_SR_EQUAL",
+ "T_POW_EQUAL",
+ "'?'",
+ "':'",
+ "T_COALESCE",
+ "T_BOOLEAN_OR",
+ "T_BOOLEAN_AND",
+ "'|'",
+ "'^'",
+ "'&'",
+ "T_IS_EQUAL",
+ "T_IS_NOT_EQUAL",
+ "T_IS_IDENTICAL",
+ "T_IS_NOT_IDENTICAL",
+ "T_SPACESHIP",
+ "'<'",
+ "T_IS_SMALLER_OR_EQUAL",
+ "'>'",
+ "T_IS_GREATER_OR_EQUAL",
+ "T_SL",
+ "T_SR",
+ "'+'",
+ "'-'",
+ "'.'",
+ "'*'",
+ "'/'",
+ "'%'",
+ "'!'",
+ "T_INSTANCEOF",
+ "'~'",
+ "T_INC",
+ "T_DEC",
+ "T_INT_CAST",
+ "T_DOUBLE_CAST",
+ "T_STRING_CAST",
+ "T_ARRAY_CAST",
+ "T_OBJECT_CAST",
+ "T_BOOL_CAST",
+ "T_UNSET_CAST",
+ "'@'",
+ "T_POW",
+ "'['",
+ "T_NEW",
+ "T_CLONE",
+ "T_EXIT",
+ "T_IF",
+ "T_ELSEIF",
+ "T_ELSE",
+ "T_ENDIF",
+ "T_LNUMBER",
+ "T_DNUMBER",
+ "T_STRING",
+ "T_STRING_VARNAME",
+ "T_VARIABLE",
+ "T_NUM_STRING",
+ "T_INLINE_HTML",
+ "T_ENCAPSED_AND_WHITESPACE",
+ "T_CONSTANT_ENCAPSED_STRING",
+ "T_ECHO",
+ "T_DO",
+ "T_WHILE",
+ "T_ENDWHILE",
+ "T_FOR",
+ "T_ENDFOR",
+ "T_FOREACH",
+ "T_ENDFOREACH",
+ "T_DECLARE",
+ "T_ENDDECLARE",
+ "T_AS",
+ "T_SWITCH",
+ "T_ENDSWITCH",
+ "T_CASE",
+ "T_DEFAULT",
+ "T_BREAK",
+ "T_CONTINUE",
+ "T_GOTO",
+ "T_FUNCTION",
+ "T_CONST",
+ "T_RETURN",
+ "T_TRY",
+ "T_CATCH",
+ "T_FINALLY",
+ "T_THROW",
+ "T_USE",
+ "T_INSTEADOF",
+ "T_GLOBAL",
+ "T_STATIC",
+ "T_ABSTRACT",
+ "T_FINAL",
+ "T_PRIVATE",
+ "T_PROTECTED",
+ "T_PUBLIC",
+ "T_VAR",
+ "T_UNSET",
+ "T_ISSET",
+ "T_EMPTY",
+ "T_HALT_COMPILER",
+ "T_CLASS",
+ "T_TRAIT",
+ "T_INTERFACE",
+ "T_EXTENDS",
+ "T_IMPLEMENTS",
+ "T_OBJECT_OPERATOR",
+ "T_LIST",
+ "T_ARRAY",
+ "T_CALLABLE",
+ "T_CLASS_C",
+ "T_TRAIT_C",
+ "T_METHOD_C",
+ "T_FUNC_C",
+ "T_LINE",
+ "T_FILE",
+ "T_START_HEREDOC",
+ "T_END_HEREDOC",
+ "T_DOLLAR_OPEN_CURLY_BRACES",
+ "T_CURLY_OPEN",
+ "T_PAAMAYIM_NEKUDOTAYIM",
+ "T_NAMESPACE",
+ "T_NS_C",
+ "T_DIR",
+ "T_NS_SEPARATOR",
+ "T_ELLIPSIS",
+ "';'",
+ "'{'",
+ "'}'",
+ "'('",
+ "')'",
+ "'$'",
+ "'`'",
+ "']'",
+ "'\"'"
+ );
+
+ protected $tokenToSymbol = array(
+ 0, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 53, 156, 157, 153, 52, 35, 157,
+ 151, 152, 50, 47, 7, 48, 49, 51, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 29, 148,
+ 41, 15, 43, 28, 65, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 67, 157, 155, 34, 157, 154, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 149, 33, 150, 55, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 1, 2, 3, 4,
+ 5, 6, 8, 9, 10, 11, 12, 13, 14, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 30, 31, 32, 36, 37, 38, 39, 40, 42,
+ 44, 45, 46, 54, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 66, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 157, 157,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 157, 157, 157, 157,
+ 157, 157, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147
+ );
+
+ protected $action = array(
+ 672, 673, 674, 675, 676,-32766, 677, 678, 679, 715,
+ 716, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 23, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ 234, 235, 236,-32766,-32766,-32766,-32766,-32766,-32766,-32766,
+ -32766,-32767,-32767,-32767,-32767, 460, 237, 238,-32766,-32766,
+ -32766,-32766, 680,-32766, 0,-32766,-32766,-32766,-32766,-32766,
+ -32766,-32767,-32767,-32767,-32767,-32767, 681, 682, 683, 684,
+ 685, 686, 687, 909, 204, 747,-32766,-32766,-32766,-32766,
+ -32766, 419, 688, 689, 690, 691, 692, 693, 694, 695,
+ 696, 697, 698, 718, 719, 720, 721, 722, 710, 711,
+ 712, 713, 714, 699, 700, 701, 702, 703, 704, 705,
+ 741, 742, 743, 744, 745, 746, 706, 707, 708, 709,
+ 739, 730, 728, 729, 725, 726, 306, 717, 723, 724,
+ 731, 732, 734, 733, 735, 736, 52, 53, 420, 54,
+ 55, 727, 738, 737, 282, 56, 57, 284, 58,-32766,
+ -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 7,-32767,
+ -32767,-32767,-32767, 50, 329, 900, 585, 945, 946, 947,
+ 944, 943, 942, 937, 1213, 27, 1215, 1214, 763, 764,
+ 821, 59, 60,-32766,-32766,-32766, 918, 61, 1172, 62,
+ 291, 292, 63, 64, 65, 66, 67, 68, 69, 70,
+ 356, 24, 299, 71, 413,-32766,-32766,-32766, 1185, 1087,
+ 1088, 749, 633, 1178, 213, 214, 215, 464,-32766,-32766,
+ -32766, 822, 407, 1099, 311,-32766, 1054,-32766,-32766,-32766,
+ -32766,-32766,-32766, 1036, 200, -269, 428, 1036,-32766, 447,
+ -32766,-32766,-32766,-32766,-32766, 120, 491, 945, 946, 947,
+ 944, 943, 942, 297, 473, 474, 283, 623, 125,-32766,
+ 893, 894, 339, 477, 478,-32766, 1093, 1094, 1095, 1096,
+ 1090, 1091, 307, 492,-32766, 8, 425, 492, 1097, 1092,
+ 425, 121, -220, 869, 1182, 39, 280, 332, 321, 1186,
+ 322, 421, -122, -122, -122, -4, 822, 463, 99, 100,
+ 101, 811, 301, 377, 38, 19, 422, -122, 465, -122,
+ 466, -122, 467, -122, 102, 423, -122, -122, -122, 28,
+ 29, 468, 424, 624, 30, 469, 425, 812, 72, 412,
+ 923, 349, 350, 470, 471,-32766,-32766,-32766, 298, 472,
+ 1036, 808, 793, 840, 475, 476,-32767,-32767,-32767,-32767,
+ 94, 95, 96, 97, 98,-32766, 126,-32766,-32766,-32766,
+ -32766, 1137, 213, 214, 215, 295, 421, 239, 824, 638,
+ -122, 1036, 463, 893, 894, 1205, 811, 1036, 1204, 38,
+ 19, 422, 200, 465, 18, 466, 492, 467, 127, 425,
+ 423, 213, 214, 215, 28, 29, 468, 424, 414, 30,
+ 469, 1036, 870, 72, 320, 822, 349, 350, 470, 471,
+ 1036, 200, 214, 215, 472, 441, 919, 755, 840, 475,
+ 476, 213, 214, 215, 295, -216, 76, 77, 78, 47,
+ 338, 200, 477, 644, 348, 438, 31, 294, 331, 440,
+ 326, 200, 241, 824, 638, -4, 32, 335, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 1210, 301, 34, 822, 421, 801, 124,-32766,-32766,
+ -32766, 463, 899, 129, 102, 811, 1178, 576, 38, 19,
+ 422, 546, 465, 1172, 466, 119, 467, 49,-32766, 423,
+ -32766,-32766, 647, 28, 29, 468, 822, 803, 30, 469,
+ 415, 117, 72, 805, 46, 349, 350,-32766,-32766,-32766,
+ -32766,-32766,-32766, 472, 200, 1036, 234, 235, 236,-32766,
+ -32766,-32766,-32766,-32766, 641, 1138, 124,-32766,-32766,-32766,
+ -32766,-32766, 237, 238, 421, 231, 232, 233, 293,-32766,
+ 463, 518, 856, 638, 811, 439, 809, 38, 19, 422,
+ 332, 465, 128, 466, 749, 467, 1178, 339, 423, 96,
+ 97, 98, 28, 29, 468, 822, 421, 30, 469, 118,
+ 762, 72, 463, 215, 349, 350, 811, 242, 1036, 38,
+ 19, 422, 472, 465, 206, 466, 116, 467, 1036, 1064,
+ 423, 200, 833, 642, 28, 29, 468, 822, 1099, 30,
+ 469, 296, 207, 72, 205, 123, 349, 350,-32766,-32766,
+ 492, 824, 638, 425, 472, 115, 213, 214, 215, 434,
+ 492, 244, 640, 425, 243, 653, 237, 238, 429,-32766,
+ 332, 454, 591, 449, 20, 421, 200, 130, 357, 763,
+ 764, 463, 820, 824, 638, 811, 922, 666, 38, 19,
+ 422, 646, 465, 650, 466, 313, 467, 599, 600, 423,
+ 102, 756, 643, 28, 29, 468, 822, 421, 30, 469,
+ 934, 656, 72, 463, 301, 349, 350, 811, 41, 51,
+ 38, 19, 422, 472, 465, 48, 466, 299, 467, 605,
+ 42, 423, 43, 517, 44, 28, 29, 468, 45,-32766,
+ 30, 469, 596, 524, 72, 435, 433, 349, 350, 533,
+ 534, 749, 824, 638, 1208, 472, 776, 33, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 750, 513, 512, 437, 632, 602, 421, 1057, 622, 612,
+ 516, 619, 463, 279, 824, 638, 811, 582, 595, 38,
+ 19, 422, 330, 465, 579, 466, 240, 467, 975, 977,
+ 423, 609, 334, 537, 28, 29, 468, 12, -80, 30,
+ 469, 842, 432, 72, 208, 209, 349, 350, 458, 1144,
+ 210, 384, 211, 327, 472, 841, 9, 393, -398, 409,
+ 328, 0, 310, 1045, 202, 477, 0, 0, 0, 208,
+ 209, 0, 1087, 1088, 0, 210,-32766, 211, -497, 312,
+ 1089, -498, 0, 824, 638, 0, 1098, 4, 372, 202,
+ 3, 11, 303, 0, -407, 0, 370, 1087, 1088, -406,
+ -497,-32766, 434, 864, 526, 1089, 408, 385, 75, 835,
+ 0, 857, 863, 854, 813, 798, 819, 807, 761, 661,
+ 0, 660, 37, 36, 759, 926, 810, 565, 852, 1093,
+ 1094, 1095, 1096, 1090, 1091, 383, 929, 806, 930, 818,
+ 760, 1097, 1092, 928, 804, 302, 802, 927, 212, 796,
+ -32766, 872, 565, 639, 1093, 1094, 1095, 1096, 1090, 1091,
+ 383, 649, 651, 652, 654, 655, 1097, 1092, 658, 663,
+ 664, 1034, 665, 212, 122,-32766, 324, 325, 405, 406,
+ -416, 1211, 757, 758, 839, 838, 766, 453, 1209, 1179,
+ 1177, 1163, 1175, 1078, 911, 1183, 1173, 829, 836, 1038,
+ 1039, 827, 935, 1212, 765, 837, 794, 662, 1050, 861,
+ 768, 767, 862, 0, 304, 290, 289, 25, 26, 281,
+ 305, 336, 203, 74, 411, 417, 35, 73,-32766, 40,
+ 22, 0, 1015, 569, -217, 1016, 1103, 1080, 901, 1040,
+ 1044, 1041, 629, 559, 461, 457, 455, 450, 378, 16,
+ 15, 14, -216, 0, 0, 0, 603, 1157, 1104, 1207,
+ 1077, 1174, 1158, 1162, 1176, 1063, 1048, 1049, 1046, 1047,
+ 0, 1143
+ );
+
+ protected $actionCheck = array(
+ 2, 3, 4, 5, 6, 8, 8, 9, 10, 11,
+ 12, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 7, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 8, 9, 10, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 7, 66, 67, 31, 32,
+ 33, 34, 54, 28, 0, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 68, 69, 70, 71,
+ 72, 73, 74, 79, 7, 77, 31, 32, 33, 34,
+ 35, 7, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 7, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 2, 3, 4, 5,
+ 6, 143, 144, 145, 7, 11, 12, 153, 14, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 103, 41,
+ 42, 43, 44, 67, 109, 152, 82, 112, 113, 114,
+ 115, 116, 117, 118, 77, 7, 79, 80, 102, 103,
+ 1, 47, 48, 8, 9, 10, 148, 53, 79, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 7, 67, 68, 69, 70, 8, 9, 10, 1, 75,
+ 76, 77, 77, 79, 8, 9, 10, 83, 8, 9,
+ 10, 1, 146, 139, 128, 28, 152, 30, 31, 32,
+ 33, 34, 35, 12, 28, 79, 102, 12, 28, 7,
+ 30, 31, 32, 33, 34, 149, 112, 112, 113, 114,
+ 115, 116, 117, 7, 120, 121, 35, 77, 149, 103,
+ 130, 131, 153, 129, 130, 109, 132, 133, 134, 135,
+ 136, 137, 138, 143, 118, 7, 146, 143, 144, 145,
+ 146, 7, 152, 29, 77, 151, 13, 153, 154, 152,
+ 156, 71, 72, 73, 74, 0, 1, 77, 50, 51,
+ 52, 81, 54, 78, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 66, 95, 96, 97, 98, 99,
+ 100, 101, 102, 143, 104, 105, 146, 148, 108, 7,
+ 150, 111, 112, 113, 114, 8, 9, 10, 35, 119,
+ 12, 148, 122, 123, 124, 125, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 28, 149, 30, 31, 32,
+ 33, 155, 8, 9, 10, 35, 71, 13, 148, 149,
+ 150, 12, 77, 130, 131, 79, 81, 12, 82, 84,
+ 85, 86, 28, 88, 152, 90, 143, 92, 67, 146,
+ 95, 8, 9, 10, 99, 100, 101, 102, 103, 104,
+ 105, 12, 148, 108, 109, 1, 111, 112, 113, 114,
+ 12, 28, 9, 10, 119, 7, 148, 122, 123, 124,
+ 125, 8, 9, 10, 35, 152, 8, 9, 10, 67,
+ 67, 28, 129, 29, 7, 29, 140, 141, 143, 7,
+ 7, 28, 29, 148, 149, 150, 28, 7, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 150, 54, 13, 1, 71, 148, 147, 8, 9,
+ 10, 77, 152, 149, 66, 81, 79, 153, 84, 85,
+ 86, 128, 88, 79, 90, 13, 92, 67, 28, 95,
+ 30, 31, 29, 99, 100, 101, 1, 148, 104, 105,
+ 123, 149, 108, 148, 67, 111, 112, 8, 9, 10,
+ 31, 32, 33, 119, 28, 12, 50, 51, 52, 8,
+ 9, 10, 8, 9, 29, 152, 147, 28, 151, 30,
+ 31, 32, 66, 67, 71, 47, 48, 49, 35, 28,
+ 77, 82, 148, 149, 81, 149, 148, 84, 85, 86,
+ 153, 88, 29, 90, 77, 92, 79, 153, 95, 47,
+ 48, 49, 99, 100, 101, 1, 71, 104, 105, 149,
+ 148, 108, 77, 10, 111, 112, 81, 15, 12, 84,
+ 85, 86, 119, 88, 15, 90, 149, 92, 12, 112,
+ 95, 28, 35, 29, 99, 100, 101, 1, 139, 104,
+ 105, 35, 15, 108, 15, 29, 111, 112, 31, 32,
+ 143, 148, 149, 146, 119, 15, 8, 9, 10, 146,
+ 143, 15, 149, 146, 15, 29, 66, 67, 151, 31,
+ 153, 72, 73, 72, 73, 71, 28, 97, 98, 102,
+ 103, 77, 29, 148, 149, 81, 148, 149, 84, 85,
+ 86, 29, 88, 29, 90, 29, 92, 106, 107, 95,
+ 66, 148, 149, 99, 100, 101, 1, 71, 104, 105,
+ 148, 149, 108, 77, 54, 111, 112, 81, 67, 67,
+ 84, 85, 86, 119, 88, 67, 90, 68, 92, 74,
+ 67, 95, 67, 77, 67, 99, 100, 101, 67, 82,
+ 104, 105, 109, 82, 108, 77, 77, 111, 112, 77,
+ 77, 77, 148, 149, 77, 119, 77, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 77, 77, 77, 86, 89, 79, 71, 79, 79, 79,
+ 79, 91, 77, 94, 148, 149, 81, 96, 96, 84,
+ 85, 86, 110, 88, 87, 90, 29, 92, 56, 57,
+ 95, 93, 126, 94, 99, 100, 101, 94, 94, 104,
+ 105, 123, 102, 108, 47, 48, 111, 112, 102, 139,
+ 53, 146, 55, 126, 119, 123, 142, 146, 142, 146,
+ 127, -1, 128, 155, 67, 129, -1, -1, -1, 47,
+ 48, -1, 75, 76, -1, 53, 79, 55, 128, 128,
+ 83, 128, -1, 148, 149, -1, 139, 142, 146, 67,
+ 142, 142, 151, -1, 142, -1, 142, 75, 76, 142,
+ 128, 79, 146, 148, 146, 83, 146, 146, 149, 147,
+ -1, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ -1, 148, 148, 148, 148, 148, 148, 130, 148, 132,
+ 133, 134, 135, 136, 137, 138, 148, 148, 148, 148,
+ 148, 144, 145, 148, 148, 151, 148, 148, 151, 148,
+ 153, 148, 130, 149, 132, 133, 134, 135, 136, 137,
+ 138, 149, 149, 149, 149, 149, 144, 145, 149, 149,
+ 149, 154, 149, 151, 149, 153, 149, 149, 149, 149,
+ 154, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
+ 150, 150, 150, -1, 151, 151, 151, 151, 151, 151,
+ 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
+ 151, -1, 152, 152, 152, 152, 152, 152, 152, 152,
+ 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
+ 152, 152, 152, -1, -1, -1, 155, 155, 155, 155,
+ 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
+ -1, 156
+ );
+
+ protected $actionBase = array(
+ 0, 220, 295, 109, 109, 180, 735, -2, -2, -2,
+ -2, -2, 135, 574, 473, 606, 473, 505, 404, 675,
+ 675, 675, 330, 389, 513, 513, 825, 513, 328, 359,
+ 365, 225, 586, 221, 576, 398, 398, 398, 398, 134,
+ 134, 398, 398, 398, 398, 398, 398, 398, 398, 398,
+ 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
+ 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
+ 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
+ 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
+ 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
+ 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
+ 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
+ 398, 398, 398, 398, 398, 398, 398, 398, 398, 398,
+ 398, 254, 179, 482, 460, 738, 736, 729, 731, 827,
+ 659, 823, 778, 779, 533, 780, 781, 782, 783, 784,
+ 777, 785, 841, 786, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, -3, 354, 383, 413, 206,
+ 524, 618, 618, 618, 618, 618, 618, 618, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 403, 521, 521, 521, 573,
+ 737, 496, 762, 762, 762, 762, 762, 762, 762, 762,
+ 762, 762, 762, 762, 762, 762, 762, 762, 762, 762,
+ 762, 762, 762, 762, 762, 762, 762, 762, 762, 762,
+ 762, 762, 762, 762, 762, 762, 762, 762, 762, 762,
+ 762, 762, 762, 762, 762, 470, -20, -20, 509, 608,
+ 327, 587, 210, 489, 197, 25, 25, 25, 25, 25,
+ 17, 45, 5, 5, 5, 5, 712, 305, 305, 305,
+ 305, 118, 118, 118, 118, 774, 775, 795, 798, 303,
+ 303, 676, 676, 629, 765, 522, 522, 498, 498, 487,
+ 487, 487, 487, 487, 487, 487, 487, 487, 487, 387,
+ 156, 817, 130, 130, 130, 130, 243, 469, 650, 855,
+ 207, 207, 207, 243, 248, 248, 248, 476, 476, 476,
+ 76, 631, 296, 296, 547, 547, 547, 477, 477, 477,
+ 477, 483, 699, 627, 477, 477, 477, 362, 97, 334,
+ 661, 799, 662, 802, 508, 692, 96, 700, 653, -6,
+ 680, 571, 569, 561, 656, 406, -6, 254, 532, 430,
+ 630, 718, 643, 432, 716, 193, 408, 363, 523, 447,
+ 414, 232, 767, 732, 821, 820, 137, 321, 693, 630,
+ 630, 630, 13, 84, 768, 769, 447, 273, 570, 570,
+ 570, 570, 801, 770, 570, 570, 570, 570, 800, 794,
+ 268, 38, 776, 74, 717, 644, 644, 644, 644, 644,
+ 644, 567, 644, 807, 664, 819, 819, 642, 666, 567,
+ 818, 818, 818, 818, 567, 644, 819, 819, 567, 629,
+ 819, 168, 567, 667, 644, 646, 646, 818, 713, 711,
+ 664, 671, 673, 819, 819, 819, 673, 642, 567, 818,
+ 603, 702, 67, 819, 818, 636, 636, 603, 567, 636,
+ 666, 636, 54, 623, 621, 815, 816, 814, 665, 744,
+ 672, 658, 805, 804, 812, 626, 639, 808, 806, 698,
+ 710, 709, 638, 610, 633, 635, 637, 641, 688, 628,
+ 674, 680, 696, 604, 604, 604, 690, 685, 690, 604,
+ 604, 604, 604, 604, 604, 604, 604, 648, 694, 697,
+ 691, 657, 708, 599, 682, 679, 579, 759, 687, 698,
+ 698, 796, 829, 836, 766, 757, 663, 734, 831, 690,
+ 854, 715, 274, 597, 681, 797, 645, 649, 701, 690,
+ 803, 690, 760, 690, 828, 793, 647, 698, 773, 604,
+ 826, 853, 852, 851, 850, 849, 848, 847, 846, 622,
+ 845, 707, 677, 835, 119, 811, 656, 654, 651, 706,
+ 440, 844, 772, 690, 690, 761, 699, 690, 763, 743,
+ 714, 839, 704, 834, 843, 687, 833, 690, 686, 842,
+ 440, 632, 625, 822, 678, 695, 813, 670, 824, 810,
+ 752, 572, 619, 771, 634, 741, 838, 837, 840, 703,
+ 753, 754, 616, 660, 668, 669, 787, 755, 809, 705,
+ 788, 789, 830, 684, 696, 689, 652, 683, 655, 756,
+ 790, 832, 720, 728, 730, 791, 739, 792, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 134, 134,
+ -2, -2, -2, -2, 0, 0, 0, 0, 0, -2,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 0, 0, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 418, -20, -20, -20, -20, 418, -20, -20,
+ -20, -20, -20, -20, -20, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, -20, 418, 418, 418, -20, 487, -20, 487,
+ 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
+ 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
+ 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
+ 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
+ 487, 487, 418, 0, 0, 418, -20, 418, -20, 418,
+ -20, 418, 418, 418, 418, 418, 418, -20, -20, -20,
+ -20, -20, -20, 0, 248, 248, 248, 248, -20, -20,
+ -20, -20, 55, 55, 55, 55, 487, 487, 487, 487,
+ 487, 487, 248, 248, 476, 476, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 487, 55, 487, 644,
+ 644, 644, 644, 644, 296, 296, 296, 407, 407, 407,
+ 644, 0, 0, 0, 0, 0, 0, 644, 296, 0,
+ 0, 644, 644, 644, 644, 644, 644, 644, 644, 407,
+ 296, 644, 644, 644, 819, 0, 407, 550, 550, 550,
+ 550, 440, 447, 0, 644, 644, 0, 671, 0, 0,
+ 0, 819, 0, 0, 0, 0, 0, 604, 274, 734,
+ 0, 427, 0, 0, 0, 0, 0, 0, 0, 663,
+ 427, 246, 246, 0, 0, 622, 604, 604, 604, 0,
+ 0, 663, 663, 0, 0, 0, 0, 0, 0, 433,
+ 663, 0, 0, 0, 0, 433, 322, 0, 0, 322,
+ 0, 440
+ );
+
+ protected $actionDefault = array(
+ 3,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767, 525, 525,32767, 481,32767,32767,
+ 32767,32767,32767,32767,32767, 287, 287, 287,32767,32767,
+ 32767, 513, 513, 513, 513, 513, 513, 513, 513, 513,
+ 513, 513,32767,32767,32767,32767,32767, 369,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767, 375, 530,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767, 350, 351, 353, 354, 286, 514,
+ 237, 376, 529, 285, 239, 314, 485,32767,32767,32767,
+ 316, 116, 248, 193, 484, 119, 284, 224, 368, 370,
+ 315, 291, 296, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 306, 307, 290, 441, 347, 346, 345, 443,
+ 32767, 442, 478, 478, 481,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767, 312, 469, 468, 313, 439,
+ 317, 440, 319, 444, 318, 335, 336, 333, 334, 337,
+ 446, 445, 462, 463, 460, 461, 289, 338, 339, 340,
+ 341, 464, 465, 466, 467, 271, 271, 271, 271,32767,
+ 32767, 524, 524,32767,32767, 326, 327, 453, 454,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 272,32767, 228, 228, 228, 228, 228,32767,32767,32767,
+ 32767,32767,32767,32767, 321, 322, 320, 448, 449, 447,
+ 32767, 415,32767, 417,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 486,32767,32767,
+ 32767,32767,32767,32767,32767, 499, 404,32767,32767,32767,
+ 397, 212, 214, 161, 472,32767,32767,32767,32767, 504,
+ 331,32767,32767,32767,32767,32767,32767, 539,32767, 499,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 344, 323,
+ 324, 325,32767,32767,32767,32767, 503, 497, 456, 457,
+ 458, 459,32767,32767, 450, 451, 452, 455,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767, 165,32767, 412,32767, 418, 418,32767,32767, 165,
+ 32767,32767,32767,32767, 165,32767, 502, 501, 165,32767,
+ 398, 480, 165, 178,32767, 176, 176,32767, 198, 198,
+ 32767,32767, 180, 473, 492,32767, 180,32767, 165,32767,
+ 386, 167, 480,32767,32767, 230, 230, 386, 165, 230,
+ 32767, 230,32767, 82, 422,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767, 399,
+ 32767,32767,32767,32767, 365, 366, 475, 488,32767, 489,
+ 32767, 397,32767, 329, 330, 332, 309,32767, 311, 355,
+ 356, 357, 358, 359, 360, 361, 363,32767,32767, 402,
+ 405,32767,32767,32767, 84, 108, 247,32767, 537, 84,
+ 400,32767,32767, 294, 537,32767,32767,32767,32767, 532,
+ 32767,32767, 288,32767,32767,32767, 84,32767, 84, 243,
+ 32767, 163,32767, 522,32767, 497,32767, 401,32767, 328,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767, 498,
+ 32767,32767,32767,32767, 219,32767, 435,32767, 84,32767,
+ 179,32767,32767, 292, 238,32767,32767, 531,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 164,32767,32767,
+ 181,32767,32767, 497,32767,32767,32767,32767,32767,32767,
+ 32767,32767, 283,32767,32767,32767,32767,32767, 497,32767,
+ 32767,32767, 223,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767, 82, 60,32767, 265,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 121, 121,
+ 3, 121, 121, 3, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 206, 250, 209,
+ 198, 198, 158, 250, 250, 250, 257
+ );
+
+ protected $goto = array(
+ 160, 160, 134, 134, 139, 134, 135, 136, 137, 142,
+ 144, 181, 162, 158, 158, 158, 158, 139, 139, 159,
+ 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
+ 154, 155, 156, 157, 178, 133, 179, 493, 494, 360,
+ 495, 499, 500, 501, 502, 503, 504, 505, 506, 962,
+ 138, 140, 141, 143, 165, 170, 180, 196, 245, 248,
+ 250, 252, 254, 255, 256, 257, 258, 259, 267, 268,
+ 269, 270, 285, 286, 314, 315, 316, 379, 380, 381,
+ 549, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 194, 145, 146, 147, 161, 148, 163,
+ 149, 197, 164, 150, 151, 152, 198, 153, 131, 625,
+ 567, 753, 567, 567, 567, 567, 567, 567, 567, 567,
+ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567,
+ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567,
+ 567, 567, 567, 567, 567, 567, 567, 567, 567, 567,
+ 567, 567, 567, 567, 567, 1100, 754, 1100, 1100, 1100,
+ 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100,
+ 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100,
+ 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100,
+ 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100, 1100,
+ 885, 885, 1190, 1190, 6, 611, 784, 168, 617, 509,
+ 358, 509, 171, 172, 173, 388, 389, 390, 391, 167,
+ 195, 199, 201, 249, 251, 253, 260, 261, 262, 263,
+ 264, 265, 271, 272, 273, 274, 287, 288, 317, 318,
+ 319, 394, 395, 396, 397, 169, 174, 246, 247, 175,
+ 176, 177, 497, 497, 497, 497, 497, 497, 341, 580,
+ 606, 523, 497, 497, 497, 497, 497, 497, 497, 497,
+ 497, 497, 508, 634, 508, 387, 608, 543, 543, 573,
+ 539, 1076, 1075, 790, 752, 541, 541, 496, 498, 529,
+ 545, 574, 577, 587, 593, 871, 1169, 851, 1169, 657,
+ 815, 511, 880, 875, 566, 855, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 551,
+ 552, 553, 554, 555, 556, 557, 558, 560, 589, 550,
+ 323, 309, 514, 522, 1201, 1201, 519, 519, 519, 583,
+ 586, 631, 510, 519, 510, 1161, 522, 522, 903, 1201,
+ 590, 344, 404, 430, 430, 430, 430, 430, 430, 538,
+ 519, 544, 1058, 430, 430, 430, 430, 430, 430, 430,
+ 430, 430, 430, 1065, 1194, 1065, 892, 892, 892, 892,
+ 892, 361, 598, 535, 777, 659, 562, 892, 594, 868,
+ 882, 613, 867, 616, 878, 620, 621, 628, 630, 635,
+ 637, 849, 849, 849, 849, 1149, 1081, 607, 844, 850,
+ 615, 777, 777, 1019, 17, 13, 355, 519, 519, 536,
+ 568, 519, 519, 1187, 519, 443, 445, 933, 636, 375,
+ 561, 1101, 618, 931, 1061, 1062, 889, 520, 1058, 276,
+ 277, 278, 21, 1200, 1200, 548, 547, 604, 572, 342,
+ 343, 1059, 1160, 1059, 1168, 362, 1168, 1009, 1200, 527,
+ 898, 1060, 941, 540, 347, 1184, 1184, 1184, 1203, 770,
+ 770, 778, 778, 778, 780, 960, 769, 398, 373, 451,
+ 369, 369, 369, 773, 368, 771, 645, 1167, 907, 10,
+ 402, 1051, 1056, 446, 781, 578, 912, 859, 1146, 459,
+ 949, 0, 369, 0, 0, 0, 0, 0, 0, 386,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 528
+ );
+
+ protected $gotoCheck = array(
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 53,
+ 112, 11, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
+ 112, 112, 112, 112, 112, 119, 12, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 70, 70, 70, 70, 90, 57, 25, 23, 57, 112,
+ 57, 112, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 109, 109, 109, 109, 109, 109, 65, 36,
+ 36, 93, 109, 109, 109, 109, 109, 109, 109, 109,
+ 109, 109, 109, 5, 109, 47, 47, 47, 47, 47,
+ 47, 117, 117, 10, 10, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 10, 110, 10, 110, 10,
+ 46, 10, 10, 10, 53, 29, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 40,
+ 118, 118, 8, 40, 134, 134, 8, 8, 8, 56,
+ 56, 56, 115, 8, 115, 75, 40, 40, 77, 134,
+ 63, 63, 63, 53, 53, 53, 53, 53, 53, 8,
+ 8, 101, 75, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 53, 132, 53, 53, 53, 53, 53,
+ 53, 43, 120, 28, 19, 28, 28, 53, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 53, 53, 53, 53, 124, 30, 45, 53, 53,
+ 53, 19, 19, 30, 30, 30, 30, 8, 8, 8,
+ 8, 8, 8, 130, 8, 7, 7, 7, 7, 44,
+ 30, 7, 7, 7, 75, 75, 72, 8, 75, 61,
+ 61, 61, 30, 133, 133, 2, 8, 30, 2, 65,
+ 65, 75, 75, 75, 111, 54, 111, 94, 133, 54,
+ 74, 75, 90, 54, 14, 111, 111, 111, 133, 19,
+ 19, 19, 19, 19, 19, 93, 19, 18, 13, 54,
+ 116, 116, 116, 21, 9, 20, 67, 111, 78, 54,
+ 17, 105, 107, 59, 22, 60, 79, 64, 123, 100,
+ 92, -1, 116, -1, -1, -1, -1, -1, -1, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 93
+ );
+
+ protected $gotoBase = array(
+ 0, 0, -165, 0, 0, 261, 0, 452, 42, 183,
+ 282, 109, 154, 161, 174, 0, 0, 114, 182, 94,
+ 167, 187, 84, 7, 0, 198, 0, 0, -226, 287,
+ 23, 0, 0, 0, 0, 0, 223, 0, 0, -22,
+ 337, 0, 0, 373, 169, 157, 284, -4, 0, 0,
+ 0, 0, 0, 104, 61, 0, 66, -251, 0, 87,
+ 79, -194, 0, 52, 80, -181, 0, 159, 0, 0,
+ -79, 0, 160, 0, 177, 38, 0, 355, 162, 85,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 192, 0, 70, 222, 186, 0, 0, 0, 0, 0,
+ 72, 366, 307, 0, 0, 105, 0, 103, 0, -27,
+ -3, 185, -90, 0, 0, 73, 200, -30, 39, -45,
+ 209, 0, 0, 76, 231, 0, 0, 0, 0, 0,
+ 171, 0, 377, 165, 56, 0, 0
+ );
+
+ protected $gotoDefault = array(
+ -32768, 462, 668, 2, 669, 740, 748, 601, 479, 515,
+ 853, 791, 792, 364, 410, 480, 363, 399, 392, 779,
+ 772, 774, 782, 166, 400, 785, 1, 787, 521, 823,
+ 1010, 351, 795, 352, 592, 797, 531, 799, 800, 132,
+ 481, 365, 366, 532, 374, 581, 814, 266, 371, 816,
+ 353, 817, 826, 354, 614, 597, 563, 610, 482, 442,
+ 575, 275, 542, 570, 858, 340, 866, 648, 874, 877,
+ 483, 564, 888, 448, 896, 1086, 382, 902, 908, 913,
+ 916, 418, 401, 588, 920, 921, 5, 925, 626, 627,
+ 940, 300, 948, 961, 416, 1029, 1031, 484, 485, 525,
+ 456, 507, 530, 486, 1052, 436, 403, 1055, 487, 488,
+ 426, 427, 1073, 1070, 346, 1154, 345, 444, 308, 1141,
+ 584, 1105, 452, 1193, 1150, 337, 489, 490, 359, 376,
+ 1188, 431, 1195, 1202, 333, 367, 571
+ );
+
+ protected $ruleToNonTerminal = array(
+ 0, 1, 3, 3, 2, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
+ 7, 7, 8, 8, 9, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 14, 14, 15, 15,
+ 15, 15, 17, 17, 13, 13, 18, 18, 19, 19,
+ 20, 20, 21, 21, 16, 16, 22, 24, 24, 25,
+ 26, 26, 28, 27, 27, 27, 27, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 10, 10, 50, 50,
+ 52, 51, 51, 44, 44, 54, 54, 55, 55, 11,
+ 12, 12, 12, 58, 58, 58, 59, 59, 62, 62,
+ 60, 60, 63, 63, 37, 37, 46, 46, 49, 49,
+ 49, 48, 48, 64, 38, 38, 38, 38, 65, 65,
+ 66, 66, 67, 67, 35, 35, 31, 31, 68, 33,
+ 33, 69, 32, 32, 34, 34, 45, 45, 45, 56,
+ 56, 71, 71, 72, 72, 74, 74, 74, 73, 73,
+ 57, 57, 75, 75, 75, 76, 76, 77, 77, 77,
+ 41, 41, 78, 78, 78, 42, 42, 79, 79, 61,
+ 61, 80, 80, 80, 80, 85, 85, 86, 86, 87,
+ 87, 87, 87, 87, 88, 89, 89, 84, 84, 81,
+ 81, 83, 83, 91, 91, 90, 90, 90, 90, 90,
+ 90, 82, 82, 92, 92, 43, 43, 36, 36, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 30, 30, 40, 40, 97, 97, 98,
+ 98, 98, 98, 104, 93, 93, 100, 100, 106, 106,
+ 107, 108, 108, 108, 108, 108, 108, 112, 112, 53,
+ 53, 53, 94, 94, 113, 113, 109, 109, 114, 114,
+ 114, 114, 95, 95, 95, 99, 99, 99, 105, 105,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 23, 23, 23, 23, 23, 23, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 103, 103, 96, 96, 96, 96, 120, 120,
+ 123, 123, 122, 122, 124, 124, 47, 47, 47, 47,
+ 126, 126, 125, 125, 125, 125, 125, 127, 127, 111,
+ 111, 115, 115, 110, 110, 128, 128, 128, 128, 116,
+ 116, 116, 116, 102, 102, 117, 117, 117, 117, 70,
+ 129, 129, 130, 130, 130, 101, 101, 131, 131, 132,
+ 132, 132, 132, 118, 118, 118, 118, 134, 135, 133,
+ 133, 133, 133, 133, 133, 133, 136, 136, 136
+ );
+
+ protected $ruleToLength = array(
+ 1, 1, 2, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 1, 1, 1, 1, 1, 3,
+ 5, 4, 3, 4, 2, 3, 1, 1, 7, 8,
+ 6, 7, 3, 1, 3, 1, 3, 1, 1, 3,
+ 1, 2, 1, 2, 3, 1, 3, 3, 1, 3,
+ 2, 0, 1, 1, 1, 1, 1, 3, 5, 8,
+ 3, 5, 9, 3, 2, 3, 2, 3, 2, 3,
+ 2, 3, 3, 3, 1, 2, 5, 7, 9, 5,
+ 6, 3, 3, 2, 2, 1, 1, 1, 0, 2,
+ 8, 0, 4, 1, 3, 0, 1, 0, 1, 10,
+ 7, 6, 5, 1, 2, 2, 0, 2, 0, 2,
+ 0, 2, 1, 3, 1, 4, 1, 4, 1, 1,
+ 4, 1, 3, 3, 3, 4, 4, 5, 0, 2,
+ 4, 3, 1, 1, 1, 4, 0, 2, 3, 0,
+ 2, 4, 0, 2, 0, 3, 1, 2, 1, 1,
+ 0, 1, 3, 4, 6, 1, 1, 1, 0, 1,
+ 0, 2, 2, 3, 3, 1, 3, 1, 2, 2,
+ 3, 1, 1, 2, 4, 3, 1, 1, 3, 2,
+ 0, 3, 3, 9, 3, 1, 3, 0, 2, 4,
+ 5, 4, 4, 4, 3, 1, 1, 1, 3, 1,
+ 1, 0, 1, 1, 2, 1, 1, 1, 1, 1,
+ 1, 1, 3, 1, 3, 3, 1, 0, 1, 1,
+ 3, 3, 4, 4, 1, 2, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 2, 2,
+ 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
+ 2, 2, 2, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 1, 3, 5, 4, 3, 4, 4,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 1, 1, 1, 3, 2, 1,
+ 2, 10, 11, 3, 3, 2, 4, 4, 3, 4,
+ 4, 4, 4, 7, 3, 2, 0, 4, 1, 3,
+ 2, 2, 4, 6, 2, 2, 4, 1, 1, 1,
+ 2, 3, 1, 1, 1, 1, 1, 1, 3, 3,
+ 4, 4, 0, 2, 1, 0, 1, 1, 0, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 2, 1, 3, 1, 4, 3, 1, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 5, 4,
+ 4, 3, 1, 3, 1, 1, 3, 3, 0, 2,
+ 0, 1, 3, 1, 3, 1, 1, 1, 1, 1,
+ 6, 4, 3, 4, 2, 4, 4, 1, 3, 1,
+ 2, 1, 1, 4, 1, 3, 6, 4, 4, 4,
+ 4, 1, 4, 0, 1, 1, 3, 1, 1, 4,
+ 3, 1, 1, 1, 0, 0, 2, 3, 1, 3,
+ 1, 4, 2, 2, 2, 1, 2, 1, 1, 1,
+ 4, 3, 3, 3, 6, 3, 1, 1, 1
+ );
+
+ protected function reduceRule0() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule1() {
+ $this->semValue = $this->handleNamespaces($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule2() {
+ if (is_array($this->semStack[$this->stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); } else { $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; };
+ }
+
+ protected function reduceRule3() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule4() {
+ $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $nop = null; };
+ if ($nop !== null) { $this->semStack[$this->stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule5() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule6() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule7() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule8() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule9() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule10() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule11() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule12() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule13() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule14() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule15() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule16() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule17() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule18() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule19() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule20() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule21() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule22() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule23() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule24() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule25() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule26() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule27() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule28() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule29() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule30() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule31() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule32() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule33() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule34() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule35() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule36() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule37() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule38() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule39() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule40() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule41() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule42() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule43() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule44() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule45() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule46() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule47() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule48() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule49() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule50() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule51() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule52() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule53() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule54() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule55() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule56() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule57() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule58() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule59() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule60() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule61() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule62() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule63() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule64() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule65() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule66() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule67() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule68() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule69() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule70() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule71() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule72() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule73() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule74() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule75() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule76() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule77() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule78() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule79() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule80() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule81() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule82() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule83() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule84() {
+ $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule85() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule86() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule87() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule88() {
+ $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule89() {
+ $this->semValue = new Stmt\Namespace_($this->semStack[$this->stackPos-(3-2)], null, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkNamespace($this->semValue);
+ }
+
+ protected function reduceRule90() {
+ $this->semValue = new Stmt\Namespace_($this->semStack[$this->stackPos-(5-2)], $this->semStack[$this->stackPos-(5-4)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); $this->checkNamespace($this->semValue);
+ }
+
+ protected function reduceRule91() {
+ $this->semValue = new Stmt\Namespace_(null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkNamespace($this->semValue);
+ }
+
+ protected function reduceRule92() {
+ $this->semValue = new Stmt\Use_($this->semStack[$this->stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule93() {
+ $this->semValue = new Stmt\Use_($this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-2)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule94() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule95() {
+ $this->semValue = new Stmt\Const_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule96() {
+ $this->semValue = Stmt\Use_::TYPE_FUNCTION;
+ }
+
+ protected function reduceRule97() {
+ $this->semValue = Stmt\Use_::TYPE_CONSTANT;
+ }
+
+ protected function reduceRule98() {
+ $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(7-3)], $this->startAttributeStack[$this->stackPos-(7-3)] + $this->endAttributeStack[$this->stackPos-(7-3)]), $this->semStack[$this->stackPos-(7-6)], $this->semStack[$this->stackPos-(7-2)], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule99() {
+ $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(8-4)], $this->startAttributeStack[$this->stackPos-(8-4)] + $this->endAttributeStack[$this->stackPos-(8-4)]), $this->semStack[$this->stackPos-(8-7)], $this->semStack[$this->stackPos-(8-2)], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule100() {
+ $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(6-2)], $this->startAttributeStack[$this->stackPos-(6-2)] + $this->endAttributeStack[$this->stackPos-(6-2)]), $this->semStack[$this->stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule101() {
+ $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(7-3)], $this->startAttributeStack[$this->stackPos-(7-3)] + $this->endAttributeStack[$this->stackPos-(7-3)]), $this->semStack[$this->stackPos-(7-6)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule102() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule103() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule104() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule105() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule106() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule107() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule108() {
+ $this->semValue = new Stmt\UseUse($this->semStack[$this->stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $this->stackPos-(1-1));
+ }
+
+ protected function reduceRule109() {
+ $this->semValue = new Stmt\UseUse($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $this->stackPos-(3-3));
+ }
+
+ protected function reduceRule110() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule111() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule112() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL;
+ }
+
+ protected function reduceRule113() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)]; $this->semValue->type = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule114() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule115() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule116() {
+ $this->semValue = new Node\Const_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule117() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule118() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule119() {
+ $this->semValue = new Node\Const_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule120() {
+ if (is_array($this->semStack[$this->stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); } else { $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; };
+ }
+
+ protected function reduceRule121() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule122() {
+ $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $nop = null; };
+ if ($nop !== null) { $this->semStack[$this->stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule123() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule124() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule125() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule126() {
+ throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule127() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)]; $attrs = $this->startAttributeStack[$this->stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments']) && isset($stmts[0])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); };
+ }
+
+ protected function reduceRule128() {
+ $this->semValue = new Stmt\If_($this->semStack[$this->stackPos-(5-2)], ['stmts' => is_array($this->semStack[$this->stackPos-(5-3)]) ? $this->semStack[$this->stackPos-(5-3)] : array($this->semStack[$this->stackPos-(5-3)]), 'elseifs' => $this->semStack[$this->stackPos-(5-4)], 'else' => $this->semStack[$this->stackPos-(5-5)]], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule129() {
+ $this->semValue = new Stmt\If_($this->semStack[$this->stackPos-(8-2)], ['stmts' => $this->semStack[$this->stackPos-(8-4)], 'elseifs' => $this->semStack[$this->stackPos-(8-5)], 'else' => $this->semStack[$this->stackPos-(8-6)]], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule130() {
+ $this->semValue = new Stmt\While_($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule131() {
+ $this->semValue = new Stmt\Do_($this->semStack[$this->stackPos-(5-4)], is_array($this->semStack[$this->stackPos-(5-2)]) ? $this->semStack[$this->stackPos-(5-2)] : array($this->semStack[$this->stackPos-(5-2)]), $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule132() {
+ $this->semValue = new Stmt\For_(['init' => $this->semStack[$this->stackPos-(9-3)], 'cond' => $this->semStack[$this->stackPos-(9-5)], 'loop' => $this->semStack[$this->stackPos-(9-7)], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule133() {
+ $this->semValue = new Stmt\Switch_($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule134() {
+ $this->semValue = new Stmt\Break_(null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule135() {
+ $this->semValue = new Stmt\Break_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule136() {
+ $this->semValue = new Stmt\Continue_(null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule137() {
+ $this->semValue = new Stmt\Continue_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule138() {
+ $this->semValue = new Stmt\Return_(null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule139() {
+ $this->semValue = new Stmt\Return_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule140() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule141() {
+ $this->semValue = new Stmt\Global_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule142() {
+ $this->semValue = new Stmt\Static_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule143() {
+ $this->semValue = new Stmt\Echo_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule144() {
+ $this->semValue = new Stmt\InlineHTML($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule145() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule146() {
+ $this->semValue = new Stmt\Unset_($this->semStack[$this->stackPos-(5-3)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule147() {
+ $this->semValue = new Stmt\Foreach_($this->semStack[$this->stackPos-(7-3)], $this->semStack[$this->stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$this->stackPos-(7-5)][1], 'stmts' => $this->semStack[$this->stackPos-(7-7)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule148() {
+ $this->semValue = new Stmt\Foreach_($this->semStack[$this->stackPos-(9-3)], $this->semStack[$this->stackPos-(9-7)][0], ['keyVar' => $this->semStack[$this->stackPos-(9-5)], 'byRef' => $this->semStack[$this->stackPos-(9-7)][1], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule149() {
+ $this->semValue = new Stmt\Declare_($this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule150() {
+ $this->semValue = new Stmt\TryCatch($this->semStack[$this->stackPos-(6-3)], $this->semStack[$this->stackPos-(6-5)], $this->semStack[$this->stackPos-(6-6)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue);
+ }
+
+ protected function reduceRule151() {
+ $this->semValue = new Stmt\Throw_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule152() {
+ $this->semValue = new Stmt\Goto_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule153() {
+ $this->semValue = new Stmt\Label($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule154() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule155() {
+ $this->semValue = array(); /* means: no statement */
+ }
+
+ protected function reduceRule156() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule157() {
+ $startAttributes = $this->startAttributeStack[$this->stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $this->semValue = null; };
+ if ($this->semValue === null) $this->semValue = array(); /* means: no statement */
+ }
+
+ protected function reduceRule158() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule159() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule160() {
+ $this->semValue = new Stmt\Catch_(array($this->semStack[$this->stackPos-(8-3)]), substr($this->semStack[$this->stackPos-(8-4)], 1), $this->semStack[$this->stackPos-(8-7)], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule161() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule162() {
+ $this->semValue = new Stmt\Finally_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule163() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule164() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule165() {
+ $this->semValue = false;
+ }
+
+ protected function reduceRule166() {
+ $this->semValue = true;
+ }
+
+ protected function reduceRule167() {
+ $this->semValue = false;
+ }
+
+ protected function reduceRule168() {
+ $this->semValue = true;
+ }
+
+ protected function reduceRule169() {
+ $this->semValue = new Stmt\Function_($this->semStack[$this->stackPos-(10-3)], ['byRef' => $this->semStack[$this->stackPos-(10-2)], 'params' => $this->semStack[$this->stackPos-(10-5)], 'returnType' => $this->semStack[$this->stackPos-(10-7)], 'stmts' => $this->semStack[$this->stackPos-(10-9)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule170() {
+ $this->semValue = new Stmt\Class_($this->semStack[$this->stackPos-(7-2)], ['type' => $this->semStack[$this->stackPos-(7-1)], 'extends' => $this->semStack[$this->stackPos-(7-3)], 'implements' => $this->semStack[$this->stackPos-(7-4)], 'stmts' => $this->semStack[$this->stackPos-(7-6)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ $this->checkClass($this->semValue, $this->stackPos-(7-2));
+ }
+
+ protected function reduceRule171() {
+ $this->semValue = new Stmt\Interface_($this->semStack[$this->stackPos-(6-2)], ['extends' => $this->semStack[$this->stackPos-(6-3)], 'stmts' => $this->semStack[$this->stackPos-(6-5)]], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ $this->checkInterface($this->semValue, $this->stackPos-(6-2));
+ }
+
+ protected function reduceRule172() {
+ $this->semValue = new Stmt\Trait_($this->semStack[$this->stackPos-(5-2)], ['stmts' => $this->semStack[$this->stackPos-(5-4)]], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule173() {
+ $this->semValue = 0;
+ }
+
+ protected function reduceRule174() {
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ }
+
+ protected function reduceRule175() {
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ }
+
+ protected function reduceRule176() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule177() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule178() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule179() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule180() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule181() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule182() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule183() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule184() {
+ $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule185() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule186() {
+ $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule187() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule188() {
+ $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule189() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule190() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule191() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule192() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule193() {
+ $this->semValue = new Stmt\DeclareDeclare($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule194() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule195() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-3)];
+ }
+
+ protected function reduceRule196() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule197() {
+ $this->semValue = $this->semStack[$this->stackPos-(5-3)];
+ }
+
+ protected function reduceRule198() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule199() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule200() {
+ $this->semValue = new Stmt\Case_($this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule201() {
+ $this->semValue = new Stmt\Case_(null, $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule202() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule203() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule204() {
+ $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule205() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule206() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule207() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule208() {
+ $this->semValue = new Stmt\ElseIf_($this->semStack[$this->stackPos-(3-2)], is_array($this->semStack[$this->stackPos-(3-3)]) ? $this->semStack[$this->stackPos-(3-3)] : array($this->semStack[$this->stackPos-(3-3)]), $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule209() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule210() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule211() {
+ $this->semValue = new Stmt\ElseIf_($this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule212() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule213() {
+ $this->semValue = new Stmt\Else_(is_array($this->semStack[$this->stackPos-(2-2)]) ? $this->semStack[$this->stackPos-(2-2)] : array($this->semStack[$this->stackPos-(2-2)]), $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule214() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule215() {
+ $this->semValue = new Stmt\Else_($this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule216() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false);
+ }
+
+ protected function reduceRule217() {
+ $this->semValue = array($this->semStack[$this->stackPos-(2-2)], true);
+ }
+
+ protected function reduceRule218() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false);
+ }
+
+ protected function reduceRule219() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule220() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule221() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule222() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule223() {
+ $this->semValue = new Node\Param(substr($this->semStack[$this->stackPos-(4-4)], 1), null, $this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue);
+ }
+
+ protected function reduceRule224() {
+ $this->semValue = new Node\Param(substr($this->semStack[$this->stackPos-(6-4)], 1), $this->semStack[$this->stackPos-(6-6)], $this->semStack[$this->stackPos-(6-1)], $this->semStack[$this->stackPos-(6-2)], $this->semStack[$this->stackPos-(6-3)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue);
+ }
+
+ protected function reduceRule225() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule226() {
+ $this->semValue = 'array';
+ }
+
+ protected function reduceRule227() {
+ $this->semValue = 'callable';
+ }
+
+ protected function reduceRule228() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule229() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule230() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule231() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule232() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule233() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule234() {
+ $this->semValue = array(new Node\Arg($this->semStack[$this->stackPos-(3-2)], false, false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes));
+ }
+
+ protected function reduceRule235() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule236() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule237() {
+ $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(1-1)], false, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule238() {
+ $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(2-2)], true, false, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule239() {
+ $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(2-2)], false, true, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule240() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule241() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule242() {
+ $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule243() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule244() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule245() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule246() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule247() {
+ $this->semValue = new Stmt\StaticVar(substr($this->semStack[$this->stackPos-(1-1)], 1), null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule248() {
+ $this->semValue = new Stmt\StaticVar(substr($this->semStack[$this->stackPos-(3-1)], 1), $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule249() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule250() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule251() {
+ $this->semValue = new Stmt\Property($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $this->stackPos-(3-1));
+ }
+
+ protected function reduceRule252() {
+ $this->semValue = new Stmt\ClassConst($this->semStack[$this->stackPos-(3-2)], 0, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule253() {
+ $this->semValue = new Stmt\ClassMethod($this->semStack[$this->stackPos-(9-4)], ['type' => $this->semStack[$this->stackPos-(9-1)], 'byRef' => $this->semStack[$this->stackPos-(9-3)], 'params' => $this->semStack[$this->stackPos-(9-6)], 'returnType' => $this->semStack[$this->stackPos-(9-8)], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes);
+ $this->checkClassMethod($this->semValue, $this->stackPos-(9-1));
+ }
+
+ protected function reduceRule254() {
+ $this->semValue = new Stmt\TraitUse($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule255() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule256() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule257() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule258() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule259() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule260() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(5-1)][0], $this->semStack[$this->stackPos-(5-1)][1], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-4)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule261() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], $this->semStack[$this->stackPos-(4-3)], null, $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule262() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule263() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule264() {
+ $this->semValue = array($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)]);
+ }
+
+ protected function reduceRule265() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule266() {
+ $this->semValue = array(null, $this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule267() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule268() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule269() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule270() {
+ $this->semValue = 0;
+ }
+
+ protected function reduceRule271() {
+ $this->semValue = 0;
+ }
+
+ protected function reduceRule272() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule273() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule274() {
+ $this->checkModifier($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->stackPos-(2-2)); $this->semValue = $this->semStack[$this->stackPos-(2-1)] | $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule275() {
+ $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
+ }
+
+ protected function reduceRule276() {
+ $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
+ }
+
+ protected function reduceRule277() {
+ $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
+ }
+
+ protected function reduceRule278() {
+ $this->semValue = Stmt\Class_::MODIFIER_STATIC;
+ }
+
+ protected function reduceRule279() {
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ }
+
+ protected function reduceRule280() {
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ }
+
+ protected function reduceRule281() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule282() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule283() {
+ $this->semValue = new Stmt\PropertyProperty(substr($this->semStack[$this->stackPos-(1-1)], 1), null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule284() {
+ $this->semValue = new Stmt\PropertyProperty(substr($this->semStack[$this->stackPos-(3-1)], 1), $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule285() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule286() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule287() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule288() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule289() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule290() {
+ $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule291() {
+ $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule292() {
+ $this->semValue = new Expr\AssignRef($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule293() {
+ $this->semValue = new Expr\AssignRef($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule294() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule295() {
+ $this->semValue = new Expr\Clone_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule296() {
+ $this->semValue = new Expr\AssignOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule297() {
+ $this->semValue = new Expr\AssignOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule298() {
+ $this->semValue = new Expr\AssignOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule299() {
+ $this->semValue = new Expr\AssignOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule300() {
+ $this->semValue = new Expr\AssignOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule301() {
+ $this->semValue = new Expr\AssignOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule302() {
+ $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule303() {
+ $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule304() {
+ $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule305() {
+ $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule306() {
+ $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule307() {
+ $this->semValue = new Expr\AssignOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule308() {
+ $this->semValue = new Expr\PostInc($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule309() {
+ $this->semValue = new Expr\PreInc($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule310() {
+ $this->semValue = new Expr\PostDec($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule311() {
+ $this->semValue = new Expr\PreDec($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule312() {
+ $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule313() {
+ $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule314() {
+ $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule315() {
+ $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule316() {
+ $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule317() {
+ $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule318() {
+ $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule319() {
+ $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule320() {
+ $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule321() {
+ $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule322() {
+ $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule323() {
+ $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule324() {
+ $this->semValue = new Expr\BinaryOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule325() {
+ $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule326() {
+ $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule327() {
+ $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule328() {
+ $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule329() {
+ $this->semValue = new Expr\UnaryPlus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule330() {
+ $this->semValue = new Expr\UnaryMinus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule331() {
+ $this->semValue = new Expr\BooleanNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule332() {
+ $this->semValue = new Expr\BitwiseNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule333() {
+ $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule334() {
+ $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule335() {
+ $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule336() {
+ $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule337() {
+ $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule338() {
+ $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule339() {
+ $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule340() {
+ $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule341() {
+ $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule342() {
+ $this->semValue = new Expr\Instanceof_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule343() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule344() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule345() {
+ $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(5-1)], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule346() {
+ $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(4-1)], null, $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule347() {
+ $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule348() {
+ $this->semValue = new Expr\Isset_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule349() {
+ $this->semValue = new Expr\Empty_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule350() {
+ $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule351() {
+ $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule352() {
+ $this->semValue = new Expr\Eval_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule353() {
+ $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule354() {
+ $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule355() {
+ $this->semValue = new Expr\Cast\Int_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule356() {
+ $this->semValue = new Expr\Cast\Double($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule357() {
+ $this->semValue = new Expr\Cast\String_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule358() {
+ $this->semValue = new Expr\Cast\Array_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule359() {
+ $this->semValue = new Expr\Cast\Object_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule360() {
+ $this->semValue = new Expr\Cast\Bool_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule361() {
+ $this->semValue = new Expr\Cast\Unset_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule362() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes;
+ $attrs['kind'] = strtolower($this->semStack[$this->stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
+ $this->semValue = new Expr\Exit_($this->semStack[$this->stackPos-(2-2)], $attrs);
+ }
+
+ protected function reduceRule363() {
+ $this->semValue = new Expr\ErrorSuppress($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule364() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule365() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule366() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule367() {
+ $this->semValue = new Expr\ShellExec($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule368() {
+ $this->semValue = new Expr\Print_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule369() {
+ $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule370() {
+ $this->semValue = new Expr\YieldFrom($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule371() {
+ $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$this->stackPos-(10-2)], 'params' => $this->semStack[$this->stackPos-(10-4)], 'uses' => $this->semStack[$this->stackPos-(10-6)], 'returnType' => $this->semStack[$this->stackPos-(10-7)], 'stmts' => $this->semStack[$this->stackPos-(10-9)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule372() {
+ $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$this->stackPos-(11-3)], 'params' => $this->semStack[$this->stackPos-(11-5)], 'uses' => $this->semStack[$this->stackPos-(11-7)], 'returnType' => $this->semStack[$this->stackPos-(11-8)], 'stmts' => $this->semStack[$this->stackPos-(11-10)]], $this->startAttributeStack[$this->stackPos-(11-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule373() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule374() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule375() {
+ $this->semValue = new Expr\Yield_($this->semStack[$this->stackPos-(2-2)], null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule376() {
+ $this->semValue = new Expr\Yield_($this->semStack[$this->stackPos-(4-4)], $this->semStack[$this->stackPos-(4-2)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule377() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG;
+ $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(4-3)], $attrs);
+ }
+
+ protected function reduceRule378() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT;
+ $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(3-2)], $attrs);
+ }
+
+ protected function reduceRule379() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule380() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$this->stackPos-(4-1)][0] === "'" || ($this->semStack[$this->stackPos-(4-1)][1] === "'" && ($this->semStack[$this->stackPos-(4-1)][0] === 'b' || $this->semStack[$this->stackPos-(4-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED);
+ $this->semValue = new Expr\ArrayDimFetch(new Scalar\String_(Scalar\String_::parse($this->semStack[$this->stackPos-(4-1)]), $attrs), $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule381() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule382() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule383() {
+ $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$this->stackPos-(7-3)], 'implements' => $this->semStack[$this->stackPos-(7-4)], 'stmts' => $this->semStack[$this->stackPos-(7-6)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(7-2)]);
+ $this->checkClass($this->semValue[0], -1);
+ }
+
+ protected function reduceRule384() {
+ $this->semValue = new Expr\New_($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule385() {
+ list($class, $ctorArgs) = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule386() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule387() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-3)];
+ }
+
+ protected function reduceRule388() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule389() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule390() {
+ $this->semValue = new Expr\ClosureUse(substr($this->semStack[$this->stackPos-(2-2)], 1), $this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule391() {
+ $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule392() {
+ $this->semValue = new Expr\StaticCall($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule393() {
+ $this->semValue = new Expr\StaticCall($this->semStack[$this->stackPos-(6-1)], $this->semStack[$this->stackPos-(6-4)], $this->semStack[$this->stackPos-(6-6)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule394() {
+
+ if ($this->semStack[$this->stackPos-(2-1)] instanceof Node\Expr\StaticPropertyFetch) {
+ $this->semValue = new Expr\StaticCall($this->semStack[$this->stackPos-(2-1)]->class, new Expr\Variable($this->semStack[$this->stackPos-(2-1)]->name, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ } elseif ($this->semStack[$this->stackPos-(2-1)] instanceof Node\Expr\ArrayDimFetch) {
+ $tmp = $this->semStack[$this->stackPos-(2-1)];
+ while ($tmp->var instanceof Node\Expr\ArrayDimFetch) {
+ $tmp = $tmp->var;
+ }
+
+ $this->semValue = new Expr\StaticCall($tmp->var->class, $this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ $tmp->var = new Expr\Variable($tmp->var->name, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ } else {
+ throw new \Exception;
+ }
+
+ }
+
+ protected function reduceRule395() {
+ $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule396() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule397() {
+ $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule398() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule399() {
+ $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule400() {
+ $this->semValue = new Name\FullyQualified($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule401() {
+ $this->semValue = new Name\Relative($this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule402() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule403() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule404() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule405() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule406() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule407() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule408() {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule409() {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule410() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule411() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule412() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule413() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule414() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule415() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule416() {
+ $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$this->stackPos-(1-1)], '`', false), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes));
+ }
+
+ protected function reduceRule417() {
+ foreach ($this->semStack[$this->stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule418() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule419() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule420() {
+ $this->semValue = $this->parseLNumber($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes, true);
+ }
+
+ protected function reduceRule421() {
+ $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$this->stackPos-(1-1)]), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule422() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$this->stackPos-(1-1)][0] === "'" || ($this->semStack[$this->stackPos-(1-1)][1] === "'" && ($this->semStack[$this->stackPos-(1-1)][0] === 'b' || $this->semStack[$this->stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED);
+ $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$this->stackPos-(1-1)], false), $attrs);
+ }
+
+ protected function reduceRule423() {
+ $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule424() {
+ $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule425() {
+ $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule426() {
+ $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule427() {
+ $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule428() {
+ $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule429() {
+ $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule430() {
+ $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule431() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(3-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(3-1)], $matches); $attrs['docLabel'] = $matches[1];;
+ $this->semValue = new Scalar\String_(Scalar\String_::parseDocString($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-2)], false), $attrs);
+ }
+
+ protected function reduceRule432() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(2-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(2-1)], $matches); $attrs['docLabel'] = $matches[1];;
+ $this->semValue = new Scalar\String_('', $attrs);
+ }
+
+ protected function reduceRule433() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule434() {
+ $this->semValue = new Expr\ClassConstFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule435() {
+ $this->semValue = new Expr\ConstFetch($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule436() {
+ $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule437() {
+ $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule438() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule439() {
+ $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule440() {
+ $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule441() {
+ $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule442() {
+ $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule443() {
+ $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule444() {
+ $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule445() {
+ $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule446() {
+ $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule447() {
+ $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule448() {
+ $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule449() {
+ $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule450() {
+ $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule451() {
+ $this->semValue = new Expr\BinaryOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule452() {
+ $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule453() {
+ $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule454() {
+ $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule455() {
+ $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule456() {
+ $this->semValue = new Expr\UnaryPlus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule457() {
+ $this->semValue = new Expr\UnaryMinus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule458() {
+ $this->semValue = new Expr\BooleanNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule459() {
+ $this->semValue = new Expr\BitwiseNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule460() {
+ $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule461() {
+ $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule462() {
+ $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule463() {
+ $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule464() {
+ $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule465() {
+ $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule466() {
+ $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule467() {
+ $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule468() {
+ $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(5-1)], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule469() {
+ $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(4-1)], null, $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule470() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule471() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule472() {
+ $this->semValue = new Expr\ConstFetch($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule473() {
+ $this->semValue = new Expr\ClassConstFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule474() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule475() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule476() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
+ foreach ($this->semStack[$this->stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$this->stackPos-(3-2)], $attrs);
+ }
+
+ protected function reduceRule477() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(3-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(3-1)], $matches); $attrs['docLabel'] = $matches[1];;
+ foreach ($this->semStack[$this->stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, null, true); } } $s->value = preg_replace('~(\r\n|\n|\r)\z~', '', $s->value); if ('' === $s->value) array_pop($this->semStack[$this->stackPos-(3-2)]);; $this->semValue = new Scalar\Encapsed($this->semStack[$this->stackPos-(3-2)], $attrs);
+ }
+
+ protected function reduceRule478() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule479() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule480() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule481() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule482() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule483() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule484() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule485() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule486() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule487() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule488() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule489() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule490() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(6-2)], $this->semStack[$this->stackPos-(6-5)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule491() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule492() {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule493() {
+ $this->semValue = new Expr\MethodCall($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule494() {
+ $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule495() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule496() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule497() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule498() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule499() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule500() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule501() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule502() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule503() {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule504() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule505() {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(3-1)], substr($this->semStack[$this->stackPos-(3-3)], 1), $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule506() {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(6-1)], $this->semStack[$this->stackPos-(6-5)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule507() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule508() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule509() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule510() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule511() {
+ $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule512() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule513() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule514() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule515() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule516() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule517() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule518() {
+ $this->semValue = new Expr\Error($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
+ }
+
+ protected function reduceRule519() {
+ $this->semValue = new Expr\List_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule520() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule521() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule522() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule523() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule524() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule525() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule526() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule527() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule528() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule529() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule530() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule531() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(4-4)], $this->semStack[$this->stackPos-(4-1)], true, $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule532() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(2-2)], null, true, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule533() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule534() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule535() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule536() {
+ $this->semValue = array($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]);
+ }
+
+ protected function reduceRule537() {
+ $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule538() {
+ $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule539() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule540() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule541() {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule542() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule543() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule544() {
+ $this->semValue = new Expr\ArrayDimFetch(new Expr\Variable($this->semStack[$this->stackPos-(6-2)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(6-4)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule545() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule546() {
+ $this->semValue = new Scalar\String_($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule547() {
+ $this->semValue = new Scalar\String_($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule548() {
+ $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php
new file mode 100644
index 0000000..1727dd9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php
@@ -0,0 +1,2770 @@
+<?php
+
+namespace PhpParser\Parser;
+
+use PhpParser\Error;
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+use PhpParser\Node\Scalar;
+use PhpParser\Node\Stmt;
+
+/* This is an automatically GENERATED file, which should not be manually edited.
+ * Instead edit one of the following:
+ * * the grammar files grammar/php5.y or grammar/php7.y
+ * * the skeleton file grammar/parser.template
+ * * the preprocessing script grammar/rebuildParsers.php
+ */
+class Php7 extends \PhpParser\ParserAbstract
+{
+ protected $tokenToSymbolMapSize = 392;
+ protected $actionTableSize = 894;
+ protected $gotoTableSize = 429;
+
+ protected $invalidSymbol = 157;
+ protected $errorSymbol = 1;
+ protected $defaultAction = -32766;
+ protected $unexpectedTokenRule = 32767;
+
+ protected $YY2TBLSTATE = 337;
+ protected $YYNLSTATES = 564;
+
+ protected $symbolToName = array(
+ "EOF",
+ "error",
+ "T_INCLUDE",
+ "T_INCLUDE_ONCE",
+ "T_EVAL",
+ "T_REQUIRE",
+ "T_REQUIRE_ONCE",
+ "','",
+ "T_LOGICAL_OR",
+ "T_LOGICAL_XOR",
+ "T_LOGICAL_AND",
+ "T_PRINT",
+ "T_YIELD",
+ "T_DOUBLE_ARROW",
+ "T_YIELD_FROM",
+ "'='",
+ "T_PLUS_EQUAL",
+ "T_MINUS_EQUAL",
+ "T_MUL_EQUAL",
+ "T_DIV_EQUAL",
+ "T_CONCAT_EQUAL",
+ "T_MOD_EQUAL",
+ "T_AND_EQUAL",
+ "T_OR_EQUAL",
+ "T_XOR_EQUAL",
+ "T_SL_EQUAL",
+ "T_SR_EQUAL",
+ "T_POW_EQUAL",
+ "'?'",
+ "':'",
+ "T_COALESCE",
+ "T_BOOLEAN_OR",
+ "T_BOOLEAN_AND",
+ "'|'",
+ "'^'",
+ "'&'",
+ "T_IS_EQUAL",
+ "T_IS_NOT_EQUAL",
+ "T_IS_IDENTICAL",
+ "T_IS_NOT_IDENTICAL",
+ "T_SPACESHIP",
+ "'<'",
+ "T_IS_SMALLER_OR_EQUAL",
+ "'>'",
+ "T_IS_GREATER_OR_EQUAL",
+ "T_SL",
+ "T_SR",
+ "'+'",
+ "'-'",
+ "'.'",
+ "'*'",
+ "'/'",
+ "'%'",
+ "'!'",
+ "T_INSTANCEOF",
+ "'~'",
+ "T_INC",
+ "T_DEC",
+ "T_INT_CAST",
+ "T_DOUBLE_CAST",
+ "T_STRING_CAST",
+ "T_ARRAY_CAST",
+ "T_OBJECT_CAST",
+ "T_BOOL_CAST",
+ "T_UNSET_CAST",
+ "'@'",
+ "T_POW",
+ "'['",
+ "T_NEW",
+ "T_CLONE",
+ "T_EXIT",
+ "T_IF",
+ "T_ELSEIF",
+ "T_ELSE",
+ "T_ENDIF",
+ "T_LNUMBER",
+ "T_DNUMBER",
+ "T_STRING",
+ "T_STRING_VARNAME",
+ "T_VARIABLE",
+ "T_NUM_STRING",
+ "T_INLINE_HTML",
+ "T_ENCAPSED_AND_WHITESPACE",
+ "T_CONSTANT_ENCAPSED_STRING",
+ "T_ECHO",
+ "T_DO",
+ "T_WHILE",
+ "T_ENDWHILE",
+ "T_FOR",
+ "T_ENDFOR",
+ "T_FOREACH",
+ "T_ENDFOREACH",
+ "T_DECLARE",
+ "T_ENDDECLARE",
+ "T_AS",
+ "T_SWITCH",
+ "T_ENDSWITCH",
+ "T_CASE",
+ "T_DEFAULT",
+ "T_BREAK",
+ "T_CONTINUE",
+ "T_GOTO",
+ "T_FUNCTION",
+ "T_CONST",
+ "T_RETURN",
+ "T_TRY",
+ "T_CATCH",
+ "T_FINALLY",
+ "T_THROW",
+ "T_USE",
+ "T_INSTEADOF",
+ "T_GLOBAL",
+ "T_STATIC",
+ "T_ABSTRACT",
+ "T_FINAL",
+ "T_PRIVATE",
+ "T_PROTECTED",
+ "T_PUBLIC",
+ "T_VAR",
+ "T_UNSET",
+ "T_ISSET",
+ "T_EMPTY",
+ "T_HALT_COMPILER",
+ "T_CLASS",
+ "T_TRAIT",
+ "T_INTERFACE",
+ "T_EXTENDS",
+ "T_IMPLEMENTS",
+ "T_OBJECT_OPERATOR",
+ "T_LIST",
+ "T_ARRAY",
+ "T_CALLABLE",
+ "T_CLASS_C",
+ "T_TRAIT_C",
+ "T_METHOD_C",
+ "T_FUNC_C",
+ "T_LINE",
+ "T_FILE",
+ "T_START_HEREDOC",
+ "T_END_HEREDOC",
+ "T_DOLLAR_OPEN_CURLY_BRACES",
+ "T_CURLY_OPEN",
+ "T_PAAMAYIM_NEKUDOTAYIM",
+ "T_NAMESPACE",
+ "T_NS_C",
+ "T_DIR",
+ "T_NS_SEPARATOR",
+ "T_ELLIPSIS",
+ "';'",
+ "'{'",
+ "'}'",
+ "'('",
+ "')'",
+ "'`'",
+ "']'",
+ "'\"'",
+ "'$'"
+ );
+
+ protected $tokenToSymbol = array(
+ 0, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 53, 155, 157, 156, 52, 35, 157,
+ 151, 152, 50, 47, 7, 48, 49, 51, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 29, 148,
+ 41, 15, 43, 28, 65, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 67, 157, 154, 34, 157, 153, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 149, 33, 150, 55, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 1, 2, 3, 4,
+ 5, 6, 8, 9, 10, 11, 12, 13, 14, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 30, 31, 32, 36, 37, 38, 39, 40, 42,
+ 44, 45, 46, 54, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 66, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 157, 157,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 157, 157, 157, 157,
+ 157, 157, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147
+ );
+
+ protected $action = array(
+ 569, 570, 571, 572, 573, 215, 574, 575, 576, 612,
+ 613, 1005, 27, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110,-32766,-32766,-32766, 95, 96,
+ 97, 0, 239, 116, -267,-32766,-32766,-32766,-32766,-32766,
+ -32766, 530, 241, 114, 98,-32766, 274,-32766,-32766,-32766,
+ -32766,-32766, 577, 870, 872,-32766,-32766,-32766,-32766,-32766,
+ -32766,-32766,-32766, 224,-32766, 714, 578, 579, 580, 581,
+ 582, 583, 584,-32766, 265, 644, 840, 841, 842, 839,
+ 838, 837, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 615, 616, 617, 618, 619, 607, 608,
+ 609, 610, 611, 596, 597, 598, 599, 600, 601, 602,
+ 638, 639, 640, 641, 642, 643, 603, 604, 605, 606,
+ 636, 627, 625, 626, 622, 623, 286, 614, 620, 621,
+ 628, 629, 631, 630, 632, 633, 42, 43, 381, 44,
+ 45, 624, 635, 634, -214, 46, 47, 952, 48,-32767,
+ -32767,-32767,-32767, 90, 91, 92, 93, 94, 268, 71,
+ 22, 840, 841, 842, 839, 838, 837, 832,-32766,-32766,
+ -32766, 1041, 1002, 7, 1040, 120, 968, 436, -425, 246,
+ 797, 49, 50, 660, 661, 344, 361, 51,-32766, 52,
+ 219, 220, 53, 54, 55, 56, 57, 58, 59, 60,
+ 1019, 22, 232, 61, 351, 945,-32766,-32766,-32766, 969,
+ 970, 646, 705, 1002, 28, -459, 125, 968,-32766,-32766,
+ -32766, 715, 398, 399, 24, 1002,-32766, 339,-32766,-32766,
+ -32766,-32766, 25, 222, 982, 226, 355, 289,-32766, -425,
+ -32766,-32766,-32766, -161, 65, 1049, 408, 1051, 1050, 258,
+ -32766,-32766, 246, -425, 394, 395, 358, 519, 945, 537,
+ -425, 216, -428, 398, 399, 239, 974, 975, 976, 977,
+ 971, 972, 243, 111, -424, -423, 1016, 409, 978, 973,
+ 353, 791, 792, 275, 964, 63, 131, 255, 378, 256,
+ 258, 382, -122, -122, -122, -4, 715, 383, 646, 1046,
+ 40, 704, 258, -219, 33, 17, 384, -122, 385, -122,
+ 386, -122, 387, -122, 814, 388, -122, -122, -122, 34,
+ 35, 389, 352, 520, 36, 390, 353, 659, 62, 518,
+ 818, 287, 288, 391, 392, -424, -423, -238, 21, 393,
+ 38, -423, 690, 735, 396, 397, 41, 22, 122, -424,
+ -423,-32766,-32766,-32766, 791, 792, -424, -423, -427, 1002,
+ -459, 248, 1002, 968, 409, -461, 382, 353, 717, 535,
+ -122,-32766, 383,-32766,-32766, 295, 704, -469, 701, 33,
+ 17, 384, 115, 385, -470, 386, 362, 387, -161, 224,
+ 388, 350, 945, -162, 34, 35, 389, 352, 345, 36,
+ 390, 247, -423, 62, 254, 715, 287, 288, 391, 392,
+ 399,-32766,-32766,-32766, 393, 952, -423, 652, 735, 396,
+ 397, 369, 113, -423, 367, 130, 72, 73, 74, 813,
+ 764, 65, 121, 539, 1002, 128, 258, 124, 271, 258,
+ 92, 93, 94, 717, 535, -4, 26, 112, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 117, 239, 118, 715, 382, 660, 661, 276, 494,
+ 18, 383, -238, 798, 98, 704, 127, 297, 33, 17,
+ 384, 1020, 385, 1002, 386, 119, 387, 505, 506, 388,
+ 126, 120, 541, 34, 35, 389, 715, 713, 36, 390,
+ -461, 258, 62, 791, 792, 287, 288, 376, 6, 490,
+ 491, 552, -469, 393, -469, 547, 945, 702, 242, -470,
+ 221, -470, 223, 728, 548, 225, 938, 346, -162, 459,
+ 98, 370, 829, 553, 382, 817, 563, 653, 538, 765,
+ 383, 39, 717, 535, 704, 514, 448, 33, 17, 384,
+ 1044, 385, 430, 386, 429, 387, 359, 357, 388, 16,
+ 258, 435, 34, 35, 389, 715, 382, 36, 390, 449,
+ 647, 62, 383, 646, 287, 288, 704, 673, 941, 33,
+ 17, 384, 393, 385, 315, 386, 503, 387, 434, 492,
+ 388, 445, 529, 542, 34, 35, 389, 715, 440, 36,
+ 390,-32766, 495, 62, 515, 499, 287, 288, -80, 266,
+ 356, 751, 535, 500, 393, 452, 10, 214, 267, 730,
+ 509, 270, 340, 273, 736, 540, 703, 488, 0, 821,
+ 0, 0, 0, 984, 0, 382, 0, 981, 0, 0,
+ 0, 383, 0, 717, 535, 704, 227, 0, 33, 17,
+ 384, 737, 385, 338, 386, 926, 387, 0, 0, 388,
+ 0, 0, 3, 34, 35, 389, 715, 382, 36, 390,
+ 0, -382, 62, 383, 294, 287, 288, 704, 22, 9,
+ 33, 17, 384, 393, 385, 309, 386, 320, 387, 442,
+ 1002, 388, 358, 325, 968, 34, 35, 389, 321, 341,
+ 36, 390, 656, 823, 62, 657, 31, 287, 288, 711,
+ 561, 562, 717, 535, 658, 393, 32, 822, 825, 824,
+ 747, 749, 693, 945, 759, 758, 752, 767, 695, 706,
+ 700, 712, 699, 698, 0, 264, 382, 263, 536, 543,
+ 398, 399, 383, 559, 717, 535, 704, 558, 556, 33,
+ 17, 384, 554, 385, 551, 386, 550, 387, 546, 545,
+ 388, 337, 65, 934, 34, 35, 389, 258, 830, 36,
+ 390, 722, 663, 62, 662, 757, 287, 288,-32766,-32766,
+ -32766, 732, 733, 665, 393, 664, 756, 555, 691, 1048,
+ 1045, 1003, 996, 1009, 1014, 1017, 734, 933,-32766, 932,
+ -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767,
+ -32767, 731, 724, 717, 535, 37, 1047, 654, 655, 0,
+ -449, -428, 348, 343, 269, 238, 237, 236, 235, -427,
+ -426, 20, 218, 23, 29, 217, 132, 30, 64, 66,
+ 129, 67, 68, 123, 70, 69, -451, 0, 11, 15,
+ 19, 910, 250, 296, 467, 909, 472, 484, 528, 913,
+ -215, -217, 966, 956, 525, 379, 375, 373, 371, 14,
+ 13, 12, -214, 0, -394, 0, 493, 1008, 1043, 994,
+ 995, 965, 0, 983
+ );
+
+ protected $actionCheck = array(
+ 2, 3, 4, 5, 6, 13, 8, 9, 10, 11,
+ 12, 1, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 8, 9, 10, 50, 51,
+ 52, 0, 54, 7, 79, 8, 9, 10, 8, 9,
+ 10, 77, 7, 13, 66, 28, 7, 30, 31, 32,
+ 33, 34, 54, 56, 57, 28, 8, 30, 31, 32,
+ 33, 34, 35, 35, 109, 1, 68, 69, 70, 71,
+ 72, 73, 74, 118, 7, 77, 112, 113, 114, 115,
+ 116, 117, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 7, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 2, 3, 4, 5,
+ 6, 143, 144, 145, 152, 11, 12, 1, 14, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 109, 149,
+ 67, 112, 113, 114, 115, 116, 117, 118, 8, 9,
+ 10, 79, 79, 7, 82, 147, 83, 82, 67, 28,
+ 152, 47, 48, 102, 103, 7, 7, 53, 28, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 1, 67, 68, 69, 70, 112, 8, 9, 10, 75,
+ 76, 77, 148, 79, 13, 7, 67, 83, 8, 9,
+ 10, 1, 129, 130, 7, 79, 28, 146, 30, 31,
+ 32, 33, 140, 141, 139, 7, 102, 7, 28, 128,
+ 30, 31, 32, 7, 151, 77, 112, 79, 80, 156,
+ 8, 9, 28, 142, 120, 121, 146, 77, 112, 149,
+ 149, 13, 151, 129, 130, 54, 132, 133, 134, 135,
+ 136, 137, 138, 15, 67, 67, 77, 143, 144, 145,
+ 146, 130, 131, 33, 1, 151, 15, 153, 7, 155,
+ 156, 71, 72, 73, 74, 0, 1, 77, 77, 150,
+ 67, 81, 156, 152, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 148, 95, 96, 97, 98, 99,
+ 100, 101, 102, 143, 104, 105, 146, 148, 108, 79,
+ 150, 111, 112, 113, 114, 128, 128, 7, 7, 119,
+ 67, 67, 122, 123, 124, 125, 7, 67, 149, 142,
+ 142, 8, 9, 10, 130, 131, 149, 149, 151, 79,
+ 152, 128, 79, 83, 143, 7, 71, 146, 148, 149,
+ 150, 28, 77, 30, 31, 142, 81, 7, 148, 84,
+ 85, 86, 149, 88, 7, 90, 7, 92, 152, 35,
+ 95, 7, 112, 7, 99, 100, 101, 102, 103, 104,
+ 105, 128, 128, 108, 109, 1, 111, 112, 113, 114,
+ 130, 8, 9, 10, 119, 1, 142, 122, 123, 124,
+ 125, 29, 149, 149, 7, 15, 8, 9, 10, 148,
+ 29, 151, 149, 29, 79, 15, 156, 15, 143, 156,
+ 47, 48, 49, 148, 149, 150, 28, 15, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 15, 54, 15, 1, 71, 102, 103, 67, 72,
+ 73, 77, 152, 152, 66, 81, 97, 98, 84, 85,
+ 86, 152, 88, 79, 90, 29, 92, 72, 73, 95,
+ 29, 147, 29, 99, 100, 101, 1, 29, 104, 105,
+ 152, 156, 108, 130, 131, 111, 112, 102, 103, 106,
+ 107, 29, 152, 119, 154, 29, 112, 148, 29, 152,
+ 35, 154, 35, 35, 29, 35, 152, 123, 152, 128,
+ 66, 149, 148, 149, 71, 148, 149, 148, 149, 148,
+ 77, 67, 148, 149, 81, 74, 77, 84, 85, 86,
+ 77, 88, 77, 90, 77, 92, 77, 77, 95, 152,
+ 156, 77, 99, 100, 101, 1, 71, 104, 105, 77,
+ 77, 108, 77, 77, 111, 112, 81, 77, 79, 84,
+ 85, 86, 119, 88, 78, 90, 79, 92, 79, 79,
+ 95, 86, 89, 29, 99, 100, 101, 1, 82, 104,
+ 105, 82, 87, 108, 91, 93, 111, 112, 94, 126,
+ 102, 148, 149, 96, 119, 94, 94, 94, 127, 147,
+ 96, 110, 146, 126, 123, 29, 148, 109, -1, 148,
+ -1, -1, -1, 139, -1, 71, -1, 139, -1, -1,
+ -1, 77, -1, 148, 149, 81, 35, -1, 84, 85,
+ 86, 123, 88, 149, 90, 153, 92, -1, -1, 95,
+ -1, -1, 142, 99, 100, 101, 1, 71, 104, 105,
+ -1, 142, 108, 77, 142, 111, 112, 81, 67, 142,
+ 84, 85, 86, 119, 88, 146, 90, 146, 92, 146,
+ 79, 95, 146, 146, 83, 99, 100, 101, 146, 146,
+ 104, 105, 148, 148, 108, 148, 148, 111, 112, 148,
+ 148, 148, 148, 149, 148, 119, 148, 148, 148, 148,
+ 148, 148, 148, 112, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, -1, 149, 71, 149, 149, 149,
+ 129, 130, 77, 149, 148, 149, 81, 149, 149, 84,
+ 85, 86, 149, 88, 149, 90, 149, 92, 149, 149,
+ 95, 149, 151, 150, 99, 100, 101, 156, 150, 104,
+ 105, 150, 150, 108, 150, 150, 111, 112, 8, 9,
+ 10, 150, 150, 150, 119, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 28, 150,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 150, 150, 148, 149, 151, 150, 150, 150, -1,
+ 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
+ 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
+ 151, 151, 151, 151, 151, 151, 151, -1, 152, 152,
+ 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
+ 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
+ 152, 152, 152, -1, 153, -1, 154, 154, 154, 154,
+ 154, 154, -1, 155
+ );
+
+ protected $actionBase = array(
+ 0, 220, 295, 283, 180, 565, -2, -2, -2, -2,
+ -36, 606, 574, 505, 574, 404, 473, 675, 675, 675,
+ 28, 354, 495, 495, 495, 516, 466, 497, 500, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 401, 64, 201, 571, 710, 717, 712,
+ 707, 706, 533, 711, 709, 248, 650, 651, 471, 652,
+ 653, 654, 655, 715, 732, 708, 716, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 48, 30, 242, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 160, 160, 160, 343, 210,
+ 208, 198, 17, 274, 27, 780, 780, 780, 780, 780,
+ 108, 108, 108, 108, 621, 621, 93, 280, 280, 280,
+ 280, 280, 280, 280, 280, 280, 280, 280, 656, 642,
+ 641, 623, 414, 393, 393, 151, 151, 151, 151, 146,
+ -45, 224, 224, 95, 504, 738, 383, 199, 199, 111,
+ 207, -22, -22, -22, 81, 526, 92, 92, 10, 274,
+ 274, 233, 274, 374, 374, 374, 221, 221, 221, 221,
+ 221, 110, 529, 221, 221, 221, 168, 527, 646, 397,
+ 534, 635, 273, 377, 370, 486, 563, 355, 518, 355,
+ 413, 407, 425, 539, 355, 355, 392, 401, 394, 211,
+ 488, 502, 179, 564, 230, 379, 411, 399, 417, 598,
+ 567, 714, 236, 713, 339, 149, 211, 211, 211, 331,
+ 596, 622, 330, -8, 645, 514, 386, 415, 358, 643,
+ 634, 281, 632, 166, 384, 250, 491, 506, 506, 506,
+ 506, 506, 506, 498, 506, 485, 690, 690, 479, 520,
+ 498, 674, 498, 506, 690, 498, 498, 493, 506, 507,
+ 507, 485, 519, 501, 690, 690, 501, 479, 498, 572,
+ 573, 528, 482, 499, 499, 528, 498, 499, 520, 499,
+ 31, 697, 698, 478, 700, 693, 701, 681, 704, 487,
+ 599, 511, 538, 694, 691, 703, 494, 490, 696, 692,
+ 553, 576, 489, 258, 432, 530, 484, 689, 518, 556,
+ 474, 474, 474, 484, 680, 474, 474, 474, 474, 474,
+ 474, 474, 474, 737, 217, 542, 515, 595, 594, 593,
+ 456, 592, 549, 531, 458, 613, 508, 553, 553, 648,
+ 731, 512, 503, 687, 721, 702, 568, 26, 422, 686,
+ 647, 551, 510, 562, 685, 609, 258, 720, 649, 483,
+ 553, 678, 474, 679, 705, 735, 736, 688, 733, 726,
+ 35, 557, 591, 39, 734, 677, 608, 604, 578, 729,
+ 719, 725, 724, 39, 590, 525, 718, 522, 682, 517,
+ 683, 600, 420, 676, 699, 589, 728, 727, 730, 588,
+ 587, 620, 619, 410, 271, 695, 496, 481, 523, 586,
+ 509, 672, 617, 684, 584, 583, 671, 659, 722, 524,
+ 556, 547, 521, 532, 513, 615, 657, 723, 492, 582,
+ 581, 580, 631, 579, 628, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 134, 134, -2, -2, -2,
+ 0, 0, 0, 0, -2, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, -3, 418, 418, -3, 418, 418,
+ 418, 418, 418, 418, -22, -22, -22, -22, 221, 221,
+ 221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
+ 221, 221, 49, 49, 49, 49, 221, -22, -22, 221,
+ 221, 221, 221, 221, 49, 221, 221, 92, 92, 92,
+ 221, 355, 355, 0, 0, 0, 0, 0, 506, 92,
+ 0, 0, 355, 0, 0, 0, 0, 506, 506, 506,
+ 0, 0, 0, 0, 0, 506, 92, 0, 0, 0,
+ 0, 389, 389, 39, 389, 389, 0, 0, 0, 506,
+ 506, 0, 519, 0, 0, 0, 0, 690, 0, 0,
+ 0, 0, 0, 474, 26, 687, 0, 119, 0, 0,
+ 0, 0, 0, 503, 119, 228, 0, 228, 0, 0,
+ 474, 474, 474, 0, 503, 503, 0, 0, 67, 503,
+ 0, 0, 0, 67, 178, 0, 178, 0, 0, 0,
+ 39
+ );
+
+ protected $actionDefault = array(
+ 3,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767, 471, 471, 471,32767,32767,32767,32767, 285,
+ 463, 285, 285,32767, 421, 421, 421, 421, 421, 421,
+ 421, 463,32767,32767,32767,32767,32767, 364,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767, 468,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 347, 348, 350,
+ 351, 284, 422, 237, 467, 283, 116, 246, 239, 191,
+ 282, 223, 119, 312, 365, 314, 363, 367, 313, 290,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 288, 289, 366, 344, 343, 342, 310, 311,
+ 287, 315, 317, 287, 316, 333, 334, 331, 332, 335,
+ 336, 337, 338, 339,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 269, 269,
+ 269, 269,32767, 324, 325, 229, 229, 229, 229,32767,
+ 270, 229,32767,32767,32767,32767,32767,32767,32767, 415,
+ 341, 319, 320, 318,32767, 393,32767, 395,32767, 307,
+ 309, 387, 291,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767, 390, 423, 423,32767,32767,32767, 381,32767,
+ 159, 210, 212, 398,32767,32767,32767,32767,32767, 329,
+ 32767,32767,32767,32767,32767,32767, 478,32767,32767,32767,
+ 32767,32767, 423,32767,32767,32767, 321, 322, 323,32767,
+ 32767,32767, 423, 423,32767,32767, 423,32767, 423,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767, 163,32767,32767, 396, 396,32767,32767,
+ 163, 391, 163,32767,32767, 163, 163, 176,32767, 174,
+ 174,32767,32767, 178,32767, 437, 178,32767, 163, 196,
+ 196, 373, 165, 231, 231, 373, 163, 231,32767, 231,
+ 32767,32767,32767, 82,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 383,32767,32767,32767, 403,32767, 416, 435, 381,32767,
+ 327, 328, 330,32767, 425, 352, 353, 354, 355, 356,
+ 357, 358, 360,32767, 464, 386,32767,32767,32767,32767,
+ 32767,32767, 84, 108, 245,32767, 476, 84, 384,32767,
+ 476,32767,32767,32767,32767,32767,32767, 286,32767,32767,
+ 32767, 84,32767, 84,32767,32767, 460,32767, 423,32767,
+ 385,32767, 326, 399, 442,32767,32767, 424,32767,32767,
+ 218, 84,32767, 177,32767,32767,32767,32767,32767,32767,
+ 403,32767,32767, 179,32767,32767, 423,32767,32767,32767,
+ 32767,32767, 281,32767,32767,32767,32767,32767, 423,32767,
+ 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767, 82,
+ 60,32767, 263,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767, 121, 121, 3, 3, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 248, 154, 248, 204, 248, 248,
+ 207, 196, 196, 255
+ );
+
+ protected $goto = array(
+ 163, 163, 135, 135, 135, 146, 148, 179, 164, 161,
+ 145, 161, 161, 161, 162, 162, 162, 162, 162, 162,
+ 162, 145, 157, 158, 159, 160, 176, 174, 177, 410,
+ 411, 299, 412, 415, 416, 417, 418, 419, 420, 421,
+ 422, 857, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 147, 173, 175, 178, 195, 198, 199, 201, 202,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 233, 234, 251, 252, 253, 316, 317, 318, 462, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 149, 194, 150, 165, 166, 167, 196,
+ 168, 151, 152, 153, 169, 154, 197, 133, 170, 155,
+ 171, 172, 156, 521, 200, 257, 245, 432, 463, 828,
+ 533, 687, 649, 513, 826, 200, 437, 437, 437, 278,
+ 650, 766, 5, 746, 437, 557, 464, 426, 775, 770,
+ 428, 431, 444, 465, 466, 468, 651, 450, 453, 437,
+ 560, 485, 487, 508, 511, 763, 516, 517, 777, 524,
+ 762, 526, 532, 773, 534, 480, 480, 967, 967, 967,
+ 967, 967, 967, 967, 967, 967, 967, 967, 967, 413,
+ 413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
+ 413, 413, 413, 301, 942, 681, 443, 454, 1037, 1037,
+ 437, 437, 451, 471, 437, 437, 674, 437, 456, 372,
+ 502, 1037, 531, 512, 708, 298, 438, 8, 800, 456,
+ 750, 460, 414, 414, 414, 414, 414, 414, 414, 414,
+ 414, 414, 414, 414, 414, 414, 457, 674, 674, 1036,
+ 1036, 483, 279, 229, 336, 230, 231, 481, 482, 527,
+ 425, 1029, 1036, 478, 496, 943, 300, 425, 461, 475,
+ 1021, 497, 313, 904, 785, 944, 998, 1039, 796, 1010,
+ 285, 789, 670, 329, 307, 310, 804, 668, 544, 332,
+ 935, 940, 366, 807, 678, 477, 377, 754, 844, 667,
+ 667, 675, 675, 675, 677, 0, 666, 0, 323, 498,
+ 328, 312, 312, 259, 260, 283, 458, 262, 322, 284,
+ 326, 486, 0, 0, 0, 0, 0, 0, 0, 0,
+ 280, 281, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 946, 0, 0, 790, 790, 790, 790, 946, 0,
+ 790, 790, 0, 0, 0, 790, 0, 0, 0, 0,
+ 0, 0, 836, 0, 0, 1007, 0, 0, 0, 0,
+ 0, 0, 1007, 0, 0, 744, 744, 744, 720, 744,
+ 1018, 1018, 739, 745, 721, 0, 0, 0, 0, 0,
+ 0, 1004, 780, 780, 1026, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 806, 0, 806, 0, 0, 0, 0, 1011, 1012
+ );
+
+ protected $gotoCheck = array(
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 52, 45, 112, 112, 8, 7, 7,
+ 7, 10, 10, 7, 7, 45, 8, 8, 8, 64,
+ 11, 10, 92, 10, 8, 10, 80, 10, 10, 10,
+ 38, 38, 38, 38, 38, 38, 12, 28, 8, 8,
+ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 113,
+ 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
+ 113, 113, 113, 53, 76, 25, 53, 53, 124, 124,
+ 8, 8, 8, 8, 8, 8, 19, 8, 69, 53,
+ 56, 124, 5, 56, 44, 56, 8, 53, 78, 69,
+ 29, 8, 115, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 114, 19, 19, 123,
+ 123, 62, 62, 60, 62, 60, 60, 55, 55, 55,
+ 109, 122, 123, 35, 35, 76, 41, 109, 2, 2,
+ 120, 43, 42, 96, 72, 76, 76, 123, 74, 117,
+ 14, 75, 21, 18, 9, 13, 79, 20, 66, 17,
+ 102, 104, 58, 81, 22, 59, 100, 63, 94, 19,
+ 19, 19, 19, 19, 19, -1, 19, -1, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, -1, -1, -1, -1, -1, -1, -1, -1,
+ 64, 64, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 52, -1, -1, 52, 52, 52, 52, 52, -1,
+ 52, 52, -1, -1, -1, 52, -1, -1, -1, -1,
+ -1, -1, 92, -1, -1, 80, -1, -1, -1, -1,
+ -1, -1, 80, -1, -1, 52, 52, 52, 52, 52,
+ 80, 80, 52, 52, 52, -1, -1, -1, -1, -1,
+ -1, 80, 69, 69, 69, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 80, -1, 80, -1, -1, -1, -1, 80, 80
+ );
+
+ protected $gotoBase = array(
+ 0, 0, -279, 0, 0, 202, 0, 115, -137, 3,
+ 120, 128, 144, -10, 16, 0, 0, -59, 9, -48,
+ -9, 7, -77, -20, 0, 188, 0, 0, -389, 204,
+ 0, 0, 0, 0, 0, 222, 0, 0, 105, 0,
+ 0, 223, 44, 46, 200, 84, 0, 0, 0, 0,
+ 0, 0, 109, -159, 0, 11, -164, 0, -78, -81,
+ -313, 0, -26, -80, -241, 0, -19, 0, 0, 178,
+ -49, 0, 23, 0, 26, 25, -99, 0, 197, -13,
+ 133, -79, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 122, 0, -90, 0, 24, 0, 0, 0,
+ -89, 0, -67, 0, -69, 0, 0, 0, 0, 18,
+ 0, 0, -140, -35, 213, 8, 0, 21, 0, 0,
+ 219, 0, 227, -5, -46, 0, 0
+ );
+
+ protected $gotoDefault = array(
+ -32768, 380, 565, 2, 566, 637, 645, 504, 400, 433,
+ 748, 688, 689, 303, 342, 401, 302, 330, 324, 676,
+ 669, 671, 679, 134, 333, 682, 1, 684, 439, 716,
+ 291, 692, 292, 507, 694, 446, 696, 697, 427, 304,
+ 305, 447, 311, 479, 707, 203, 308, 709, 290, 710,
+ 719, 335, 293, 510, 489, 469, 501, 402, 363, 476,
+ 228, 455, 473, 753, 277, 761, 549, 769, 772, 403,
+ 404, 470, 784, 368, 794, 788, 961, 319, 799, 805,
+ 993, 808, 811, 349, 331, 327, 815, 816, 4, 820,
+ 522, 523, 835, 240, 843, 856, 347, 923, 925, 441,
+ 374, 936, 360, 334, 939, 997, 354, 405, 364, 953,
+ 261, 282, 244, 406, 423, 249, 407, 365, 1000, 314,
+ 1022, 424, 1030, 1038, 272, 306, 474
+ );
+
+ protected $ruleToNonTerminal = array(
+ 0, 1, 3, 3, 2, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
+ 7, 7, 8, 8, 9, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 14, 14, 15, 15,
+ 15, 15, 17, 17, 13, 13, 18, 18, 19, 19,
+ 20, 20, 21, 21, 16, 16, 22, 24, 24, 25,
+ 26, 26, 28, 27, 27, 27, 27, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 10, 10, 48, 48, 51, 51, 50, 49,
+ 49, 42, 42, 53, 53, 54, 54, 11, 12, 12,
+ 12, 57, 57, 57, 58, 58, 61, 61, 59, 59,
+ 62, 62, 36, 36, 44, 44, 47, 47, 47, 46,
+ 46, 63, 37, 37, 37, 37, 64, 64, 65, 65,
+ 66, 66, 34, 34, 30, 30, 67, 32, 32, 68,
+ 31, 31, 33, 33, 43, 43, 43, 43, 55, 55,
+ 71, 71, 72, 72, 74, 74, 75, 75, 75, 73,
+ 73, 56, 56, 76, 76, 77, 77, 78, 78, 78,
+ 39, 39, 79, 40, 40, 81, 81, 60, 60, 82,
+ 82, 82, 82, 87, 87, 88, 88, 89, 89, 89,
+ 89, 89, 90, 91, 91, 86, 86, 83, 83, 85,
+ 85, 93, 93, 92, 92, 92, 92, 92, 92, 84,
+ 84, 94, 94, 41, 41, 35, 35, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 101, 95, 95, 100, 100, 103, 103, 104, 105, 105,
+ 105, 109, 109, 52, 52, 52, 96, 96, 96, 107,
+ 107, 97, 97, 99, 99, 99, 102, 102, 113, 113,
+ 113, 70, 115, 115, 115, 98, 98, 98, 98, 98,
+ 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
+ 98, 38, 38, 111, 111, 111, 106, 106, 106, 116,
+ 116, 116, 116, 116, 116, 45, 45, 45, 80, 80,
+ 80, 80, 118, 110, 110, 110, 110, 110, 110, 108,
+ 108, 108, 117, 117, 117, 117, 69, 119, 119, 120,
+ 120, 120, 120, 120, 114, 121, 121, 122, 122, 122,
+ 122, 122, 112, 112, 112, 112, 124, 125, 123, 123,
+ 123, 123, 123, 123, 123, 126, 126, 126
+ );
+
+ protected $ruleToLength = array(
+ 1, 1, 2, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 1, 1, 1, 1, 1, 3,
+ 5, 4, 3, 4, 2, 3, 1, 1, 7, 8,
+ 6, 7, 3, 1, 3, 1, 3, 1, 1, 3,
+ 1, 2, 1, 2, 3, 1, 3, 3, 1, 3,
+ 2, 0, 1, 1, 1, 1, 1, 3, 7, 10,
+ 5, 7, 9, 5, 3, 3, 3, 3, 3, 3,
+ 1, 2, 5, 7, 9, 5, 6, 3, 3, 2,
+ 2, 1, 1, 1, 0, 2, 1, 3, 8, 0,
+ 4, 1, 3, 0, 1, 0, 1, 10, 7, 6,
+ 5, 1, 2, 2, 0, 2, 0, 2, 0, 2,
+ 1, 3, 1, 4, 1, 4, 1, 1, 4, 1,
+ 3, 3, 3, 4, 4, 5, 0, 2, 4, 3,
+ 1, 1, 1, 4, 0, 2, 5, 0, 2, 6,
+ 0, 2, 0, 3, 1, 2, 1, 1, 1, 0,
+ 1, 3, 4, 6, 1, 2, 1, 1, 1, 0,
+ 1, 0, 2, 2, 3, 1, 3, 1, 2, 2,
+ 3, 1, 1, 3, 1, 1, 3, 2, 0, 3,
+ 4, 9, 3, 1, 3, 0, 2, 4, 5, 4,
+ 4, 4, 3, 1, 1, 1, 3, 1, 1, 0,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 3, 3, 1, 0, 1, 1, 3, 3,
+ 3, 4, 1, 2, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
+ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 5, 4, 3, 4, 4, 2, 2, 4,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 1, 3, 2, 1, 2, 4, 2, 10, 11,
+ 7, 3, 2, 0, 4, 1, 3, 2, 2, 2,
+ 4, 1, 1, 1, 2, 3, 1, 1, 1, 1,
+ 1, 0, 3, 0, 1, 1, 0, 1, 1, 3,
+ 3, 3, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 3, 2, 3,
+ 3, 0, 1, 1, 3, 1, 1, 3, 1, 1,
+ 4, 4, 4, 1, 4, 1, 1, 3, 1, 4,
+ 2, 2, 3, 1, 4, 4, 3, 3, 3, 1,
+ 3, 1, 1, 3, 1, 1, 4, 3, 1, 1,
+ 1, 3, 3, 0, 1, 3, 1, 3, 1, 4,
+ 2, 0, 2, 2, 1, 2, 1, 1, 1, 4,
+ 3, 3, 3, 6, 3, 1, 1, 1
+ );
+
+ protected function reduceRule0() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule1() {
+ $this->semValue = $this->handleNamespaces($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule2() {
+ if (is_array($this->semStack[$this->stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); } else { $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; };
+ }
+
+ protected function reduceRule3() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule4() {
+ $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $nop = null; };
+ if ($nop !== null) { $this->semStack[$this->stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule5() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule6() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule7() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule8() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule9() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule10() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule11() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule12() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule13() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule14() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule15() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule16() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule17() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule18() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule19() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule20() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule21() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule22() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule23() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule24() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule25() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule26() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule27() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule28() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule29() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule30() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule31() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule32() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule33() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule34() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule35() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule36() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule37() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule38() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule39() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule40() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule41() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule42() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule43() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule44() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule45() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule46() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule47() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule48() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule49() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule50() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule51() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule52() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule53() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule54() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule55() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule56() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule57() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule58() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule59() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule60() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule61() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule62() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule63() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule64() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule65() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule66() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule67() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule68() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule69() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule70() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule71() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule72() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule73() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule74() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule75() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule76() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule77() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule78() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule79() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule80() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule81() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule82() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule83() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule84() {
+ $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule85() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule86() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule87() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule88() {
+ $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule89() {
+ $this->semValue = new Stmt\Namespace_($this->semStack[$this->stackPos-(3-2)], null, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkNamespace($this->semValue);
+ }
+
+ protected function reduceRule90() {
+ $this->semValue = new Stmt\Namespace_($this->semStack[$this->stackPos-(5-2)], $this->semStack[$this->stackPos-(5-4)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes); $this->checkNamespace($this->semValue);
+ }
+
+ protected function reduceRule91() {
+ $this->semValue = new Stmt\Namespace_(null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkNamespace($this->semValue);
+ }
+
+ protected function reduceRule92() {
+ $this->semValue = new Stmt\Use_($this->semStack[$this->stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule93() {
+ $this->semValue = new Stmt\Use_($this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-2)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule94() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule95() {
+ $this->semValue = new Stmt\Const_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule96() {
+ $this->semValue = Stmt\Use_::TYPE_FUNCTION;
+ }
+
+ protected function reduceRule97() {
+ $this->semValue = Stmt\Use_::TYPE_CONSTANT;
+ }
+
+ protected function reduceRule98() {
+ $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(7-3)], $this->startAttributeStack[$this->stackPos-(7-3)] + $this->endAttributeStack[$this->stackPos-(7-3)]), $this->semStack[$this->stackPos-(7-6)], $this->semStack[$this->stackPos-(7-2)], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule99() {
+ $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(8-4)], $this->startAttributeStack[$this->stackPos-(8-4)] + $this->endAttributeStack[$this->stackPos-(8-4)]), $this->semStack[$this->stackPos-(8-7)], $this->semStack[$this->stackPos-(8-2)], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule100() {
+ $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(6-2)], $this->startAttributeStack[$this->stackPos-(6-2)] + $this->endAttributeStack[$this->stackPos-(6-2)]), $this->semStack[$this->stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule101() {
+ $this->semValue = new Stmt\GroupUse(new Name($this->semStack[$this->stackPos-(7-3)], $this->startAttributeStack[$this->stackPos-(7-3)] + $this->endAttributeStack[$this->stackPos-(7-3)]), $this->semStack[$this->stackPos-(7-6)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule102() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule103() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule104() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule105() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule106() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule107() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule108() {
+ $this->semValue = new Stmt\UseUse($this->semStack[$this->stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $this->stackPos-(1-1));
+ }
+
+ protected function reduceRule109() {
+ $this->semValue = new Stmt\UseUse($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $this->stackPos-(3-3));
+ }
+
+ protected function reduceRule110() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule111() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule112() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL;
+ }
+
+ protected function reduceRule113() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)]; $this->semValue->type = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule114() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule115() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule116() {
+ $this->semValue = new Node\Const_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule117() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule118() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule119() {
+ $this->semValue = new Node\Const_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule120() {
+ if (is_array($this->semStack[$this->stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]); } else { $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)]; };
+ }
+
+ protected function reduceRule121() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule122() {
+ $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $nop = null; };
+ if ($nop !== null) { $this->semStack[$this->stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule123() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule124() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule125() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule126() {
+ throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule127() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)]; $attrs = $this->startAttributeStack[$this->stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments']) && isset($stmts[0])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); };
+ }
+
+ protected function reduceRule128() {
+ $this->semValue = new Stmt\If_($this->semStack[$this->stackPos-(7-3)], ['stmts' => is_array($this->semStack[$this->stackPos-(7-5)]) ? $this->semStack[$this->stackPos-(7-5)] : array($this->semStack[$this->stackPos-(7-5)]), 'elseifs' => $this->semStack[$this->stackPos-(7-6)], 'else' => $this->semStack[$this->stackPos-(7-7)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule129() {
+ $this->semValue = new Stmt\If_($this->semStack[$this->stackPos-(10-3)], ['stmts' => $this->semStack[$this->stackPos-(10-6)], 'elseifs' => $this->semStack[$this->stackPos-(10-7)], 'else' => $this->semStack[$this->stackPos-(10-8)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule130() {
+ $this->semValue = new Stmt\While_($this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule131() {
+ $this->semValue = new Stmt\Do_($this->semStack[$this->stackPos-(7-5)], is_array($this->semStack[$this->stackPos-(7-2)]) ? $this->semStack[$this->stackPos-(7-2)] : array($this->semStack[$this->stackPos-(7-2)]), $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule132() {
+ $this->semValue = new Stmt\For_(['init' => $this->semStack[$this->stackPos-(9-3)], 'cond' => $this->semStack[$this->stackPos-(9-5)], 'loop' => $this->semStack[$this->stackPos-(9-7)], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule133() {
+ $this->semValue = new Stmt\Switch_($this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule134() {
+ $this->semValue = new Stmt\Break_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule135() {
+ $this->semValue = new Stmt\Continue_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule136() {
+ $this->semValue = new Stmt\Return_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule137() {
+ $this->semValue = new Stmt\Global_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule138() {
+ $this->semValue = new Stmt\Static_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule139() {
+ $this->semValue = new Stmt\Echo_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule140() {
+ $this->semValue = new Stmt\InlineHTML($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule141() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule142() {
+ $this->semValue = new Stmt\Unset_($this->semStack[$this->stackPos-(5-3)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule143() {
+ $this->semValue = new Stmt\Foreach_($this->semStack[$this->stackPos-(7-3)], $this->semStack[$this->stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$this->stackPos-(7-5)][1], 'stmts' => $this->semStack[$this->stackPos-(7-7)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule144() {
+ $this->semValue = new Stmt\Foreach_($this->semStack[$this->stackPos-(9-3)], $this->semStack[$this->stackPos-(9-7)][0], ['keyVar' => $this->semStack[$this->stackPos-(9-5)], 'byRef' => $this->semStack[$this->stackPos-(9-7)][1], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule145() {
+ $this->semValue = new Stmt\Declare_($this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule146() {
+ $this->semValue = new Stmt\TryCatch($this->semStack[$this->stackPos-(6-3)], $this->semStack[$this->stackPos-(6-5)], $this->semStack[$this->stackPos-(6-6)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue);
+ }
+
+ protected function reduceRule147() {
+ $this->semValue = new Stmt\Throw_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule148() {
+ $this->semValue = new Stmt\Goto_($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule149() {
+ $this->semValue = new Stmt\Label($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule150() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule151() {
+ $this->semValue = array(); /* means: no statement */
+ }
+
+ protected function reduceRule152() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule153() {
+ $startAttributes = $this->startAttributeStack[$this->stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop(['comments' => $startAttributes['comments']]); } else { $this->semValue = null; };
+ if ($this->semValue === null) $this->semValue = array(); /* means: no statement */
+ }
+
+ protected function reduceRule154() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule155() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule156() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule157() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule158() {
+ $this->semValue = new Stmt\Catch_($this->semStack[$this->stackPos-(8-3)], substr($this->semStack[$this->stackPos-(8-4)], 1), $this->semStack[$this->stackPos-(8-7)], $this->startAttributeStack[$this->stackPos-(8-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule159() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule160() {
+ $this->semValue = new Stmt\Finally_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule161() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule162() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule163() {
+ $this->semValue = false;
+ }
+
+ protected function reduceRule164() {
+ $this->semValue = true;
+ }
+
+ protected function reduceRule165() {
+ $this->semValue = false;
+ }
+
+ protected function reduceRule166() {
+ $this->semValue = true;
+ }
+
+ protected function reduceRule167() {
+ $this->semValue = new Stmt\Function_($this->semStack[$this->stackPos-(10-3)], ['byRef' => $this->semStack[$this->stackPos-(10-2)], 'params' => $this->semStack[$this->stackPos-(10-5)], 'returnType' => $this->semStack[$this->stackPos-(10-7)], 'stmts' => $this->semStack[$this->stackPos-(10-9)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule168() {
+ $this->semValue = new Stmt\Class_($this->semStack[$this->stackPos-(7-2)], ['type' => $this->semStack[$this->stackPos-(7-1)], 'extends' => $this->semStack[$this->stackPos-(7-3)], 'implements' => $this->semStack[$this->stackPos-(7-4)], 'stmts' => $this->semStack[$this->stackPos-(7-6)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes);
+ $this->checkClass($this->semValue, $this->stackPos-(7-2));
+ }
+
+ protected function reduceRule169() {
+ $this->semValue = new Stmt\Interface_($this->semStack[$this->stackPos-(6-2)], ['extends' => $this->semStack[$this->stackPos-(6-3)], 'stmts' => $this->semStack[$this->stackPos-(6-5)]], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ $this->checkInterface($this->semValue, $this->stackPos-(6-2));
+ }
+
+ protected function reduceRule170() {
+ $this->semValue = new Stmt\Trait_($this->semStack[$this->stackPos-(5-2)], ['stmts' => $this->semStack[$this->stackPos-(5-4)]], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule171() {
+ $this->semValue = 0;
+ }
+
+ protected function reduceRule172() {
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ }
+
+ protected function reduceRule173() {
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ }
+
+ protected function reduceRule174() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule175() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule176() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule177() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule178() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule179() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule180() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule181() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule182() {
+ $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule183() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule184() {
+ $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule185() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule186() {
+ $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule187() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule188() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule189() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule190() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule191() {
+ $this->semValue = new Stmt\DeclareDeclare($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule192() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule193() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-3)];
+ }
+
+ protected function reduceRule194() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule195() {
+ $this->semValue = $this->semStack[$this->stackPos-(5-3)];
+ }
+
+ protected function reduceRule196() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule197() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule198() {
+ $this->semValue = new Stmt\Case_($this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule199() {
+ $this->semValue = new Stmt\Case_(null, $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule200() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule201() {
+ $this->semValue = $this->semStack[$this->stackPos];
+ }
+
+ protected function reduceRule202() {
+ $this->semValue = is_array($this->semStack[$this->stackPos-(1-1)]) ? $this->semStack[$this->stackPos-(1-1)] : array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule203() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-2)];
+ }
+
+ protected function reduceRule204() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule205() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule206() {
+ $this->semValue = new Stmt\ElseIf_($this->semStack[$this->stackPos-(5-3)], is_array($this->semStack[$this->stackPos-(5-5)]) ? $this->semStack[$this->stackPos-(5-5)] : array($this->semStack[$this->stackPos-(5-5)]), $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule207() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule208() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule209() {
+ $this->semValue = new Stmt\ElseIf_($this->semStack[$this->stackPos-(6-3)], $this->semStack[$this->stackPos-(6-6)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule210() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule211() {
+ $this->semValue = new Stmt\Else_(is_array($this->semStack[$this->stackPos-(2-2)]) ? $this->semStack[$this->stackPos-(2-2)] : array($this->semStack[$this->stackPos-(2-2)]), $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule212() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule213() {
+ $this->semValue = new Stmt\Else_($this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule214() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false);
+ }
+
+ protected function reduceRule215() {
+ $this->semValue = array($this->semStack[$this->stackPos-(2-2)], true);
+ }
+
+ protected function reduceRule216() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false);
+ }
+
+ protected function reduceRule217() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)], false);
+ }
+
+ protected function reduceRule218() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule219() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule220() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule221() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule222() {
+ $this->semValue = new Node\Param(substr($this->semStack[$this->stackPos-(4-4)], 1), null, $this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-2)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue);
+ }
+
+ protected function reduceRule223() {
+ $this->semValue = new Node\Param(substr($this->semStack[$this->stackPos-(6-4)], 1), $this->semStack[$this->stackPos-(6-6)], $this->semStack[$this->stackPos-(6-1)], $this->semStack[$this->stackPos-(6-2)], $this->semStack[$this->stackPos-(6-3)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue);
+ }
+
+ protected function reduceRule224() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule225() {
+ $this->semValue = new Node\NullableType($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule226() {
+ $this->semValue = $this->handleBuiltinTypes($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule227() {
+ $this->semValue = 'array';
+ }
+
+ protected function reduceRule228() {
+ $this->semValue = 'callable';
+ }
+
+ protected function reduceRule229() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule230() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule231() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule232() {
+ $this->semValue = $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule233() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule234() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule235() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule236() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule237() {
+ $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(1-1)], false, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule238() {
+ $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(2-2)], true, false, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule239() {
+ $this->semValue = new Node\Arg($this->semStack[$this->stackPos-(2-2)], false, true, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule240() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule241() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule242() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule243() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule244() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule245() {
+ $this->semValue = new Stmt\StaticVar(substr($this->semStack[$this->stackPos-(1-1)], 1), null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule246() {
+ $this->semValue = new Stmt\StaticVar(substr($this->semStack[$this->stackPos-(3-1)], 1), $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule247() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule248() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule249() {
+ $this->semValue = new Stmt\Property($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $this->stackPos-(3-1));
+ }
+
+ protected function reduceRule250() {
+ $this->semValue = new Stmt\ClassConst($this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-1)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes); $this->checkClassConst($this->semValue, $this->stackPos-(4-1));
+ }
+
+ protected function reduceRule251() {
+ $this->semValue = new Stmt\ClassMethod($this->semStack[$this->stackPos-(9-4)], ['type' => $this->semStack[$this->stackPos-(9-1)], 'byRef' => $this->semStack[$this->stackPos-(9-3)], 'params' => $this->semStack[$this->stackPos-(9-6)], 'returnType' => $this->semStack[$this->stackPos-(9-8)], 'stmts' => $this->semStack[$this->stackPos-(9-9)]], $this->startAttributeStack[$this->stackPos-(9-1)] + $this->endAttributes);
+ $this->checkClassMethod($this->semValue, $this->stackPos-(9-1));
+ }
+
+ protected function reduceRule252() {
+ $this->semValue = new Stmt\TraitUse($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule253() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule254() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule255() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule256() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule257() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule258() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(5-1)][0], $this->semStack[$this->stackPos-(5-1)][1], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-4)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule259() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], $this->semStack[$this->stackPos-(4-3)], null, $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule260() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule261() {
+ $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$this->stackPos-(4-1)][0], $this->semStack[$this->stackPos-(4-1)][1], null, $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule262() {
+ $this->semValue = array($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)]);
+ }
+
+ protected function reduceRule263() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule264() {
+ $this->semValue = array(null, $this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule265() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule266() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule267() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule268() {
+ $this->semValue = 0;
+ }
+
+ protected function reduceRule269() {
+ $this->semValue = 0;
+ }
+
+ protected function reduceRule270() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule271() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule272() {
+ $this->checkModifier($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->stackPos-(2-2)); $this->semValue = $this->semStack[$this->stackPos-(2-1)] | $this->semStack[$this->stackPos-(2-2)];
+ }
+
+ protected function reduceRule273() {
+ $this->semValue = Stmt\Class_::MODIFIER_PUBLIC;
+ }
+
+ protected function reduceRule274() {
+ $this->semValue = Stmt\Class_::MODIFIER_PROTECTED;
+ }
+
+ protected function reduceRule275() {
+ $this->semValue = Stmt\Class_::MODIFIER_PRIVATE;
+ }
+
+ protected function reduceRule276() {
+ $this->semValue = Stmt\Class_::MODIFIER_STATIC;
+ }
+
+ protected function reduceRule277() {
+ $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT;
+ }
+
+ protected function reduceRule278() {
+ $this->semValue = Stmt\Class_::MODIFIER_FINAL;
+ }
+
+ protected function reduceRule279() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule280() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule281() {
+ $this->semValue = new Stmt\PropertyProperty(substr($this->semStack[$this->stackPos-(1-1)], 1), null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule282() {
+ $this->semValue = new Stmt\PropertyProperty(substr($this->semStack[$this->stackPos-(3-1)], 1), $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule283() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule284() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule285() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule286() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule287() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule288() {
+ $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule289() {
+ $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule290() {
+ $this->semValue = new Expr\Assign($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule291() {
+ $this->semValue = new Expr\AssignRef($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule292() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule293() {
+ $this->semValue = new Expr\Clone_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule294() {
+ $this->semValue = new Expr\AssignOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule295() {
+ $this->semValue = new Expr\AssignOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule296() {
+ $this->semValue = new Expr\AssignOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule297() {
+ $this->semValue = new Expr\AssignOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule298() {
+ $this->semValue = new Expr\AssignOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule299() {
+ $this->semValue = new Expr\AssignOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule300() {
+ $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule301() {
+ $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule302() {
+ $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule303() {
+ $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule304() {
+ $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule305() {
+ $this->semValue = new Expr\AssignOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule306() {
+ $this->semValue = new Expr\PostInc($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule307() {
+ $this->semValue = new Expr\PreInc($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule308() {
+ $this->semValue = new Expr\PostDec($this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule309() {
+ $this->semValue = new Expr\PreDec($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule310() {
+ $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule311() {
+ $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule312() {
+ $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule313() {
+ $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule314() {
+ $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule315() {
+ $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule316() {
+ $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule317() {
+ $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule318() {
+ $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule319() {
+ $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule320() {
+ $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule321() {
+ $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule322() {
+ $this->semValue = new Expr\BinaryOp\Div($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule323() {
+ $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule324() {
+ $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule325() {
+ $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule326() {
+ $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule327() {
+ $this->semValue = new Expr\UnaryPlus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule328() {
+ $this->semValue = new Expr\UnaryMinus($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule329() {
+ $this->semValue = new Expr\BooleanNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule330() {
+ $this->semValue = new Expr\BitwiseNot($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule331() {
+ $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule332() {
+ $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule333() {
+ $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule334() {
+ $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule335() {
+ $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule336() {
+ $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule337() {
+ $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule338() {
+ $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule339() {
+ $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule340() {
+ $this->semValue = new Expr\Instanceof_($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule341() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule342() {
+ $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(5-1)], $this->semStack[$this->stackPos-(5-3)], $this->semStack[$this->stackPos-(5-5)], $this->startAttributeStack[$this->stackPos-(5-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule343() {
+ $this->semValue = new Expr\Ternary($this->semStack[$this->stackPos-(4-1)], null, $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule344() {
+ $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule345() {
+ $this->semValue = new Expr\Isset_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule346() {
+ $this->semValue = new Expr\Empty_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule347() {
+ $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule348() {
+ $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule349() {
+ $this->semValue = new Expr\Eval_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule350() {
+ $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule351() {
+ $this->semValue = new Expr\Include_($this->semStack[$this->stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule352() {
+ $this->semValue = new Expr\Cast\Int_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule353() {
+ $this->semValue = new Expr\Cast\Double($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule354() {
+ $this->semValue = new Expr\Cast\String_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule355() {
+ $this->semValue = new Expr\Cast\Array_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule356() {
+ $this->semValue = new Expr\Cast\Object_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule357() {
+ $this->semValue = new Expr\Cast\Bool_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule358() {
+ $this->semValue = new Expr\Cast\Unset_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule359() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes;
+ $attrs['kind'] = strtolower($this->semStack[$this->stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE;
+ $this->semValue = new Expr\Exit_($this->semStack[$this->stackPos-(2-2)], $attrs);
+ }
+
+ protected function reduceRule360() {
+ $this->semValue = new Expr\ErrorSuppress($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule361() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule362() {
+ $this->semValue = new Expr\ShellExec($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule363() {
+ $this->semValue = new Expr\Print_($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule364() {
+ $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule365() {
+ $this->semValue = new Expr\Yield_($this->semStack[$this->stackPos-(2-2)], null, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule366() {
+ $this->semValue = new Expr\Yield_($this->semStack[$this->stackPos-(4-4)], $this->semStack[$this->stackPos-(4-2)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule367() {
+ $this->semValue = new Expr\YieldFrom($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule368() {
+ $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$this->stackPos-(10-2)], 'params' => $this->semStack[$this->stackPos-(10-4)], 'uses' => $this->semStack[$this->stackPos-(10-6)], 'returnType' => $this->semStack[$this->stackPos-(10-7)], 'stmts' => $this->semStack[$this->stackPos-(10-9)]], $this->startAttributeStack[$this->stackPos-(10-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule369() {
+ $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$this->stackPos-(11-3)], 'params' => $this->semStack[$this->stackPos-(11-5)], 'uses' => $this->semStack[$this->stackPos-(11-7)], 'returnType' => $this->semStack[$this->stackPos-(11-8)], 'stmts' => $this->semStack[$this->stackPos-(11-10)]], $this->startAttributeStack[$this->stackPos-(11-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule370() {
+ $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$this->stackPos-(7-3)], 'implements' => $this->semStack[$this->stackPos-(7-4)], 'stmts' => $this->semStack[$this->stackPos-(7-6)]], $this->startAttributeStack[$this->stackPos-(7-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(7-2)]);
+ $this->checkClass($this->semValue[0], -1);
+ }
+
+ protected function reduceRule371() {
+ $this->semValue = new Expr\New_($this->semStack[$this->stackPos-(3-2)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule372() {
+ list($class, $ctorArgs) = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule373() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule374() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-3)];
+ }
+
+ protected function reduceRule375() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule376() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule377() {
+ $this->semValue = new Expr\ClosureUse(substr($this->semStack[$this->stackPos-(2-2)], 1), $this->semStack[$this->stackPos-(2-1)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule378() {
+ $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule379() {
+ $this->semValue = new Expr\FuncCall($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule380() {
+ $this->semValue = new Expr\StaticCall($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule381() {
+ $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule382() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule383() {
+ $this->semValue = new Name($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule384() {
+ $this->semValue = new Name\FullyQualified($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule385() {
+ $this->semValue = new Name\Relative($this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule386() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule387() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule388() {
+ $this->semValue = new Expr\Error($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
+ }
+
+ protected function reduceRule389() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule390() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule391() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule392() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule393() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule394() {
+ $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$this->stackPos-(1-1)], '`'), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes));
+ }
+
+ protected function reduceRule395() {
+ foreach ($this->semStack[$this->stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule396() {
+ $this->semValue = array();
+ }
+
+ protected function reduceRule397() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule398() {
+ $this->semValue = new Expr\ConstFetch($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule399() {
+ $this->semValue = new Expr\ClassConstFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule400() {
+ $this->semValue = new Expr\ClassConstFetch($this->semStack[$this->stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes), $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2;
+ }
+
+ protected function reduceRule401() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT;
+ $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(3-2)], $attrs);
+ }
+
+ protected function reduceRule402() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG;
+ $this->semValue = new Expr\Array_($this->semStack[$this->stackPos-(4-3)], $attrs);
+ }
+
+ protected function reduceRule403() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule404() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$this->stackPos-(1-1)][0] === "'" || ($this->semStack[$this->stackPos-(1-1)][1] === "'" && ($this->semStack[$this->stackPos-(1-1)][0] === 'b' || $this->semStack[$this->stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED);
+ $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$this->stackPos-(1-1)]), $attrs);
+ }
+
+ protected function reduceRule405() {
+ $this->semValue = $this->parseLNumber($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule406() {
+ $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$this->stackPos-(1-1)]), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule407() {
+ $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule408() {
+ $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule409() {
+ $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule410() {
+ $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule411() {
+ $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule412() {
+ $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule413() {
+ $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule414() {
+ $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule415() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule416() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule417() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(3-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(3-1)], $matches); $attrs['docLabel'] = $matches[1];;
+ $this->semValue = new Scalar\String_(Scalar\String_::parseDocString($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-2)]), $attrs);
+ }
+
+ protected function reduceRule418() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(2-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(2-1)], $matches); $attrs['docLabel'] = $matches[1];;
+ $this->semValue = new Scalar\String_('', $attrs);
+ }
+
+ protected function reduceRule419() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED;
+ foreach ($this->semStack[$this->stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$this->stackPos-(3-2)], $attrs);
+ }
+
+ protected function reduceRule420() {
+ $attrs = $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = strpos($this->semStack[$this->stackPos-(3-1)], "'") === false ? Scalar\String_::KIND_HEREDOC : Scalar\String_::KIND_NOWDOC; preg_match('/\A[bB]?<<<[ \t]*[\'"]?([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\'"]?(?:\r\n|\n|\r)\z/', $this->semStack[$this->stackPos-(3-1)], $matches); $attrs['docLabel'] = $matches[1];;
+ foreach ($this->semStack[$this->stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, null, true); } } $s->value = preg_replace('~(\r\n|\n|\r)\z~', '', $s->value); if ('' === $s->value) array_pop($this->semStack[$this->stackPos-(3-2)]);; $this->semValue = new Scalar\Encapsed($this->semStack[$this->stackPos-(3-2)], $attrs);
+ }
+
+ protected function reduceRule421() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule422() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule423() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule424() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule425() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule426() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule427() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule428() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule429() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule430() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule431() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule432() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule433() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule434() {
+ $this->semValue = new Expr\MethodCall($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->semStack[$this->stackPos-(4-4)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule435() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule436() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule437() {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule438() {
+ $this->semValue = substr($this->semStack[$this->stackPos-(1-1)], 1);
+ }
+
+ protected function reduceRule439() {
+ $this->semValue = $this->semStack[$this->stackPos-(4-3)];
+ }
+
+ protected function reduceRule440() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(2-2)], $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule441() {
+ $this->semValue = new Expr\Error($this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2;
+ }
+
+ protected function reduceRule442() {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule443() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule444() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule445() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule446() {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule447() {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule448() {
+ $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule449() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule450() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule451() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule452() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule453() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule454() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule455() {
+ $this->semValue = new Expr\Error($this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2;
+ }
+
+ protected function reduceRule456() {
+ $this->semValue = new Expr\List_($this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule457() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule458() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule459() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule460() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule461() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule462() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule463() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule464() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) unset($this->semValue[$end]);
+ }
+
+ protected function reduceRule465() {
+ $this->semStack[$this->stackPos-(3-1)][] = $this->semStack[$this->stackPos-(3-3)]; $this->semValue = $this->semStack[$this->stackPos-(3-1)];
+ }
+
+ protected function reduceRule466() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule467() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(3-3)], $this->semStack[$this->stackPos-(3-1)], false, $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule468() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(1-1)], null, false, $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule469() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(4-4)], $this->semStack[$this->stackPos-(4-1)], true, $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule470() {
+ $this->semValue = new Expr\ArrayItem($this->semStack[$this->stackPos-(2-2)], null, true, $this->startAttributeStack[$this->stackPos-(2-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule471() {
+ $this->semValue = null;
+ }
+
+ protected function reduceRule472() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule473() {
+ $this->semStack[$this->stackPos-(2-1)][] = $this->semStack[$this->stackPos-(2-2)]; $this->semValue = $this->semStack[$this->stackPos-(2-1)];
+ }
+
+ protected function reduceRule474() {
+ $this->semValue = array($this->semStack[$this->stackPos-(1-1)]);
+ }
+
+ protected function reduceRule475() {
+ $this->semValue = array($this->semStack[$this->stackPos-(2-1)], $this->semStack[$this->stackPos-(2-2)]);
+ }
+
+ protected function reduceRule476() {
+ $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule477() {
+ $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule478() {
+ $this->semValue = $this->semStack[$this->stackPos-(1-1)];
+ }
+
+ protected function reduceRule479() {
+ $this->semValue = new Expr\ArrayDimFetch($this->semStack[$this->stackPos-(4-1)], $this->semStack[$this->stackPos-(4-3)], $this->startAttributeStack[$this->stackPos-(4-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule480() {
+ $this->semValue = new Expr\PropertyFetch($this->semStack[$this->stackPos-(3-1)], $this->semStack[$this->stackPos-(3-3)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule481() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule482() {
+ $this->semValue = new Expr\Variable($this->semStack[$this->stackPos-(3-2)], $this->startAttributeStack[$this->stackPos-(3-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule483() {
+ $this->semValue = new Expr\ArrayDimFetch(new Expr\Variable($this->semStack[$this->stackPos-(6-2)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes), $this->semStack[$this->stackPos-(6-4)], $this->startAttributeStack[$this->stackPos-(6-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule484() {
+ $this->semValue = $this->semStack[$this->stackPos-(3-2)];
+ }
+
+ protected function reduceRule485() {
+ $this->semValue = new Scalar\String_($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule486() {
+ $this->semValue = new Scalar\String_($this->semStack[$this->stackPos-(1-1)], $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+
+ protected function reduceRule487() {
+ $this->semValue = new Expr\Variable(substr($this->semStack[$this->stackPos-(1-1)], 1), $this->startAttributeStack[$this->stackPos-(1-1)] + $this->endAttributes);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php
new file mode 100644
index 0000000..861663f
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php
@@ -0,0 +1,144 @@
+<?php
+
+namespace PhpParser\Parser;
+
+/* GENERATED file based on grammar/tokens.y */
+final class Tokens
+{
+ const YYERRTOK = 256;
+ const T_INCLUDE = 257;
+ const T_INCLUDE_ONCE = 258;
+ const T_EVAL = 259;
+ const T_REQUIRE = 260;
+ const T_REQUIRE_ONCE = 261;
+ const T_LOGICAL_OR = 262;
+ const T_LOGICAL_XOR = 263;
+ const T_LOGICAL_AND = 264;
+ const T_PRINT = 265;
+ const T_YIELD = 266;
+ const T_DOUBLE_ARROW = 267;
+ const T_YIELD_FROM = 268;
+ const T_PLUS_EQUAL = 269;
+ const T_MINUS_EQUAL = 270;
+ const T_MUL_EQUAL = 271;
+ const T_DIV_EQUAL = 272;
+ const T_CONCAT_EQUAL = 273;
+ const T_MOD_EQUAL = 274;
+ const T_AND_EQUAL = 275;
+ const T_OR_EQUAL = 276;
+ const T_XOR_EQUAL = 277;
+ const T_SL_EQUAL = 278;
+ const T_SR_EQUAL = 279;
+ const T_POW_EQUAL = 280;
+ const T_COALESCE = 281;
+ const T_BOOLEAN_OR = 282;
+ const T_BOOLEAN_AND = 283;
+ const T_IS_EQUAL = 284;
+ const T_IS_NOT_EQUAL = 285;
+ const T_IS_IDENTICAL = 286;
+ const T_IS_NOT_IDENTICAL = 287;
+ const T_SPACESHIP = 288;
+ const T_IS_SMALLER_OR_EQUAL = 289;
+ const T_IS_GREATER_OR_EQUAL = 290;
+ const T_SL = 291;
+ const T_SR = 292;
+ const T_INSTANCEOF = 293;
+ const T_INC = 294;
+ const T_DEC = 295;
+ const T_INT_CAST = 296;
+ const T_DOUBLE_CAST = 297;
+ const T_STRING_CAST = 298;
+ const T_ARRAY_CAST = 299;
+ const T_OBJECT_CAST = 300;
+ const T_BOOL_CAST = 301;
+ const T_UNSET_CAST = 302;
+ const T_POW = 303;
+ const T_NEW = 304;
+ const T_CLONE = 305;
+ const T_EXIT = 306;
+ const T_IF = 307;
+ const T_ELSEIF = 308;
+ const T_ELSE = 309;
+ const T_ENDIF = 310;
+ const T_LNUMBER = 311;
+ const T_DNUMBER = 312;
+ const T_STRING = 313;
+ const T_STRING_VARNAME = 314;
+ const T_VARIABLE = 315;
+ const T_NUM_STRING = 316;
+ const T_INLINE_HTML = 317;
+ const T_CHARACTER = 318;
+ const T_BAD_CHARACTER = 319;
+ const T_ENCAPSED_AND_WHITESPACE = 320;
+ const T_CONSTANT_ENCAPSED_STRING = 321;
+ const T_ECHO = 322;
+ const T_DO = 323;
+ const T_WHILE = 324;
+ const T_ENDWHILE = 325;
+ const T_FOR = 326;
+ const T_ENDFOR = 327;
+ const T_FOREACH = 328;
+ const T_ENDFOREACH = 329;
+ const T_DECLARE = 330;
+ const T_ENDDECLARE = 331;
+ const T_AS = 332;
+ const T_SWITCH = 333;
+ const T_ENDSWITCH = 334;
+ const T_CASE = 335;
+ const T_DEFAULT = 336;
+ const T_BREAK = 337;
+ const T_CONTINUE = 338;
+ const T_GOTO = 339;
+ const T_FUNCTION = 340;
+ const T_CONST = 341;
+ const T_RETURN = 342;
+ const T_TRY = 343;
+ const T_CATCH = 344;
+ const T_FINALLY = 345;
+ const T_THROW = 346;
+ const T_USE = 347;
+ const T_INSTEADOF = 348;
+ const T_GLOBAL = 349;
+ const T_STATIC = 350;
+ const T_ABSTRACT = 351;
+ const T_FINAL = 352;
+ const T_PRIVATE = 353;
+ const T_PROTECTED = 354;
+ const T_PUBLIC = 355;
+ const T_VAR = 356;
+ const T_UNSET = 357;
+ const T_ISSET = 358;
+ const T_EMPTY = 359;
+ const T_HALT_COMPILER = 360;
+ const T_CLASS = 361;
+ const T_TRAIT = 362;
+ const T_INTERFACE = 363;
+ const T_EXTENDS = 364;
+ const T_IMPLEMENTS = 365;
+ const T_OBJECT_OPERATOR = 366;
+ const T_LIST = 367;
+ const T_ARRAY = 368;
+ const T_CALLABLE = 369;
+ const T_CLASS_C = 370;
+ const T_TRAIT_C = 371;
+ const T_METHOD_C = 372;
+ const T_FUNC_C = 373;
+ const T_LINE = 374;
+ const T_FILE = 375;
+ const T_COMMENT = 376;
+ const T_DOC_COMMENT = 377;
+ const T_OPEN_TAG = 378;
+ const T_OPEN_TAG_WITH_ECHO = 379;
+ const T_CLOSE_TAG = 380;
+ const T_WHITESPACE = 381;
+ const T_START_HEREDOC = 382;
+ const T_END_HEREDOC = 383;
+ const T_DOLLAR_OPEN_CURLY_BRACES = 384;
+ const T_CURLY_OPEN = 385;
+ const T_PAAMAYIM_NEKUDOTAYIM = 386;
+ const T_NAMESPACE = 387;
+ const T_NS_C = 388;
+ const T_DIR = 389;
+ const T_NS_SEPARATOR = 390;
+ const T_ELLIPSIS = 391;
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php
new file mode 100644
index 0000000..e9101f2
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php
@@ -0,0 +1,709 @@
+<?php
+
+namespace PhpParser;
+
+/*
+ * This parser is based on a skeleton written by Moriyoshi Koizumi, which in
+ * turn is based on work by Masato Bito.
+ */
+use PhpParser\Node\Name;
+use PhpParser\Node\Param;
+use PhpParser\Node\Scalar\LNumber;
+use PhpParser\Node\Stmt\Class_;
+use PhpParser\Node\Stmt\ClassConst;
+use PhpParser\Node\Stmt\ClassMethod;
+use PhpParser\Node\Stmt\Interface_;
+use PhpParser\Node\Stmt\Namespace_;
+use PhpParser\Node\Stmt\Property;
+use PhpParser\Node\Stmt\TryCatch;
+use PhpParser\Node\Stmt\UseUse;
+
+abstract class ParserAbstract implements Parser
+{
+ const SYMBOL_NONE = -1;
+
+ /*
+ * The following members will be filled with generated parsing data:
+ */
+
+ /** @var int Size of $tokenToSymbol map */
+ protected $tokenToSymbolMapSize;
+ /** @var int Size of $action table */
+ protected $actionTableSize;
+ /** @var int Size of $goto table */
+ protected $gotoTableSize;
+
+ /** @var int Symbol number signifying an invalid token */
+ protected $invalidSymbol;
+ /** @var int Symbol number of error recovery token */
+ protected $errorSymbol;
+ /** @var int Action number signifying default action */
+ protected $defaultAction;
+ /** @var int Rule number signifying that an unexpected token was encountered */
+ protected $unexpectedTokenRule;
+
+ protected $YY2TBLSTATE;
+ protected $YYNLSTATES;
+
+ /** @var array Map of lexer tokens to internal symbols */
+ protected $tokenToSymbol;
+ /** @var array Map of symbols to their names */
+ protected $symbolToName;
+ /** @var array Names of the production rules (only necessary for debugging) */
+ protected $productions;
+
+ /** @var array Map of states to a displacement into the $action table. The corresponding action for this
+ * state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the
+ action is defaulted, i.e. $actionDefault[$state] should be used instead. */
+ protected $actionBase;
+ /** @var array Table of actions. Indexed according to $actionBase comment. */
+ protected $action;
+ /** @var array Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol
+ * then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */
+ protected $actionCheck;
+ /** @var array Map of states to their default action */
+ protected $actionDefault;
+
+ /** @var array Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this
+ * non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */
+ protected $gotoBase;
+ /** @var array Table of states to goto after reduction. Indexed according to $gotoBase comment. */
+ protected $goto;
+ /** @var array Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal
+ * then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */
+ protected $gotoCheck;
+ /** @var array Map of non-terminals to the default state to goto after their reduction */
+ protected $gotoDefault;
+
+ /** @var array Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for
+ * determining the state to goto after reduction. */
+ protected $ruleToNonTerminal;
+ /** @var array Map of rules to the length of their right-hand side, which is the number of elements that have to
+ * be popped from the stack(s) on reduction. */
+ protected $ruleToLength;
+
+ /*
+ * The following members are part of the parser state:
+ */
+
+ /** @var Lexer Lexer that is used when parsing */
+ protected $lexer;
+ /** @var mixed Temporary value containing the result of last semantic action (reduction) */
+ protected $semValue;
+ /** @var int Position in stacks (state stack, semantic value stack, attribute stack) */
+ protected $stackPos;
+ /** @var array Semantic value stack (contains values of tokens and semantic action results) */
+ protected $semStack;
+ /** @var array[] Start attribute stack */
+ protected $startAttributeStack;
+ /** @var array[] End attribute stack */
+ protected $endAttributeStack;
+ /** @var array End attributes of last *shifted* token */
+ protected $endAttributes;
+ /** @var array Start attributes of last *read* token */
+ protected $lookaheadStartAttributes;
+
+ /** @var ErrorHandler Error handler */
+ protected $errorHandler;
+ /** @var Error[] Errors collected during last parse */
+ protected $errors;
+ /** @var int Error state, used to avoid error floods */
+ protected $errorState;
+
+ /**
+ * Creates a parser instance.
+ *
+ * @param Lexer $lexer A lexer
+ * @param array $options Options array. Currently no options are supported.
+ */
+ public function __construct(Lexer $lexer, array $options = array()) {
+ $this->lexer = $lexer;
+ $this->errors = array();
+
+ if (isset($options['throwOnError'])) {
+ throw new \LogicException(
+ '"throwOnError" is no longer supported, use "errorHandler" instead');
+ }
+ }
+
+ /**
+ * Parses PHP code into a node tree.
+ *
+ * If a non-throwing error handler is used, the parser will continue parsing after an error
+ * occurred and attempt to build a partial AST.
+ *
+ * @param string $code The source code to parse
+ * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
+ * to ErrorHandler\Throwing.
+ *
+ * @return Node[]|null Array of statements (or null if the 'throwOnError' option is disabled and the parser was
+ * unable to recover from an error).
+ */
+ public function parse($code, ErrorHandler $errorHandler = null) {
+ $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing;
+
+ // Initialize the lexer
+ $this->lexer->startLexing($code, $this->errorHandler);
+
+ // We start off with no lookahead-token
+ $symbol = self::SYMBOL_NONE;
+
+ // The attributes for a node are taken from the first and last token of the node.
+ // From the first token only the startAttributes are taken and from the last only
+ // the endAttributes. Both are merged using the array union operator (+).
+ $startAttributes = '*POISON';
+ $endAttributes = '*POISON';
+ $this->endAttributes = $endAttributes;
+
+ // Keep stack of start and end attributes
+ $this->startAttributeStack = array();
+ $this->endAttributeStack = array($endAttributes);
+
+ // Start off in the initial state and keep a stack of previous states
+ $state = 0;
+ $stateStack = array($state);
+
+ // Semantic value stack (contains values of tokens and semantic action results)
+ $this->semStack = array();
+
+ // Current position in the stack(s)
+ $this->stackPos = 0;
+
+ $this->errorState = 0;
+
+ for (;;) {
+ //$this->traceNewState($state, $symbol);
+
+ if ($this->actionBase[$state] == 0) {
+ $rule = $this->actionDefault[$state];
+ } else {
+ if ($symbol === self::SYMBOL_NONE) {
+ // Fetch the next token id from the lexer and fetch additional info by-ref.
+ // The end attributes are fetched into a temporary variable and only set once the token is really
+ // shifted (not during read). Otherwise you would sometimes get off-by-one errors, when a rule is
+ // reduced after a token was read but not yet shifted.
+ $tokenId = $this->lexer->getNextToken($tokenValue, $startAttributes, $endAttributes);
+
+ // map the lexer token id to the internally used symbols
+ $symbol = $tokenId >= 0 && $tokenId < $this->tokenToSymbolMapSize
+ ? $this->tokenToSymbol[$tokenId]
+ : $this->invalidSymbol;
+
+ if ($symbol === $this->invalidSymbol) {
+ throw new \RangeException(sprintf(
+ 'The lexer returned an invalid token (id=%d, value=%s)',
+ $tokenId, $tokenValue
+ ));
+ }
+
+ // This is necessary to assign some meaningful attributes to /* empty */ productions. They'll get
+ // the attributes of the next token, even though they don't contain it themselves.
+ $this->startAttributeStack[$this->stackPos+1] = $startAttributes;
+ $this->endAttributeStack[$this->stackPos+1] = $endAttributes;
+ $this->lookaheadStartAttributes = $startAttributes;
+
+ //$this->traceRead($symbol);
+ }
+
+ $idx = $this->actionBase[$state] + $symbol;
+ if ((($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $symbol)
+ || ($state < $this->YY2TBLSTATE
+ && ($idx = $this->actionBase[$state + $this->YYNLSTATES] + $symbol) >= 0
+ && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $symbol))
+ && ($action = $this->action[$idx]) != $this->defaultAction) {
+ /*
+ * >= YYNLSTATES: shift and reduce
+ * > 0: shift
+ * = 0: accept
+ * < 0: reduce
+ * = -YYUNEXPECTED: error
+ */
+ if ($action > 0) {
+ /* shift */
+ //$this->traceShift($symbol);
+
+ ++$this->stackPos;
+ $stateStack[$this->stackPos] = $state = $action;
+ $this->semStack[$this->stackPos] = $tokenValue;
+ $this->startAttributeStack[$this->stackPos] = $startAttributes;
+ $this->endAttributeStack[$this->stackPos] = $endAttributes;
+ $this->endAttributes = $endAttributes;
+ $symbol = self::SYMBOL_NONE;
+
+ if ($this->errorState) {
+ --$this->errorState;
+ }
+
+ if ($action < $this->YYNLSTATES) {
+ continue;
+ }
+
+ /* $yyn >= YYNLSTATES means shift-and-reduce */
+ $rule = $action - $this->YYNLSTATES;
+ } else {
+ $rule = -$action;
+ }
+ } else {
+ $rule = $this->actionDefault[$state];
+ }
+ }
+
+ for (;;) {
+ if ($rule === 0) {
+ /* accept */
+ //$this->traceAccept();
+ return $this->semValue;
+ } elseif ($rule !== $this->unexpectedTokenRule) {
+ /* reduce */
+ //$this->traceReduce($rule);
+
+ try {
+ $this->{'reduceRule' . $rule}();
+ } catch (Error $e) {
+ if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) {
+ $e->setStartLine($startAttributes['startLine']);
+ }
+
+ $this->emitError($e);
+ // Can't recover from this type of error
+ return null;
+ }
+
+ /* Goto - shift nonterminal */
+ $lastEndAttributes = $this->endAttributeStack[$this->stackPos];
+ $this->stackPos -= $this->ruleToLength[$rule];
+ $nonTerminal = $this->ruleToNonTerminal[$rule];
+ $idx = $this->gotoBase[$nonTerminal] + $stateStack[$this->stackPos];
+ if ($idx >= 0 && $idx < $this->gotoTableSize && $this->gotoCheck[$idx] == $nonTerminal) {
+ $state = $this->goto[$idx];
+ } else {
+ $state = $this->gotoDefault[$nonTerminal];
+ }
+
+ ++$this->stackPos;
+ $stateStack[$this->stackPos] = $state;
+ $this->semStack[$this->stackPos] = $this->semValue;
+ $this->endAttributeStack[$this->stackPos] = $lastEndAttributes;
+ } else {
+ /* error */
+ switch ($this->errorState) {
+ case 0:
+ $msg = $this->getErrorMessage($symbol, $state);
+ $this->emitError(new Error($msg, $startAttributes + $endAttributes));
+ // Break missing intentionally
+ case 1:
+ case 2:
+ $this->errorState = 3;
+
+ // Pop until error-expecting state uncovered
+ while (!(
+ (($idx = $this->actionBase[$state] + $this->errorSymbol) >= 0
+ && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $this->errorSymbol)
+ || ($state < $this->YY2TBLSTATE
+ && ($idx = $this->actionBase[$state + $this->YYNLSTATES] + $this->errorSymbol) >= 0
+ && $idx < $this->actionTableSize && $this->actionCheck[$idx] == $this->errorSymbol)
+ ) || ($action = $this->action[$idx]) == $this->defaultAction) { // Not totally sure about this
+ if ($this->stackPos <= 0) {
+ // Could not recover from error
+ return null;
+ }
+ $state = $stateStack[--$this->stackPos];
+ //$this->tracePop($state);
+ }
+
+ //$this->traceShift($this->errorSymbol);
+ ++$this->stackPos;
+ $stateStack[$this->stackPos] = $state = $action;
+ $this->endAttributes = $this->endAttributeStack[$this->stackPos];
+ break;
+
+ case 3:
+ if ($symbol === 0) {
+ // Reached EOF without recovering from error
+ return null;
+ }
+
+ //$this->traceDiscard($symbol);
+ $symbol = self::SYMBOL_NONE;
+ break 2;
+ }
+ }
+
+ if ($state < $this->YYNLSTATES) {
+ break;
+ }
+
+ /* >= YYNLSTATES means shift-and-reduce */
+ $rule = $state - $this->YYNLSTATES;
+ }
+ }
+
+ throw new \RuntimeException('Reached end of parser loop');
+ }
+
+ protected function emitError(Error $error) {
+ $this->errorHandler->handleError($error);
+ }
+
+ protected function getErrorMessage($symbol, $state) {
+ $expectedString = '';
+ if ($expected = $this->getExpectedTokens($state)) {
+ $expectedString = ', expecting ' . implode(' or ', $expected);
+ }
+
+ return 'Syntax error, unexpected ' . $this->symbolToName[$symbol] . $expectedString;
+ }
+
+ protected function getExpectedTokens($state) {
+ $expected = array();
+
+ $base = $this->actionBase[$state];
+ foreach ($this->symbolToName as $symbol => $name) {
+ $idx = $base + $symbol;
+ if ($idx >= 0 && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol
+ || $state < $this->YY2TBLSTATE
+ && ($idx = $this->actionBase[$state + $this->YYNLSTATES] + $symbol) >= 0
+ && $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol
+ ) {
+ if ($this->action[$idx] != $this->unexpectedTokenRule
+ && $this->action[$idx] != $this->defaultAction
+ && $symbol != $this->errorSymbol
+ ) {
+ if (count($expected) == 4) {
+ /* Too many expected tokens */
+ return array();
+ }
+
+ $expected[] = $name;
+ }
+ }
+ }
+
+ return $expected;
+ }
+
+ /*
+ * Tracing functions used for debugging the parser.
+ */
+
+ /*
+ protected function traceNewState($state, $symbol) {
+ echo '% State ' . $state
+ . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n";
+ }
+
+ protected function traceRead($symbol) {
+ echo '% Reading ' . $this->symbolToName[$symbol] . "\n";
+ }
+
+ protected function traceShift($symbol) {
+ echo '% Shift ' . $this->symbolToName[$symbol] . "\n";
+ }
+
+ protected function traceAccept() {
+ echo "% Accepted.\n";
+ }
+
+ protected function traceReduce($n) {
+ echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n";
+ }
+
+ protected function tracePop($state) {
+ echo '% Recovering, uncovered state ' . $state . "\n";
+ }
+
+ protected function traceDiscard($symbol) {
+ echo '% Discard ' . $this->symbolToName[$symbol] . "\n";
+ }
+ */
+
+ /*
+ * Helper functions invoked by semantic actions
+ */
+
+ /**
+ * Moves statements of semicolon-style namespaces into $ns->stmts and checks various error conditions.
+ *
+ * @param Node[] $stmts
+ * @return Node[]
+ */
+ protected function handleNamespaces(array $stmts) {
+ $hasErrored = false;
+ $style = $this->getNamespacingStyle($stmts);
+ if (null === $style) {
+ // not namespaced, nothing to do
+ return $stmts;
+ } elseif ('brace' === $style) {
+ // For braced namespaces we only have to check that there are no invalid statements between the namespaces
+ $afterFirstNamespace = false;
+ foreach ($stmts as $stmt) {
+ if ($stmt instanceof Node\Stmt\Namespace_) {
+ $afterFirstNamespace = true;
+ } elseif (!$stmt instanceof Node\Stmt\HaltCompiler
+ && $afterFirstNamespace && !$hasErrored) {
+ $this->emitError(new Error(
+ 'No code may exist outside of namespace {}', $stmt->getAttributes()));
+ $hasErrored = true; // Avoid one error for every statement
+ }
+ }
+ return $stmts;
+ } else {
+ // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts
+ $resultStmts = array();
+ $targetStmts =& $resultStmts;
+ foreach ($stmts as $stmt) {
+ if ($stmt instanceof Node\Stmt\Namespace_) {
+ if ($stmt->stmts === null) {
+ $stmt->stmts = array();
+ $targetStmts =& $stmt->stmts;
+ $resultStmts[] = $stmt;
+ } else {
+ // This handles the invalid case of mixed style namespaces
+ $resultStmts[] = $stmt;
+ $targetStmts =& $resultStmts;
+ }
+ } elseif ($stmt instanceof Node\Stmt\HaltCompiler) {
+ // __halt_compiler() is not moved into the namespace
+ $resultStmts[] = $stmt;
+ } else {
+ $targetStmts[] = $stmt;
+ }
+ }
+ return $resultStmts;
+ }
+ }
+
+ private function getNamespacingStyle(array $stmts) {
+ $style = null;
+ $hasNotAllowedStmts = false;
+ foreach ($stmts as $i => $stmt) {
+ if ($stmt instanceof Node\Stmt\Namespace_) {
+ $currentStyle = null === $stmt->stmts ? 'semicolon' : 'brace';
+ if (null === $style) {
+ $style = $currentStyle;
+ if ($hasNotAllowedStmts) {
+ $this->emitError(new Error(
+ 'Namespace declaration statement has to be the very first statement in the script',
+ $stmt->getLine() // Avoid marking the entire namespace as an error
+ ));
+ }
+ } elseif ($style !== $currentStyle) {
+ $this->emitError(new Error(
+ 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations',
+ $stmt->getLine() // Avoid marking the entire namespace as an error
+ ));
+ // Treat like semicolon style for namespace normalization
+ return 'semicolon';
+ }
+ continue;
+ }
+
+ /* declare(), __halt_compiler() and nops can be used before a namespace declaration */
+ if ($stmt instanceof Node\Stmt\Declare_
+ || $stmt instanceof Node\Stmt\HaltCompiler
+ || $stmt instanceof Node\Stmt\Nop) {
+ continue;
+ }
+
+ /* There may be a hashbang line at the very start of the file */
+ if ($i == 0 && $stmt instanceof Node\Stmt\InlineHTML && preg_match('/\A#!.*\r?\n\z/', $stmt->value)) {
+ continue;
+ }
+
+ /* Everything else if forbidden before namespace declarations */
+ $hasNotAllowedStmts = true;
+ }
+ return $style;
+ }
+
+ protected function handleBuiltinTypes(Name $name) {
+ $scalarTypes = [
+ 'bool' => true,
+ 'int' => true,
+ 'float' => true,
+ 'string' => true,
+ 'iterable' => true,
+ 'void' => true,
+ ];
+
+ if (!$name->isUnqualified()) {
+ return $name;
+ }
+
+ $lowerName = strtolower($name->toString());
+ return isset($scalarTypes[$lowerName]) ? $lowerName : $name;
+ }
+
+ protected static $specialNames = array(
+ 'self' => true,
+ 'parent' => true,
+ 'static' => true,
+ );
+
+ protected function getAttributesAt($pos) {
+ return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos];
+ }
+
+ protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) {
+ try {
+ return LNumber::fromString($str, $attributes, $allowInvalidOctal);
+ } catch (Error $error) {
+ $this->emitError($error);
+ // Use dummy value
+ return new LNumber(0, $attributes);
+ }
+ }
+
+ protected function checkModifier($a, $b, $modifierPos) {
+ // Jumping through some hoops here because verifyModifier() is also used elsewhere
+ try {
+ Class_::verifyModifier($a, $b);
+ } catch (Error $error) {
+ $error->setAttributes($this->getAttributesAt($modifierPos));
+ $this->emitError($error);
+ }
+ }
+
+ protected function checkParam(Param $node) {
+ if ($node->variadic && null !== $node->default) {
+ $this->emitError(new Error(
+ 'Variadic parameter cannot have a default value',
+ $node->default->getAttributes()
+ ));
+ }
+ }
+
+ protected function checkTryCatch(TryCatch $node) {
+ if (empty($node->catches) && null === $node->finally) {
+ $this->emitError(new Error(
+ 'Cannot use try without catch or finally', $node->getAttributes()
+ ));
+ }
+ }
+
+ protected function checkNamespace(Namespace_ $node) {
+ if (isset(self::$specialNames[strtolower($node->name)])) {
+ $this->emitError(new Error(
+ sprintf('Cannot use \'%s\' as namespace name', $node->name),
+ $node->name->getAttributes()
+ ));
+ }
+
+ if (null !== $node->stmts) {
+ foreach ($node->stmts as $stmt) {
+ if ($stmt instanceof Namespace_) {
+ $this->emitError(new Error(
+ 'Namespace declarations cannot be nested', $stmt->getAttributes()
+ ));
+ }
+ }
+ }
+ }
+
+ protected function checkClass(Class_ $node, $namePos) {
+ if (null !== $node->name && isset(self::$specialNames[strtolower($node->name)])) {
+ $this->emitError(new Error(
+ sprintf('Cannot use \'%s\' as class name as it is reserved', $node->name),
+ $this->getAttributesAt($namePos)
+ ));
+ }
+
+ if (isset(self::$specialNames[strtolower($node->extends)])) {
+ $this->emitError(new Error(
+ sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends),
+ $node->extends->getAttributes()
+ ));
+ }
+
+ foreach ($node->implements as $interface) {
+ if (isset(self::$specialNames[strtolower($interface)])) {
+ $this->emitError(new Error(
+ sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface),
+ $interface->getAttributes()
+ ));
+ }
+ }
+ }
+
+ protected function checkInterface(Interface_ $node, $namePos) {
+ if (null !== $node->name && isset(self::$specialNames[strtolower($node->name)])) {
+ $this->emitError(new Error(
+ sprintf('Cannot use \'%s\' as class name as it is reserved', $node->name),
+ $this->getAttributesAt($namePos)
+ ));
+ }
+
+ foreach ($node->extends as $interface) {
+ if (isset(self::$specialNames[strtolower($interface)])) {
+ $this->emitError(new Error(
+ sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface),
+ $interface->getAttributes()
+ ));
+ }
+ }
+ }
+
+ protected function checkClassMethod(ClassMethod $node, $modifierPos) {
+ if ($node->flags & Class_::MODIFIER_STATIC) {
+ switch (strtolower($node->name)) {
+ case '__construct':
+ $this->emitError(new Error(
+ sprintf('Constructor %s() cannot be static', $node->name),
+ $this->getAttributesAt($modifierPos)));
+ break;
+ case '__destruct':
+ $this->emitError(new Error(
+ sprintf('Destructor %s() cannot be static', $node->name),
+ $this->getAttributesAt($modifierPos)));
+ break;
+ case '__clone':
+ $this->emitError(new Error(
+ sprintf('Clone method %s() cannot be static', $node->name),
+ $this->getAttributesAt($modifierPos)));
+ break;
+ }
+ }
+ }
+
+ protected function checkClassConst(ClassConst $node, $modifierPos) {
+ if ($node->flags & Class_::MODIFIER_STATIC) {
+ $this->emitError(new Error(
+ "Cannot use 'static' as constant modifier",
+ $this->getAttributesAt($modifierPos)));
+ }
+ if ($node->flags & Class_::MODIFIER_ABSTRACT) {
+ $this->emitError(new Error(
+ "Cannot use 'abstract' as constant modifier",
+ $this->getAttributesAt($modifierPos)));
+ }
+ if ($node->flags & Class_::MODIFIER_FINAL) {
+ $this->emitError(new Error(
+ "Cannot use 'final' as constant modifier",
+ $this->getAttributesAt($modifierPos)));
+ }
+ }
+
+ protected function checkProperty(Property $node, $modifierPos) {
+ if ($node->flags & Class_::MODIFIER_ABSTRACT) {
+ $this->emitError(new Error('Properties cannot be declared abstract',
+ $this->getAttributesAt($modifierPos)));
+ }
+
+ if ($node->flags & Class_::MODIFIER_FINAL) {
+ $this->emitError(new Error('Properties cannot be declared final',
+ $this->getAttributesAt($modifierPos)));
+ }
+ }
+
+ protected function checkUseUse(UseUse $node, $namePos) {
+ if ('self' == strtolower($node->alias) || 'parent' == strtolower($node->alias)) {
+ $this->emitError(new Error(
+ sprintf(
+ 'Cannot use %s as %s because \'%2$s\' is a special class name',
+ $node->name, $node->alias
+ ),
+ $this->getAttributesAt($namePos)
+ ));
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php
new file mode 100644
index 0000000..28b9070
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php
@@ -0,0 +1,43 @@
+<?php
+
+namespace PhpParser;
+
+class ParserFactory {
+ const PREFER_PHP7 = 1;
+ const PREFER_PHP5 = 2;
+ const ONLY_PHP7 = 3;
+ const ONLY_PHP5 = 4;
+
+ /**
+ * Creates a Parser instance, according to the provided kind.
+ *
+ * @param int $kind One of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5
+ * @param Lexer|null $lexer Lexer to use. Defaults to emulative lexer when not specified
+ * @param array $parserOptions Parser options. See ParserAbstract::__construct() argument
+ *
+ * @return Parser The parser instance
+ */
+ public function create($kind, Lexer $lexer = null, array $parserOptions = array()) {
+ if (null === $lexer) {
+ $lexer = new Lexer\Emulative();
+ }
+ switch ($kind) {
+ case self::PREFER_PHP7:
+ return new Parser\Multiple([
+ new Parser\Php7($lexer, $parserOptions), new Parser\Php5($lexer, $parserOptions)
+ ]);
+ case self::PREFER_PHP5:
+ return new Parser\Multiple([
+ new Parser\Php5($lexer, $parserOptions), new Parser\Php7($lexer, $parserOptions)
+ ]);
+ case self::ONLY_PHP7:
+ return new Parser\Php7($lexer, $parserOptions);
+ case self::ONLY_PHP5:
+ return new Parser\Php5($lexer, $parserOptions);
+ default:
+ throw new \LogicException(
+ 'Kind must be one of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5'
+ );
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php
new file mode 100644
index 0000000..52b1148
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php
@@ -0,0 +1,921 @@
+<?php
+
+namespace PhpParser\PrettyPrinter;
+
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Expr\AssignOp;
+use PhpParser\Node\Expr\BinaryOp;
+use PhpParser\Node\Expr\Cast;
+use PhpParser\Node\Name;
+use PhpParser\Node\Scalar;
+use PhpParser\Node\Scalar\MagicConst;
+use PhpParser\Node\Stmt;
+use PhpParser\PrettyPrinterAbstract;
+
+class Standard extends PrettyPrinterAbstract
+{
+ // Special nodes
+
+ protected function pParam(Node\Param $node) {
+ return ($node->type ? $this->pType($node->type) . ' ' : '')
+ . ($node->byRef ? '&' : '')
+ . ($node->variadic ? '...' : '')
+ . '$' . $node->name
+ . ($node->default ? ' = ' . $this->p($node->default) : '');
+ }
+
+ protected function pArg(Node\Arg $node) {
+ return ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value);
+ }
+
+ protected function pConst(Node\Const_ $node) {
+ return $node->name . ' = ' . $this->p($node->value);
+ }
+
+ protected function pNullableType(Node\NullableType $node) {
+ return '?' . $this->pType($node->type);
+ }
+
+ // Names
+
+ protected function pName(Name $node) {
+ return implode('\\', $node->parts);
+ }
+
+ protected function pName_FullyQualified(Name\FullyQualified $node) {
+ return '\\' . implode('\\', $node->parts);
+ }
+
+ protected function pName_Relative(Name\Relative $node) {
+ return 'namespace\\' . implode('\\', $node->parts);
+ }
+
+ // Magic Constants
+
+ protected function pScalar_MagicConst_Class(MagicConst\Class_ $node) {
+ return '__CLASS__';
+ }
+
+ protected function pScalar_MagicConst_Dir(MagicConst\Dir $node) {
+ return '__DIR__';
+ }
+
+ protected function pScalar_MagicConst_File(MagicConst\File $node) {
+ return '__FILE__';
+ }
+
+ protected function pScalar_MagicConst_Function(MagicConst\Function_ $node) {
+ return '__FUNCTION__';
+ }
+
+ protected function pScalar_MagicConst_Line(MagicConst\Line $node) {
+ return '__LINE__';
+ }
+
+ protected function pScalar_MagicConst_Method(MagicConst\Method $node) {
+ return '__METHOD__';
+ }
+
+ protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node) {
+ return '__NAMESPACE__';
+ }
+
+ protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node) {
+ return '__TRAIT__';
+ }
+
+ // Scalars
+
+ protected function pScalar_String(Scalar\String_ $node) {
+ $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED);
+ switch ($kind) {
+ case Scalar\String_::KIND_NOWDOC:
+ $label = $node->getAttribute('docLabel');
+ if ($label && !$this->containsEndLabel($node->value, $label)) {
+ if ($node->value === '') {
+ return $this->pNoIndent("<<<'$label'\n$label") . $this->docStringEndToken;
+ }
+
+ return $this->pNoIndent("<<<'$label'\n$node->value\n$label")
+ . $this->docStringEndToken;
+ }
+ /* break missing intentionally */
+ case Scalar\String_::KIND_SINGLE_QUOTED:
+ return '\'' . $this->pNoIndent(addcslashes($node->value, '\'\\')) . '\'';
+ case Scalar\String_::KIND_HEREDOC:
+ $label = $node->getAttribute('docLabel');
+ if ($label && !$this->containsEndLabel($node->value, $label)) {
+ if ($node->value === '') {
+ return $this->pNoIndent("<<<$label\n$label") . $this->docStringEndToken;
+ }
+
+ $escaped = $this->escapeString($node->value, null);
+ return $this->pNoIndent("<<<$label\n" . $escaped ."\n$label")
+ . $this->docStringEndToken;
+ }
+ /* break missing intentionally */
+ case Scalar\String_::KIND_DOUBLE_QUOTED:
+ return '"' . $this->escapeString($node->value, '"') . '"';
+ }
+ throw new \Exception('Invalid string kind');
+ }
+
+ protected function pScalar_Encapsed(Scalar\Encapsed $node) {
+ if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) {
+ $label = $node->getAttribute('docLabel');
+ if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) {
+ if (count($node->parts) === 1
+ && $node->parts[0] instanceof Scalar\EncapsedStringPart
+ && $node->parts[0]->value === ''
+ ) {
+ return $this->pNoIndent("<<<$label\n$label") . $this->docStringEndToken;
+ }
+
+ return $this->pNoIndent(
+ "<<<$label\n" . $this->pEncapsList($node->parts, null) . "\n$label"
+ ) . $this->docStringEndToken;
+ }
+ }
+ return '"' . $this->pEncapsList($node->parts, '"') . '"';
+ }
+
+ protected function pScalar_LNumber(Scalar\LNumber $node) {
+ $str = (string) $node->value;
+ switch ($node->getAttribute('kind', Scalar\LNumber::KIND_DEC)) {
+ case Scalar\LNumber::KIND_BIN:
+ return '0b' . base_convert($str, 10, 2);
+ case Scalar\LNumber::KIND_OCT:
+ return '0' . base_convert($str, 10, 8);
+ case Scalar\LNumber::KIND_DEC:
+ return $str;
+ case Scalar\LNumber::KIND_HEX:
+ return '0x' . base_convert($str, 10, 16);
+ }
+ throw new \Exception('Invalid number kind');
+ }
+
+ protected function pScalar_DNumber(Scalar\DNumber $node) {
+ $stringValue = sprintf('%.16G', $node->value);
+ if ($node->value !== (double) $stringValue) {
+ $stringValue = sprintf('%.17G', $node->value);
+ }
+
+ // ensure that number is really printed as float
+ return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue;
+ }
+
+ // Assignments
+
+ protected function pExpr_Assign(Expr\Assign $node) {
+ return $this->pInfixOp('Expr_Assign', $node->var, ' = ', $node->expr);
+ }
+
+ protected function pExpr_AssignRef(Expr\AssignRef $node) {
+ return $this->pInfixOp('Expr_AssignRef', $node->var, ' =& ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Plus(AssignOp\Plus $node) {
+ return $this->pInfixOp('Expr_AssignOp_Plus', $node->var, ' += ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Minus(AssignOp\Minus $node) {
+ return $this->pInfixOp('Expr_AssignOp_Minus', $node->var, ' -= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Mul(AssignOp\Mul $node) {
+ return $this->pInfixOp('Expr_AssignOp_Mul', $node->var, ' *= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Div(AssignOp\Div $node) {
+ return $this->pInfixOp('Expr_AssignOp_Div', $node->var, ' /= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Concat(AssignOp\Concat $node) {
+ return $this->pInfixOp('Expr_AssignOp_Concat', $node->var, ' .= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Mod(AssignOp\Mod $node) {
+ return $this->pInfixOp('Expr_AssignOp_Mod', $node->var, ' %= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node) {
+ return $this->pInfixOp('Expr_AssignOp_BitwiseAnd', $node->var, ' &= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node) {
+ return $this->pInfixOp('Expr_AssignOp_BitwiseOr', $node->var, ' |= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node) {
+ return $this->pInfixOp('Expr_AssignOp_BitwiseXor', $node->var, ' ^= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node) {
+ return $this->pInfixOp('Expr_AssignOp_ShiftLeft', $node->var, ' <<= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node) {
+ return $this->pInfixOp('Expr_AssignOp_ShiftRight', $node->var, ' >>= ', $node->expr);
+ }
+
+ protected function pExpr_AssignOp_Pow(AssignOp\Pow $node) {
+ return $this->pInfixOp('Expr_AssignOp_Pow', $node->var, ' **= ', $node->expr);
+ }
+
+ // Binary expressions
+
+ protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Plus', $node->left, ' + ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Minus', $node->left, ' - ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Mul', $node->left, ' * ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Div(BinaryOp\Div $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Div', $node->left, ' / ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Concat', $node->left, ' . ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Mod', $node->left, ' % ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node) {
+ return $this->pInfixOp('Expr_BinaryOp_BooleanAnd', $node->left, ' && ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node) {
+ return $this->pInfixOp('Expr_BinaryOp_BooleanOr', $node->left, ' || ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node) {
+ return $this->pInfixOp('Expr_BinaryOp_BitwiseAnd', $node->left, ' & ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node) {
+ return $this->pInfixOp('Expr_BinaryOp_BitwiseOr', $node->left, ' | ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node) {
+ return $this->pInfixOp('Expr_BinaryOp_BitwiseXor', $node->left, ' ^ ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node) {
+ return $this->pInfixOp('Expr_BinaryOp_ShiftLeft', $node->left, ' << ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node) {
+ return $this->pInfixOp('Expr_BinaryOp_ShiftRight', $node->left, ' >> ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Pow', $node->left, ' ** ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node) {
+ return $this->pInfixOp('Expr_BinaryOp_LogicalAnd', $node->left, ' and ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node) {
+ return $this->pInfixOp('Expr_BinaryOp_LogicalOr', $node->left, ' or ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node) {
+ return $this->pInfixOp('Expr_BinaryOp_LogicalXor', $node->left, ' xor ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Equal', $node->left, ' == ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node) {
+ return $this->pInfixOp('Expr_BinaryOp_NotEqual', $node->left, ' != ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Identical', $node->left, ' === ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node) {
+ return $this->pInfixOp('Expr_BinaryOp_NotIdentical', $node->left, ' !== ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Spaceship', $node->left, ' <=> ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Greater', $node->left, ' > ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node) {
+ return $this->pInfixOp('Expr_BinaryOp_GreaterOrEqual', $node->left, ' >= ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Smaller', $node->left, ' < ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node) {
+ return $this->pInfixOp('Expr_BinaryOp_SmallerOrEqual', $node->left, ' <= ', $node->right);
+ }
+
+ protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node) {
+ return $this->pInfixOp('Expr_BinaryOp_Coalesce', $node->left, ' ?? ', $node->right);
+ }
+
+ protected function pExpr_Instanceof(Expr\Instanceof_ $node) {
+ return $this->pInfixOp('Expr_Instanceof', $node->expr, ' instanceof ', $node->class);
+ }
+
+ // Unary expressions
+
+ protected function pExpr_BooleanNot(Expr\BooleanNot $node) {
+ return $this->pPrefixOp('Expr_BooleanNot', '!', $node->expr);
+ }
+
+ protected function pExpr_BitwiseNot(Expr\BitwiseNot $node) {
+ return $this->pPrefixOp('Expr_BitwiseNot', '~', $node->expr);
+ }
+
+ protected function pExpr_UnaryMinus(Expr\UnaryMinus $node) {
+ return $this->pPrefixOp('Expr_UnaryMinus', '-', $node->expr);
+ }
+
+ protected function pExpr_UnaryPlus(Expr\UnaryPlus $node) {
+ return $this->pPrefixOp('Expr_UnaryPlus', '+', $node->expr);
+ }
+
+ protected function pExpr_PreInc(Expr\PreInc $node) {
+ return $this->pPrefixOp('Expr_PreInc', '++', $node->var);
+ }
+
+ protected function pExpr_PreDec(Expr\PreDec $node) {
+ return $this->pPrefixOp('Expr_PreDec', '--', $node->var);
+ }
+
+ protected function pExpr_PostInc(Expr\PostInc $node) {
+ return $this->pPostfixOp('Expr_PostInc', $node->var, '++');
+ }
+
+ protected function pExpr_PostDec(Expr\PostDec $node) {
+ return $this->pPostfixOp('Expr_PostDec', $node->var, '--');
+ }
+
+ protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node) {
+ return $this->pPrefixOp('Expr_ErrorSuppress', '@', $node->expr);
+ }
+
+ protected function pExpr_YieldFrom(Expr\YieldFrom $node) {
+ return $this->pPrefixOp('Expr_YieldFrom', 'yield from ', $node->expr);
+ }
+
+ protected function pExpr_Print(Expr\Print_ $node) {
+ return $this->pPrefixOp('Expr_Print', 'print ', $node->expr);
+ }
+
+ // Casts
+
+ protected function pExpr_Cast_Int(Cast\Int_ $node) {
+ return $this->pPrefixOp('Expr_Cast_Int', '(int) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Double(Cast\Double $node) {
+ return $this->pPrefixOp('Expr_Cast_Double', '(double) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_String(Cast\String_ $node) {
+ return $this->pPrefixOp('Expr_Cast_String', '(string) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Array(Cast\Array_ $node) {
+ return $this->pPrefixOp('Expr_Cast_Array', '(array) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Object(Cast\Object_ $node) {
+ return $this->pPrefixOp('Expr_Cast_Object', '(object) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Bool(Cast\Bool_ $node) {
+ return $this->pPrefixOp('Expr_Cast_Bool', '(bool) ', $node->expr);
+ }
+
+ protected function pExpr_Cast_Unset(Cast\Unset_ $node) {
+ return $this->pPrefixOp('Expr_Cast_Unset', '(unset) ', $node->expr);
+ }
+
+ // Function calls and similar constructs
+
+ protected function pExpr_FuncCall(Expr\FuncCall $node) {
+ return $this->pCallLhs($node->name)
+ . '(' . $this->pCommaSeparated($node->args) . ')';
+ }
+
+ protected function pExpr_MethodCall(Expr\MethodCall $node) {
+ return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name)
+ . '(' . $this->pCommaSeparated($node->args) . ')';
+ }
+
+ protected function pExpr_StaticCall(Expr\StaticCall $node) {
+ return $this->pDereferenceLhs($node->class) . '::'
+ . ($node->name instanceof Expr
+ ? ($node->name instanceof Expr\Variable
+ ? $this->p($node->name)
+ : '{' . $this->p($node->name) . '}')
+ : $node->name)
+ . '(' . $this->pCommaSeparated($node->args) . ')';
+ }
+
+ protected function pExpr_Empty(Expr\Empty_ $node) {
+ return 'empty(' . $this->p($node->expr) . ')';
+ }
+
+ protected function pExpr_Isset(Expr\Isset_ $node) {
+ return 'isset(' . $this->pCommaSeparated($node->vars) . ')';
+ }
+
+ protected function pExpr_Eval(Expr\Eval_ $node) {
+ return 'eval(' . $this->p($node->expr) . ')';
+ }
+
+ protected function pExpr_Include(Expr\Include_ $node) {
+ static $map = array(
+ Expr\Include_::TYPE_INCLUDE => 'include',
+ Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once',
+ Expr\Include_::TYPE_REQUIRE => 'require',
+ Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once',
+ );
+
+ return $map[$node->type] . ' ' . $this->p($node->expr);
+ }
+
+ protected function pExpr_List(Expr\List_ $node) {
+ return 'list(' . $this->pCommaSeparated($node->items) . ')';
+ }
+
+ // Other
+
+ protected function pExpr_Variable(Expr\Variable $node) {
+ if ($node->name instanceof Expr) {
+ return '${' . $this->p($node->name) . '}';
+ } else {
+ return '$' . $node->name;
+ }
+ }
+
+ protected function pExpr_Array(Expr\Array_ $node) {
+ $syntax = $node->getAttribute('kind',
+ $this->options['shortArraySyntax'] ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG);
+ if ($syntax === Expr\Array_::KIND_SHORT) {
+ return '[' . $this->pCommaSeparated($node->items) . ']';
+ } else {
+ return 'array(' . $this->pCommaSeparated($node->items) . ')';
+ }
+ }
+
+ protected function pExpr_ArrayItem(Expr\ArrayItem $node) {
+ return (null !== $node->key ? $this->p($node->key) . ' => ' : '')
+ . ($node->byRef ? '&' : '') . $this->p($node->value);
+ }
+
+ protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) {
+ return $this->pDereferenceLhs($node->var)
+ . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']';
+ }
+
+ protected function pExpr_ConstFetch(Expr\ConstFetch $node) {
+ return $this->p($node->name);
+ }
+
+ protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node) {
+ return $this->p($node->class) . '::' . $node->name;
+ }
+
+ protected function pExpr_PropertyFetch(Expr\PropertyFetch $node) {
+ return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name);
+ }
+
+ protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node) {
+ return $this->pDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name);
+ }
+
+ protected function pExpr_ShellExec(Expr\ShellExec $node) {
+ return '`' . $this->pEncapsList($node->parts, '`') . '`';
+ }
+
+ protected function pExpr_Closure(Expr\Closure $node) {
+ return ($node->static ? 'static ' : '')
+ . 'function ' . ($node->byRef ? '&' : '')
+ . '(' . $this->pCommaSeparated($node->params) . ')'
+ . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')': '')
+ . (null !== $node->returnType ? ' : ' . $this->pType($node->returnType) : '')
+ . ' {' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pExpr_ClosureUse(Expr\ClosureUse $node) {
+ return ($node->byRef ? '&' : '') . '$' . $node->var;
+ }
+
+ protected function pExpr_New(Expr\New_ $node) {
+ if ($node->class instanceof Stmt\Class_) {
+ $args = $node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : '';
+ return 'new ' . $this->pClassCommon($node->class, $args);
+ }
+ return 'new ' . $this->p($node->class) . '(' . $this->pCommaSeparated($node->args) . ')';
+ }
+
+ protected function pExpr_Clone(Expr\Clone_ $node) {
+ return 'clone ' . $this->p($node->expr);
+ }
+
+ protected function pExpr_Ternary(Expr\Ternary $node) {
+ // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator.
+ // this is okay because the part between ? and : never needs parentheses.
+ return $this->pInfixOp('Expr_Ternary',
+ $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else
+ );
+ }
+
+ protected function pExpr_Exit(Expr\Exit_ $node) {
+ $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE);
+ return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die')
+ . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : '');
+ }
+
+ protected function pExpr_Yield(Expr\Yield_ $node) {
+ if ($node->value === null) {
+ return 'yield';
+ } else {
+ // this is a bit ugly, but currently there is no way to detect whether the parentheses are necessary
+ return '(yield '
+ . ($node->key !== null ? $this->p($node->key) . ' => ' : '')
+ . $this->p($node->value)
+ . ')';
+ }
+ }
+
+ // Declarations
+
+ protected function pStmt_Namespace(Stmt\Namespace_ $node) {
+ if ($this->canUseSemicolonNamespaces) {
+ return 'namespace ' . $this->p($node->name) . ';' . "\n" . $this->pStmts($node->stmts, false);
+ } else {
+ return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '')
+ . ' {' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+ }
+
+ protected function pStmt_Use(Stmt\Use_ $node) {
+ return 'use ' . $this->pUseType($node->type)
+ . $this->pCommaSeparated($node->uses) . ';';
+ }
+
+ protected function pStmt_GroupUse(Stmt\GroupUse $node) {
+ return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix)
+ . '\{' . $this->pCommaSeparated($node->uses) . '};';
+ }
+
+ protected function pStmt_UseUse(Stmt\UseUse $node) {
+ return $this->pUseType($node->type) . $this->p($node->name)
+ . ($node->name->getLast() !== $node->alias ? ' as ' . $node->alias : '');
+ }
+
+ private function pUseType($type) {
+ return $type === Stmt\Use_::TYPE_FUNCTION ? 'function '
+ : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : '');
+ }
+
+ protected function pStmt_Interface(Stmt\Interface_ $node) {
+ return 'interface ' . $node->name
+ . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '')
+ . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_Class(Stmt\Class_ $node) {
+ return $this->pClassCommon($node, ' ' . $node->name);
+ }
+
+ protected function pStmt_Trait(Stmt\Trait_ $node) {
+ return 'trait ' . $node->name
+ . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_TraitUse(Stmt\TraitUse $node) {
+ return 'use ' . $this->pCommaSeparated($node->traits)
+ . (empty($node->adaptations)
+ ? ';'
+ : ' {' . $this->pStmts($node->adaptations) . "\n" . '}');
+ }
+
+ protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node) {
+ return $this->p($node->trait) . '::' . $node->method
+ . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';';
+ }
+
+ protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node) {
+ return (null !== $node->trait ? $this->p($node->trait) . '::' : '')
+ . $node->method . ' as'
+ . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '')
+ . (null !== $node->newName ? ' ' . $node->newName : '')
+ . ';';
+ }
+
+ protected function pStmt_Property(Stmt\Property $node) {
+ return (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . $this->pCommaSeparated($node->props) . ';';
+ }
+
+ protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) {
+ return '$' . $node->name
+ . (null !== $node->default ? ' = ' . $this->p($node->default) : '');
+ }
+
+ protected function pStmt_ClassMethod(Stmt\ClassMethod $node) {
+ return $this->pModifiers($node->flags)
+ . 'function ' . ($node->byRef ? '&' : '') . $node->name
+ . '(' . $this->pCommaSeparated($node->params) . ')'
+ . (null !== $node->returnType ? ' : ' . $this->pType($node->returnType) : '')
+ . (null !== $node->stmts
+ ? "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}'
+ : ';');
+ }
+
+ protected function pStmt_ClassConst(Stmt\ClassConst $node) {
+ return $this->pModifiers($node->flags)
+ . 'const ' . $this->pCommaSeparated($node->consts) . ';';
+ }
+
+ protected function pStmt_Function(Stmt\Function_ $node) {
+ return 'function ' . ($node->byRef ? '&' : '') . $node->name
+ . '(' . $this->pCommaSeparated($node->params) . ')'
+ . (null !== $node->returnType ? ' : ' . $this->pType($node->returnType) : '')
+ . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_Const(Stmt\Const_ $node) {
+ return 'const ' . $this->pCommaSeparated($node->consts) . ';';
+ }
+
+ protected function pStmt_Declare(Stmt\Declare_ $node) {
+ return 'declare (' . $this->pCommaSeparated($node->declares) . ')'
+ . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . "\n" . '}' : ';');
+ }
+
+ protected function pStmt_DeclareDeclare(Stmt\DeclareDeclare $node) {
+ return $node->key . '=' . $this->p($node->value);
+ }
+
+ // Control flow
+
+ protected function pStmt_If(Stmt\If_ $node) {
+ return 'if (' . $this->p($node->cond) . ') {'
+ . $this->pStmts($node->stmts) . "\n" . '}'
+ . $this->pImplode($node->elseifs)
+ . (null !== $node->else ? $this->p($node->else) : '');
+ }
+
+ protected function pStmt_ElseIf(Stmt\ElseIf_ $node) {
+ return ' elseif (' . $this->p($node->cond) . ') {'
+ . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_Else(Stmt\Else_ $node) {
+ return ' else {' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_For(Stmt\For_ $node) {
+ return 'for ('
+ . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '')
+ . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '')
+ . $this->pCommaSeparated($node->loop)
+ . ') {' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_Foreach(Stmt\Foreach_ $node) {
+ return 'foreach (' . $this->p($node->expr) . ' as '
+ . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '')
+ . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {'
+ . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_While(Stmt\While_ $node) {
+ return 'while (' . $this->p($node->cond) . ') {'
+ . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_Do(Stmt\Do_ $node) {
+ return 'do {' . $this->pStmts($node->stmts) . "\n"
+ . '} while (' . $this->p($node->cond) . ');';
+ }
+
+ protected function pStmt_Switch(Stmt\Switch_ $node) {
+ return 'switch (' . $this->p($node->cond) . ') {'
+ . $this->pStmts($node->cases) . "\n" . '}';
+ }
+
+ protected function pStmt_Case(Stmt\Case_ $node) {
+ return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':'
+ . $this->pStmts($node->stmts);
+ }
+
+ protected function pStmt_TryCatch(Stmt\TryCatch $node) {
+ return 'try {' . $this->pStmts($node->stmts) . "\n" . '}'
+ . $this->pImplode($node->catches)
+ . ($node->finally !== null ? $this->p($node->finally) : '');
+ }
+
+ protected function pStmt_Catch(Stmt\Catch_ $node) {
+ return ' catch (' . $this->pImplode($node->types, '|') . ' $' . $node->var . ') {'
+ . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_Finally(Stmt\Finally_ $node) {
+ return ' finally {' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pStmt_Break(Stmt\Break_ $node) {
+ return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';';
+ }
+
+ protected function pStmt_Continue(Stmt\Continue_ $node) {
+ return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';';
+ }
+
+ protected function pStmt_Return(Stmt\Return_ $node) {
+ return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';';
+ }
+
+ protected function pStmt_Throw(Stmt\Throw_ $node) {
+ return 'throw ' . $this->p($node->expr) . ';';
+ }
+
+ protected function pStmt_Label(Stmt\Label $node) {
+ return $node->name . ':';
+ }
+
+ protected function pStmt_Goto(Stmt\Goto_ $node) {
+ return 'goto ' . $node->name . ';';
+ }
+
+ // Other
+
+ protected function pStmt_Echo(Stmt\Echo_ $node) {
+ return 'echo ' . $this->pCommaSeparated($node->exprs) . ';';
+ }
+
+ protected function pStmt_Static(Stmt\Static_ $node) {
+ return 'static ' . $this->pCommaSeparated($node->vars) . ';';
+ }
+
+ protected function pStmt_Global(Stmt\Global_ $node) {
+ return 'global ' . $this->pCommaSeparated($node->vars) . ';';
+ }
+
+ protected function pStmt_StaticVar(Stmt\StaticVar $node) {
+ return '$' . $node->name
+ . (null !== $node->default ? ' = ' . $this->p($node->default) : '');
+ }
+
+ protected function pStmt_Unset(Stmt\Unset_ $node) {
+ return 'unset(' . $this->pCommaSeparated($node->vars) . ');';
+ }
+
+ protected function pStmt_InlineHTML(Stmt\InlineHTML $node) {
+ $newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : '';
+ return '?>' . $this->pNoIndent($newline . $node->value) . '<?php ';
+ }
+
+ protected function pStmt_HaltCompiler(Stmt\HaltCompiler $node) {
+ return '__halt_compiler();' . $node->remaining;
+ }
+
+ protected function pStmt_Nop(Stmt\Nop $node) {
+ return '';
+ }
+
+ // Helpers
+
+ protected function pType($node) {
+ return is_string($node) ? $node : $this->p($node);
+ }
+
+ protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) {
+ return $this->pModifiers($node->flags)
+ . 'class' . $afterClassToken
+ . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '')
+ . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '')
+ . "\n" . '{' . $this->pStmts($node->stmts) . "\n" . '}';
+ }
+
+ protected function pObjectProperty($node) {
+ if ($node instanceof Expr) {
+ return '{' . $this->p($node) . '}';
+ } else {
+ return $node;
+ }
+ }
+
+ protected function pModifiers($modifiers) {
+ return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '')
+ . ($modifiers & Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '')
+ . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '')
+ . ($modifiers & Stmt\Class_::MODIFIER_STATIC ? 'static ' : '')
+ . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '')
+ . ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : '');
+ }
+
+ protected function pEncapsList(array $encapsList, $quote) {
+ $return = '';
+ foreach ($encapsList as $element) {
+ if ($element instanceof Scalar\EncapsedStringPart) {
+ $return .= $this->escapeString($element->value, $quote);
+ } else {
+ $return .= '{' . $this->p($element) . '}';
+ }
+ }
+
+ return $return;
+ }
+
+ protected function escapeString($string, $quote) {
+ if (null === $quote) {
+ // For doc strings, don't escape newlines
+ $escaped = addcslashes($string, "\t\f\v$\\");
+ } else {
+ $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\");
+ }
+
+ // Escape other control characters
+ return preg_replace_callback('/([\0-\10\16-\37])(?=([0-7]?))/', function ($matches) {
+ $oct = decoct(ord($matches[1]));
+ if ($matches[2] !== '') {
+ // If there is a trailing digit, use the full three character form
+ return '\\' . str_pad($oct, 3, '0', STR_PAD_LEFT);
+ }
+ return '\\' . $oct;
+ }, $escaped);
+ }
+
+ protected function containsEndLabel($string, $label, $atStart = true, $atEnd = true) {
+ $start = $atStart ? '(?:^|[\r\n])' : '[\r\n]';
+ $end = $atEnd ? '(?:$|[;\r\n])' : '[;\r\n]';
+ return false !== strpos($string, $label)
+ && preg_match('/' . $start . $label . $end . '/', $string);
+ }
+
+ protected function encapsedContainsEndLabel(array $parts, $label) {
+ foreach ($parts as $i => $part) {
+ $atStart = $i === 0;
+ $atEnd = $i === count($parts) - 1;
+ if ($part instanceof Scalar\EncapsedStringPart
+ && $this->containsEndLabel($part->value, $label, $atStart, $atEnd)
+ ) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected function pDereferenceLhs(Node $node) {
+ if ($node instanceof Expr\Variable
+ || $node instanceof Name
+ || $node instanceof Expr\ArrayDimFetch
+ || $node instanceof Expr\PropertyFetch
+ || $node instanceof Expr\StaticPropertyFetch
+ || $node instanceof Expr\FuncCall
+ || $node instanceof Expr\MethodCall
+ || $node instanceof Expr\StaticCall
+ || $node instanceof Expr\Array_
+ || $node instanceof Scalar\String_
+ || $node instanceof Expr\ConstFetch
+ || $node instanceof Expr\ClassConstFetch
+ ) {
+ return $this->p($node);
+ } else {
+ return '(' . $this->p($node) . ')';
+ }
+ }
+
+ protected function pCallLhs(Node $node) {
+ if ($node instanceof Name
+ || $node instanceof Expr\Variable
+ || $node instanceof Expr\ArrayDimFetch
+ || $node instanceof Expr\FuncCall
+ || $node instanceof Expr\MethodCall
+ || $node instanceof Expr\StaticCall
+ || $node instanceof Expr\Array_
+ ) {
+ return $this->p($node);
+ } else {
+ return '(' . $this->p($node) . ')';
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php
new file mode 100644
index 0000000..ee7e17a
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php
@@ -0,0 +1,316 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Node\Expr;
+use PhpParser\Node\Stmt;
+
+abstract class PrettyPrinterAbstract
+{
+ protected $precedenceMap = array(
+ // [precedence, associativity] where for the latter -1 is %left, 0 is %nonassoc and 1 is %right
+ 'Expr_BinaryOp_Pow' => array( 0, 1),
+ 'Expr_BitwiseNot' => array( 10, 1),
+ 'Expr_PreInc' => array( 10, 1),
+ 'Expr_PreDec' => array( 10, 1),
+ 'Expr_PostInc' => array( 10, -1),
+ 'Expr_PostDec' => array( 10, -1),
+ 'Expr_UnaryPlus' => array( 10, 1),
+ 'Expr_UnaryMinus' => array( 10, 1),
+ 'Expr_Cast_Int' => array( 10, 1),
+ 'Expr_Cast_Double' => array( 10, 1),
+ 'Expr_Cast_String' => array( 10, 1),
+ 'Expr_Cast_Array' => array( 10, 1),
+ 'Expr_Cast_Object' => array( 10, 1),
+ 'Expr_Cast_Bool' => array( 10, 1),
+ 'Expr_Cast_Unset' => array( 10, 1),
+ 'Expr_ErrorSuppress' => array( 10, 1),
+ 'Expr_Instanceof' => array( 20, 0),
+ 'Expr_BooleanNot' => array( 30, 1),
+ 'Expr_BinaryOp_Mul' => array( 40, -1),
+ 'Expr_BinaryOp_Div' => array( 40, -1),
+ 'Expr_BinaryOp_Mod' => array( 40, -1),
+ 'Expr_BinaryOp_Plus' => array( 50, -1),
+ 'Expr_BinaryOp_Minus' => array( 50, -1),
+ 'Expr_BinaryOp_Concat' => array( 50, -1),
+ 'Expr_BinaryOp_ShiftLeft' => array( 60, -1),
+ 'Expr_BinaryOp_ShiftRight' => array( 60, -1),
+ 'Expr_BinaryOp_Smaller' => array( 70, 0),
+ 'Expr_BinaryOp_SmallerOrEqual' => array( 70, 0),
+ 'Expr_BinaryOp_Greater' => array( 70, 0),
+ 'Expr_BinaryOp_GreaterOrEqual' => array( 70, 0),
+ 'Expr_BinaryOp_Equal' => array( 80, 0),
+ 'Expr_BinaryOp_NotEqual' => array( 80, 0),
+ 'Expr_BinaryOp_Identical' => array( 80, 0),
+ 'Expr_BinaryOp_NotIdentical' => array( 80, 0),
+ 'Expr_BinaryOp_Spaceship' => array( 80, 0),
+ 'Expr_BinaryOp_BitwiseAnd' => array( 90, -1),
+ 'Expr_BinaryOp_BitwiseXor' => array(100, -1),
+ 'Expr_BinaryOp_BitwiseOr' => array(110, -1),
+ 'Expr_BinaryOp_BooleanAnd' => array(120, -1),
+ 'Expr_BinaryOp_BooleanOr' => array(130, -1),
+ 'Expr_BinaryOp_Coalesce' => array(140, 1),
+ 'Expr_Ternary' => array(150, -1),
+ // parser uses %left for assignments, but they really behave as %right
+ 'Expr_Assign' => array(160, 1),
+ 'Expr_AssignRef' => array(160, 1),
+ 'Expr_AssignOp_Plus' => array(160, 1),
+ 'Expr_AssignOp_Minus' => array(160, 1),
+ 'Expr_AssignOp_Mul' => array(160, 1),
+ 'Expr_AssignOp_Div' => array(160, 1),
+ 'Expr_AssignOp_Concat' => array(160, 1),
+ 'Expr_AssignOp_Mod' => array(160, 1),
+ 'Expr_AssignOp_BitwiseAnd' => array(160, 1),
+ 'Expr_AssignOp_BitwiseOr' => array(160, 1),
+ 'Expr_AssignOp_BitwiseXor' => array(160, 1),
+ 'Expr_AssignOp_ShiftLeft' => array(160, 1),
+ 'Expr_AssignOp_ShiftRight' => array(160, 1),
+ 'Expr_AssignOp_Pow' => array(160, 1),
+ 'Expr_YieldFrom' => array(165, 1),
+ 'Expr_Print' => array(168, 1),
+ 'Expr_BinaryOp_LogicalAnd' => array(170, -1),
+ 'Expr_BinaryOp_LogicalXor' => array(180, -1),
+ 'Expr_BinaryOp_LogicalOr' => array(190, -1),
+ 'Expr_Include' => array(200, -1),
+ );
+
+ protected $noIndentToken;
+ protected $docStringEndToken;
+ protected $canUseSemicolonNamespaces;
+ protected $options;
+
+ /**
+ * Creates a pretty printer instance using the given options.
+ *
+ * Supported options:
+ * * bool $shortArraySyntax = false: Whether to use [] instead of array() as the default array
+ * syntax, if the node does not specify a format.
+ *
+ * @param array $options Dictionary of formatting options
+ */
+ public function __construct(array $options = []) {
+ $this->noIndentToken = '_NO_INDENT_' . mt_rand();
+ $this->docStringEndToken = '_DOC_STRING_END_' . mt_rand();
+
+ $defaultOptions = ['shortArraySyntax' => false];
+ $this->options = $options + $defaultOptions;
+ }
+
+ /**
+ * Pretty prints an array of statements.
+ *
+ * @param Node[] $stmts Array of statements
+ *
+ * @return string Pretty printed statements
+ */
+ public function prettyPrint(array $stmts) {
+ $this->preprocessNodes($stmts);
+
+ return ltrim($this->handleMagicTokens($this->pStmts($stmts, false)));
+ }
+
+ /**
+ * Pretty prints an expression.
+ *
+ * @param Expr $node Expression node
+ *
+ * @return string Pretty printed node
+ */
+ public function prettyPrintExpr(Expr $node) {
+ return $this->handleMagicTokens($this->p($node));
+ }
+
+ /**
+ * Pretty prints a file of statements (includes the opening <?php tag if it is required).
+ *
+ * @param Node[] $stmts Array of statements
+ *
+ * @return string Pretty printed statements
+ */
+ public function prettyPrintFile(array $stmts) {
+ if (!$stmts) {
+ return "<?php\n\n";
+ }
+
+ $p = "<?php\n\n" . $this->prettyPrint($stmts);
+
+ if ($stmts[0] instanceof Stmt\InlineHTML) {
+ $p = preg_replace('/^<\?php\s+\?>\n?/', '', $p);
+ }
+ if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) {
+ $p = preg_replace('/<\?php$/', '', rtrim($p));
+ }
+
+ return $p;
+ }
+
+ /**
+ * Preprocesses the top-level nodes to initialize pretty printer state.
+ *
+ * @param Node[] $nodes Array of nodes
+ */
+ protected function preprocessNodes(array $nodes) {
+ /* We can use semicolon-namespaces unless there is a global namespace declaration */
+ $this->canUseSemicolonNamespaces = true;
+ foreach ($nodes as $node) {
+ if ($node instanceof Stmt\Namespace_ && null === $node->name) {
+ $this->canUseSemicolonNamespaces = false;
+ }
+ }
+ }
+
+ protected function handleMagicTokens($str) {
+ // Drop no-indent tokens
+ $str = str_replace($this->noIndentToken, '', $str);
+
+ // Replace doc-string-end tokens with nothing or a newline
+ $str = str_replace($this->docStringEndToken . ";\n", ";\n", $str);
+ $str = str_replace($this->docStringEndToken, "\n", $str);
+
+ return $str;
+ }
+
+ /**
+ * Pretty prints an array of nodes (statements) and indents them optionally.
+ *
+ * @param Node[] $nodes Array of nodes
+ * @param bool $indent Whether to indent the printed nodes
+ *
+ * @return string Pretty printed statements
+ */
+ protected function pStmts(array $nodes, $indent = true) {
+ $result = '';
+ foreach ($nodes as $node) {
+ $comments = $node->getAttribute('comments', array());
+ if ($comments) {
+ $result .= "\n" . $this->pComments($comments);
+ if ($node instanceof Stmt\Nop) {
+ continue;
+ }
+ }
+
+ $result .= "\n" . $this->p($node) . ($node instanceof Expr ? ';' : '');
+ }
+
+ if ($indent) {
+ return preg_replace('~\n(?!$|' . $this->noIndentToken . ')~', "\n ", $result);
+ } else {
+ return $result;
+ }
+ }
+
+ /**
+ * Pretty prints a node.
+ *
+ * @param Node $node Node to be pretty printed
+ *
+ * @return string Pretty printed node
+ */
+ protected function p(Node $node) {
+ return $this->{'p' . $node->getType()}($node);
+ }
+
+ protected function pInfixOp($type, Node $leftNode, $operatorString, Node $rightNode) {
+ list($precedence, $associativity) = $this->precedenceMap[$type];
+
+ return $this->pPrec($leftNode, $precedence, $associativity, -1)
+ . $operatorString
+ . $this->pPrec($rightNode, $precedence, $associativity, 1);
+ }
+
+ protected function pPrefixOp($type, $operatorString, Node $node) {
+ list($precedence, $associativity) = $this->precedenceMap[$type];
+ return $operatorString . $this->pPrec($node, $precedence, $associativity, 1);
+ }
+
+ protected function pPostfixOp($type, Node $node, $operatorString) {
+ list($precedence, $associativity) = $this->precedenceMap[$type];
+ return $this->pPrec($node, $precedence, $associativity, -1) . $operatorString;
+ }
+
+ /**
+ * Prints an expression node with the least amount of parentheses necessary to preserve the meaning.
+ *
+ * @param Node $node Node to pretty print
+ * @param int $parentPrecedence Precedence of the parent operator
+ * @param int $parentAssociativity Associativity of parent operator
+ * (-1 is left, 0 is nonassoc, 1 is right)
+ * @param int $childPosition Position of the node relative to the operator
+ * (-1 is left, 1 is right)
+ *
+ * @return string The pretty printed node
+ */
+ protected function pPrec(Node $node, $parentPrecedence, $parentAssociativity, $childPosition) {
+ $type = $node->getType();
+ if (isset($this->precedenceMap[$type])) {
+ $childPrecedence = $this->precedenceMap[$type][0];
+ if ($childPrecedence > $parentPrecedence
+ || ($parentPrecedence == $childPrecedence && $parentAssociativity != $childPosition)
+ ) {
+ return '(' . $this->{'p' . $type}($node) . ')';
+ }
+ }
+
+ return $this->{'p' . $type}($node);
+ }
+
+ /**
+ * Pretty prints an array of nodes and implodes the printed values.
+ *
+ * @param Node[] $nodes Array of Nodes to be printed
+ * @param string $glue Character to implode with
+ *
+ * @return string Imploded pretty printed nodes
+ */
+ protected function pImplode(array $nodes, $glue = '') {
+ $pNodes = array();
+ foreach ($nodes as $node) {
+ if (null === $node) {
+ $pNodes[] = '';
+ } else {
+ $pNodes[] = $this->p($node);
+ }
+ }
+
+ return implode($glue, $pNodes);
+ }
+
+ /**
+ * Pretty prints an array of nodes and implodes the printed values with commas.
+ *
+ * @param Node[] $nodes Array of Nodes to be printed
+ *
+ * @return string Comma separated pretty printed nodes
+ */
+ protected function pCommaSeparated(array $nodes) {
+ return $this->pImplode($nodes, ', ');
+ }
+
+ /**
+ * Signals the pretty printer that a string shall not be indented.
+ *
+ * @param string $string Not to be indented string
+ *
+ * @return string String marked with $this->noIndentToken's.
+ */
+ protected function pNoIndent($string) {
+ return str_replace("\n", "\n" . $this->noIndentToken, $string);
+ }
+
+ /**
+ * Prints reformatted text of the passed comments.
+ *
+ * @param Comment[] $comments List of comments
+ *
+ * @return string Reformatted text of comments
+ */
+ protected function pComments(array $comments) {
+ $formattedComments = [];
+
+ foreach ($comments as $comment) {
+ $formattedComments[] = $comment->getReformattedText();
+ }
+
+ return implode("\n", $formattedComments);
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Serializer.php b/vendor/nikic/php-parser/lib/PhpParser/Serializer.php
new file mode 100644
index 0000000..7c173cd
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Serializer.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace PhpParser;
+
+interface Serializer
+{
+ /**
+ * Serializes statements into some string format.
+ *
+ * @param array $nodes Statements
+ *
+ * @return string Serialized string
+ */
+ public function serialize(array $nodes);
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Serializer/XML.php b/vendor/nikic/php-parser/lib/PhpParser/Serializer/XML.php
new file mode 100644
index 0000000..ad5c7e9
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Serializer/XML.php
@@ -0,0 +1,86 @@
+<?php
+
+namespace PhpParser\Serializer;
+
+use PhpParser\Comment;
+use PhpParser\Node;
+use PhpParser\Serializer;
+use XMLWriter;
+
+class XML implements Serializer
+{
+ protected $writer;
+
+ /**
+ * Constructs a XML serializer.
+ */
+ public function __construct() {
+ $this->writer = new XMLWriter;
+ $this->writer->openMemory();
+ $this->writer->setIndent(true);
+ }
+
+ public function serialize(array $nodes) {
+ $this->writer->flush();
+ $this->writer->startDocument('1.0', 'UTF-8');
+
+ $this->writer->startElement('AST');
+ $this->writer->writeAttribute('xmlns:node', 'http://nikic.github.com/PHPParser/XML/node');
+ $this->writer->writeAttribute('xmlns:subNode', 'http://nikic.github.com/PHPParser/XML/subNode');
+ $this->writer->writeAttribute('xmlns:attribute', 'http://nikic.github.com/PHPParser/XML/attribute');
+ $this->writer->writeAttribute('xmlns:scalar', 'http://nikic.github.com/PHPParser/XML/scalar');
+
+ $this->_serialize($nodes);
+
+ $this->writer->endElement();
+
+ return $this->writer->outputMemory();
+ }
+
+ protected function _serialize($node) {
+ if ($node instanceof Node) {
+ $this->writer->startElement('node:' . $node->getType());
+
+ foreach ($node->getAttributes() as $name => $value) {
+ $this->writer->startElement('attribute:' . $name);
+ $this->_serialize($value);
+ $this->writer->endElement();
+ }
+
+ foreach ($node as $name => $subNode) {
+ $this->writer->startElement('subNode:' . $name);
+ $this->_serialize($subNode);
+ $this->writer->endElement();
+ }
+
+ $this->writer->endElement();
+ } elseif ($node instanceof Comment) {
+ $this->writer->startElement('comment');
+ $this->writer->writeAttribute('isDocComment', $node instanceof Comment\Doc ? 'true' : 'false');
+ $this->writer->writeAttribute('line', (string) $node->getLine());
+ $this->writer->text($node->getText());
+ $this->writer->endElement();
+ } elseif (is_array($node)) {
+ $this->writer->startElement('scalar:array');
+ foreach ($node as $subNode) {
+ $this->_serialize($subNode);
+ }
+ $this->writer->endElement();
+ } elseif (is_string($node)) {
+ $this->writer->writeElement('scalar:string', $node);
+ } elseif (is_int($node)) {
+ $this->writer->writeElement('scalar:int', (string) $node);
+ } elseif (is_float($node)) {
+ // TODO Higher precision conversion?
+ $this->writer->writeElement('scalar:float', (string) $node);
+ } elseif (true === $node) {
+ $this->writer->writeElement('scalar:true');
+ } elseif (false === $node) {
+ $this->writer->writeElement('scalar:false');
+ } elseif (null === $node) {
+ $this->writer->writeElement('scalar:null');
+ } else {
+ throw new \InvalidArgumentException('Unexpected node type');
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Unserializer.php b/vendor/nikic/php-parser/lib/PhpParser/Unserializer.php
new file mode 100644
index 0000000..bfa6da0
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Unserializer.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace PhpParser;
+
+interface Unserializer
+{
+ /**
+ * Unserializes a string in some format into a node tree.
+ *
+ * @param string $string Serialized string
+ *
+ * @return mixed Node tree
+ */
+ public function unserialize($string);
+}
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Unserializer/XML.php b/vendor/nikic/php-parser/lib/PhpParser/Unserializer/XML.php
new file mode 100644
index 0000000..be414cf
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Unserializer/XML.php
@@ -0,0 +1,152 @@
+<?php
+
+namespace PhpParser\Unserializer;
+
+use DomainException;
+use PhpParser\Unserializer;
+use XMLReader;
+
+class XML implements Unserializer
+{
+ protected $reader;
+
+ public function __construct() {
+ $this->reader = new XMLReader;
+ }
+
+ public function unserialize($string) {
+ $this->reader->XML($string);
+
+ $this->reader->read();
+ if ('AST' !== $this->reader->name) {
+ throw new DomainException('AST root element not found');
+ }
+
+ return $this->read($this->reader->depth);
+ }
+
+ protected function read($depthLimit, $throw = true, &$nodeFound = null) {
+ $nodeFound = true;
+ while ($this->reader->read() && $depthLimit < $this->reader->depth) {
+ if (XMLReader::ELEMENT !== $this->reader->nodeType) {
+ continue;
+ }
+
+ if ('node' === $this->reader->prefix) {
+ return $this->readNode();
+ } elseif ('scalar' === $this->reader->prefix) {
+ return $this->readScalar();
+ } elseif ('comment' === $this->reader->name) {
+ return $this->readComment();
+ } else {
+ throw new DomainException(sprintf('Unexpected node of type "%s"', $this->reader->name));
+ }
+ }
+
+ $nodeFound = false;
+ if ($throw) {
+ throw new DomainException('Expected node or scalar');
+ }
+ }
+
+ protected function readNode() {
+ $className = $this->getClassNameFromType($this->reader->localName);
+
+ // create the node without calling it's constructor
+ $node = unserialize(
+ sprintf(
+ "O:%d:\"%s\":1:{s:13:\"\0*\0attributes\";a:0:{}}",
+ strlen($className), $className
+ )
+ );
+
+ $depthLimit = $this->reader->depth;
+ while ($this->reader->read() && $depthLimit < $this->reader->depth) {
+ if (XMLReader::ELEMENT !== $this->reader->nodeType) {
+ continue;
+ }
+
+ $type = $this->reader->prefix;
+ if ('subNode' !== $type && 'attribute' !== $type) {
+ throw new DomainException(
+ sprintf('Expected sub node or attribute, got node of type "%s"', $this->reader->name)
+ );
+ }
+
+ $name = $this->reader->localName;
+ $value = $this->read($this->reader->depth);
+
+ if ('subNode' === $type) {
+ $node->$name = $value;
+ } else {
+ $node->setAttribute($name, $value);
+ }
+ }
+
+ return $node;
+ }
+
+ protected function readScalar() {
+ switch ($name = $this->reader->localName) {
+ case 'array':
+ $depth = $this->reader->depth;
+ $array = array();
+ while (true) {
+ $node = $this->read($depth, false, $nodeFound);
+ if (!$nodeFound) {
+ break;
+ }
+ $array[] = $node;
+ }
+ return $array;
+ case 'string':
+ return $this->reader->readString();
+ case 'int':
+ return $this->parseInt($this->reader->readString());
+ case 'float':
+ $text = $this->reader->readString();
+ if (false === $float = filter_var($text, FILTER_VALIDATE_FLOAT)) {
+ throw new DomainException(sprintf('"%s" is not a valid float', $text));
+ }
+ return $float;
+ case 'true':
+ case 'false':
+ case 'null':
+ if (!$this->reader->isEmptyElement) {
+ throw new DomainException(sprintf('"%s" scalar must be empty', $name));
+ }
+ return constant($name);
+ default:
+ throw new DomainException(sprintf('Unknown scalar type "%s"', $name));
+ }
+ }
+
+ private function parseInt($text) {
+ if (false === $int = filter_var($text, FILTER_VALIDATE_INT)) {
+ throw new DomainException(sprintf('"%s" is not a valid integer', $text));
+ }
+ return $int;
+ }
+
+ protected function readComment() {
+ $className = $this->reader->getAttribute('isDocComment') === 'true'
+ ? 'PhpParser\Comment\Doc'
+ : 'PhpParser\Comment'
+ ;
+ return new $className(
+ $this->reader->readString(),
+ $this->parseInt($this->reader->getAttribute('line'))
+ );
+ }
+
+ protected function getClassNameFromType($type) {
+ $className = 'PhpParser\\Node\\' . strtr($type, '_', '\\');
+ if (!class_exists($className)) {
+ $className .= '_';
+ }
+ if (!class_exists($className)) {
+ throw new DomainException(sprintf('Unknown node type "%s"', $type));
+ }
+ return $className;
+ }
+}
diff --git a/vendor/nikic/php-parser/lib/bootstrap.php b/vendor/nikic/php-parser/lib/bootstrap.php
new file mode 100644
index 0000000..b0f5178
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/bootstrap.php
@@ -0,0 +1,6 @@
+<?php
+
+if (!class_exists('PhpParser\Autoloader')) {
+ require __DIR__ . '/PhpParser/Autoloader.php';
+}
+PhpParser\Autoloader::register();
diff --git a/vendor/nikic/php-parser/phpunit.xml.dist b/vendor/nikic/php-parser/phpunit.xml.dist
new file mode 100644
index 0000000..8c2d0f2
--- /dev/null
+++ b/vendor/nikic/php-parser/phpunit.xml.dist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit backupGlobals="false"
+ backupStaticAttributes="false"
+ colors="false"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ processIsolation="false"
+ stopOnFailure="false"
+ syntaxCheck="false"
+ bootstrap="./test/bootstrap.php">
+ <testsuites>
+ <testsuite name="PHPParser Test Suite">
+ <directory>./test/</directory>
+ </testsuite>
+ </testsuites>
+
+ <filter>
+ <whitelist>
+ <directory suffix=".php">./lib/PhpParser/</directory>
+ </whitelist>
+ </filter>
+</phpunit>
diff --git a/vendor/nikic/php-parser/test/PhpParser/AutoloaderTest.php b/vendor/nikic/php-parser/test/PhpParser/AutoloaderTest.php
new file mode 100644
index 0000000..8eeded8
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/AutoloaderTest.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace PhpParser;
+
+/* The autoloader is already active at this point, so we only check effects here. */
+
+class AutoloaderTest extends \PHPUnit_Framework_TestCase {
+ public function testClassExists() {
+ $this->assertTrue(class_exists('PhpParser\NodeVisitorAbstract'));
+ $this->assertFalse(class_exists('PHPParser_NodeVisitor_NameResolver'));
+
+ $this->assertFalse(class_exists('PhpParser\FooBar'));
+ $this->assertFalse(class_exists('PHPParser_FooBar'));
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php
new file mode 100644
index 0000000..0f74182
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php
@@ -0,0 +1,161 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser\Comment;
+use PhpParser\Node;
+use PhpParser\Node\Name;
+use PhpParser\Node\Stmt;
+
+class ClassTest extends \PHPUnit_Framework_TestCase
+{
+ protected function createClassBuilder($class) {
+ return new Class_($class);
+ }
+
+ public function testExtendsImplements() {
+ $node = $this->createClassBuilder('SomeLogger')
+ ->extend('BaseLogger')
+ ->implement('Namespaced\Logger', new Name('SomeInterface'))
+ ->implement('\Fully\Qualified', 'namespace\NamespaceRelative')
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Class_('SomeLogger', array(
+ 'extends' => new Name('BaseLogger'),
+ 'implements' => array(
+ new Name('Namespaced\Logger'),
+ new Name('SomeInterface'),
+ new Name\FullyQualified('Fully\Qualified'),
+ new Name\Relative('NamespaceRelative'),
+ ),
+ )),
+ $node
+ );
+ }
+
+ public function testAbstract() {
+ $node = $this->createClassBuilder('Test')
+ ->makeAbstract()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Class_('Test', array(
+ 'flags' => Stmt\Class_::MODIFIER_ABSTRACT
+ )),
+ $node
+ );
+ }
+
+ public function testFinal() {
+ $node = $this->createClassBuilder('Test')
+ ->makeFinal()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Class_('Test', array(
+ 'flags' => Stmt\Class_::MODIFIER_FINAL
+ )),
+ $node
+ );
+ }
+
+ public function testStatementOrder() {
+ $method = new Stmt\ClassMethod('testMethod');
+ $property = new Stmt\Property(
+ Stmt\Class_::MODIFIER_PUBLIC,
+ array(new Stmt\PropertyProperty('testProperty'))
+ );
+ $const = new Stmt\ClassConst(array(
+ new Node\Const_('TEST_CONST', new Node\Scalar\String_('ABC'))
+ ));
+ $use = new Stmt\TraitUse(array(new Name('SomeTrait')));
+
+ $node = $this->createClassBuilder('Test')
+ ->addStmt($method)
+ ->addStmt($property)
+ ->addStmts(array($const, $use))
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Class_('Test', array(
+ 'stmts' => array($use, $const, $property, $method)
+ )),
+ $node
+ );
+ }
+
+ public function testDocComment() {
+ $docComment = <<<'DOC'
+/**
+ * Test
+ */
+DOC;
+ $class = $this->createClassBuilder('Test')
+ ->setDocComment($docComment)
+ ->getNode();
+
+ $this->assertEquals(
+ new Stmt\Class_('Test', array(), array(
+ 'comments' => array(
+ new Comment\Doc($docComment)
+ )
+ )),
+ $class
+ );
+
+ $class = $this->createClassBuilder('Test')
+ ->setDocComment(new Comment\Doc($docComment))
+ ->getNode();
+
+ $this->assertEquals(
+ new Stmt\Class_('Test', array(), array(
+ 'comments' => array(
+ new Comment\Doc($docComment)
+ )
+ )),
+ $class
+ );
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Unexpected node of type "Stmt_Echo"
+ */
+ public function testInvalidStmtError() {
+ $this->createClassBuilder('Test')
+ ->addStmt(new Stmt\Echo_(array()))
+ ;
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Doc comment must be a string or an instance of PhpParser\Comment\Doc
+ */
+ public function testInvalidDocComment() {
+ $this->createClassBuilder('Test')
+ ->setDocComment(new Comment('Test'));
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Name cannot be empty
+ */
+ public function testEmptyName() {
+ $this->createClassBuilder('Test')
+ ->extend('');
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Name must be a string or an instance of PhpParser\Node\Name
+ */
+ public function testInvalidName() {
+ $this->createClassBuilder('Test')
+ ->extend(array('Foo'));
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php
new file mode 100644
index 0000000..f6a9381
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/FunctionTest.php
@@ -0,0 +1,106 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser\Comment;
+use PhpParser\Node;
+use PhpParser\Node\Expr\Print_;
+use PhpParser\Node\Scalar\String_;
+use PhpParser\Node\Stmt;
+
+class FunctionTest extends \PHPUnit_Framework_TestCase
+{
+ public function createFunctionBuilder($name) {
+ return new Function_($name);
+ }
+
+ public function testReturnByRef() {
+ $node = $this->createFunctionBuilder('test')
+ ->makeReturnByRef()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Function_('test', array(
+ 'byRef' => true
+ )),
+ $node
+ );
+ }
+
+ public function testParams() {
+ $param1 = new Node\Param('test1');
+ $param2 = new Node\Param('test2');
+ $param3 = new Node\Param('test3');
+
+ $node = $this->createFunctionBuilder('test')
+ ->addParam($param1)
+ ->addParams(array($param2, $param3))
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Function_('test', array(
+ 'params' => array($param1, $param2, $param3)
+ )),
+ $node
+ );
+ }
+
+ public function testStmts() {
+ $stmt1 = new Print_(new String_('test1'));
+ $stmt2 = new Print_(new String_('test2'));
+ $stmt3 = new Print_(new String_('test3'));
+
+ $node = $this->createFunctionBuilder('test')
+ ->addStmt($stmt1)
+ ->addStmts(array($stmt2, $stmt3))
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Function_('test', array(
+ 'stmts' => array($stmt1, $stmt2, $stmt3)
+ )),
+ $node
+ );
+ }
+
+ public function testDocComment() {
+ $node = $this->createFunctionBuilder('test')
+ ->setDocComment('/** Test */')
+ ->getNode();
+
+ $this->assertEquals(new Stmt\Function_('test', array(), array(
+ 'comments' => array(new Comment\Doc('/** Test */'))
+ )), $node);
+ }
+
+ public function testReturnType() {
+ $node = $this->createFunctionBuilder('test')
+ ->setReturnType('void')
+ ->getNode();
+
+ $this->assertEquals(new Stmt\Function_('test', array(
+ 'returnType' => 'void'
+ ), array()), $node);
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage void type cannot be nullable
+ */
+ public function testInvalidNullableVoidType() {
+ $this->createFunctionBuilder('test')->setReturnType('?void');
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Expected parameter node, got "Name"
+ */
+ public function testInvalidParamError() {
+ $this->createFunctionBuilder('test')
+ ->addParam(new Node\Name('foo'))
+ ;
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php
new file mode 100644
index 0000000..72c5866
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/InterfaceTest.php
@@ -0,0 +1,105 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser\Comment;
+use PhpParser\Node;
+use PhpParser\Node\Scalar\DNumber;
+use PhpParser\Node\Stmt;
+
+class InterfaceTest extends \PHPUnit_Framework_TestCase
+{
+ /** @var Interface_ */
+ protected $builder;
+
+ protected function setUp() {
+ $this->builder = new Interface_('Contract');
+ }
+
+ private function dump($node) {
+ $pp = new \PhpParser\PrettyPrinter\Standard;
+ return $pp->prettyPrint(array($node));
+ }
+
+ public function testEmpty() {
+ $contract = $this->builder->getNode();
+ $this->assertInstanceOf('PhpParser\Node\Stmt\Interface_', $contract);
+ $this->assertSame('Contract', $contract->name);
+ }
+
+ public function testExtending() {
+ $contract = $this->builder->extend('Space\Root1', 'Root2')->getNode();
+ $this->assertEquals(
+ new Stmt\Interface_('Contract', array(
+ 'extends' => array(
+ new Node\Name('Space\Root1'),
+ new Node\Name('Root2')
+ ),
+ )), $contract
+ );
+ }
+
+ public function testAddMethod() {
+ $method = new Stmt\ClassMethod('doSomething');
+ $contract = $this->builder->addStmt($method)->getNode();
+ $this->assertSame(array($method), $contract->stmts);
+ }
+
+ public function testAddConst() {
+ $const = new Stmt\ClassConst(array(
+ new Node\Const_('SPEED_OF_LIGHT', new DNumber(299792458.0))
+ ));
+ $contract = $this->builder->addStmt($const)->getNode();
+ $this->assertSame(299792458.0, $contract->stmts[0]->consts[0]->value->value);
+ }
+
+ public function testOrder() {
+ $const = new Stmt\ClassConst(array(
+ new Node\Const_('SPEED_OF_LIGHT', new DNumber(299792458))
+ ));
+ $method = new Stmt\ClassMethod('doSomething');
+ $contract = $this->builder
+ ->addStmt($method)
+ ->addStmt($const)
+ ->getNode()
+ ;
+
+ $this->assertInstanceOf('PhpParser\Node\Stmt\ClassConst', $contract->stmts[0]);
+ $this->assertInstanceOf('PhpParser\Node\Stmt\ClassMethod', $contract->stmts[1]);
+ }
+
+ public function testDocComment() {
+ $node = $this->builder
+ ->setDocComment('/** Test */')
+ ->getNode();
+
+ $this->assertEquals(new Stmt\Interface_('Contract', array(), array(
+ 'comments' => array(new Comment\Doc('/** Test */'))
+ )), $node);
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Unexpected node of type "Stmt_PropertyProperty"
+ */
+ public function testInvalidStmtError() {
+ $this->builder->addStmt(new Stmt\PropertyProperty('invalid'));
+ }
+
+ public function testFullFunctional() {
+ $const = new Stmt\ClassConst(array(
+ new Node\Const_('SPEED_OF_LIGHT', new DNumber(299792458))
+ ));
+ $method = new Stmt\ClassMethod('doSomething');
+ $contract = $this->builder
+ ->addStmt($method)
+ ->addStmt($const)
+ ->getNode()
+ ;
+
+ eval($this->dump($contract));
+
+ $this->assertTrue(interface_exists('Contract', false));
+ }
+}
+
diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php
new file mode 100644
index 0000000..21c5617
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/MethodTest.php
@@ -0,0 +1,163 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser\Comment;
+use PhpParser\Node;
+use PhpParser\Node\Expr\Print_;
+use PhpParser\Node\Scalar\String_;
+use PhpParser\Node\Stmt;
+
+class MethodTest extends \PHPUnit_Framework_TestCase
+{
+ public function createMethodBuilder($name) {
+ return new Method($name);
+ }
+
+ public function testModifiers() {
+ $node = $this->createMethodBuilder('test')
+ ->makePublic()
+ ->makeAbstract()
+ ->makeStatic()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\ClassMethod('test', array(
+ 'flags' => Stmt\Class_::MODIFIER_PUBLIC
+ | Stmt\Class_::MODIFIER_ABSTRACT
+ | Stmt\Class_::MODIFIER_STATIC,
+ 'stmts' => null,
+ )),
+ $node
+ );
+
+ $node = $this->createMethodBuilder('test')
+ ->makeProtected()
+ ->makeFinal()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\ClassMethod('test', array(
+ 'flags' => Stmt\Class_::MODIFIER_PROTECTED
+ | Stmt\Class_::MODIFIER_FINAL
+ )),
+ $node
+ );
+
+ $node = $this->createMethodBuilder('test')
+ ->makePrivate()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\ClassMethod('test', array(
+ 'type' => Stmt\Class_::MODIFIER_PRIVATE
+ )),
+ $node
+ );
+ }
+
+ public function testReturnByRef() {
+ $node = $this->createMethodBuilder('test')
+ ->makeReturnByRef()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\ClassMethod('test', array(
+ 'byRef' => true
+ )),
+ $node
+ );
+ }
+
+ public function testParams() {
+ $param1 = new Node\Param('test1');
+ $param2 = new Node\Param('test2');
+ $param3 = new Node\Param('test3');
+
+ $node = $this->createMethodBuilder('test')
+ ->addParam($param1)
+ ->addParams(array($param2, $param3))
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\ClassMethod('test', array(
+ 'params' => array($param1, $param2, $param3)
+ )),
+ $node
+ );
+ }
+
+ public function testStmts() {
+ $stmt1 = new Print_(new String_('test1'));
+ $stmt2 = new Print_(new String_('test2'));
+ $stmt3 = new Print_(new String_('test3'));
+
+ $node = $this->createMethodBuilder('test')
+ ->addStmt($stmt1)
+ ->addStmts(array($stmt2, $stmt3))
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\ClassMethod('test', array(
+ 'stmts' => array($stmt1, $stmt2, $stmt3)
+ )),
+ $node
+ );
+ }
+ public function testDocComment() {
+ $node = $this->createMethodBuilder('test')
+ ->setDocComment('/** Test */')
+ ->getNode();
+
+ $this->assertEquals(new Stmt\ClassMethod('test', array(), array(
+ 'comments' => array(new Comment\Doc('/** Test */'))
+ )), $node);
+ }
+
+ public function testReturnType() {
+ $node = $this->createMethodBuilder('test')
+ ->setReturnType('bool')
+ ->getNode();
+ $this->assertEquals(new Stmt\ClassMethod('test', array(
+ 'returnType' => 'bool'
+ ), array()), $node);
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Cannot add statements to an abstract method
+ */
+ public function testAddStmtToAbstractMethodError() {
+ $this->createMethodBuilder('test')
+ ->makeAbstract()
+ ->addStmt(new Print_(new String_('test')))
+ ;
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Cannot make method with statements abstract
+ */
+ public function testMakeMethodWithStmtsAbstractError() {
+ $this->createMethodBuilder('test')
+ ->addStmt(new Print_(new String_('test')))
+ ->makeAbstract()
+ ;
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Expected parameter node, got "Name"
+ */
+ public function testInvalidParamError() {
+ $this->createMethodBuilder('test')
+ ->addParam(new Node\Name('foo'))
+ ;
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php
new file mode 100644
index 0000000..54e8c93
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/NamespaceTest.php
@@ -0,0 +1,41 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser\Node;
+use PhpParser\Node\Stmt;
+
+class NamespaceTest extends \PHPUnit_Framework_TestCase
+{
+ protected function createNamespaceBuilder($fqn) {
+ return new Namespace_($fqn);
+ }
+
+ public function testCreation() {
+ $stmt1 = new Stmt\Class_('SomeClass');
+ $stmt2 = new Stmt\Interface_('SomeInterface');
+ $stmt3 = new Stmt\Function_('someFunction');
+ $expected = new Stmt\Namespace_(
+ new Node\Name('Name\Space'),
+ array($stmt1, $stmt2, $stmt3)
+ );
+
+ $node = $this->createNamespaceBuilder('Name\Space')
+ ->addStmt($stmt1)
+ ->addStmts(array($stmt2, $stmt3))
+ ->getNode()
+ ;
+ $this->assertEquals($expected, $node);
+
+ $node = $this->createNamespaceBuilder(new Node\Name(array('Name', 'Space')))
+ ->addStmts(array($stmt1, $stmt2))
+ ->addStmt($stmt3)
+ ->getNode()
+ ;
+ $this->assertEquals($expected, $node);
+
+ $node = $this->createNamespaceBuilder(null)->getNode();
+ $this->assertNull($node->name);
+ $this->assertEmpty($node->stmts);
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php
new file mode 100644
index 0000000..9b87c2f
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/ParamTest.php
@@ -0,0 +1,158 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Scalar;
+
+class ParamTest extends \PHPUnit_Framework_TestCase
+{
+ public function createParamBuilder($name) {
+ return new Param($name);
+ }
+
+ /**
+ * @dataProvider provideTestDefaultValues
+ */
+ public function testDefaultValues($value, $expectedValueNode) {
+ $node = $this->createParamBuilder('test')
+ ->setDefault($value)
+ ->getNode()
+ ;
+
+ $this->assertEquals($expectedValueNode, $node->default);
+ }
+
+ public function provideTestDefaultValues() {
+ return array(
+ array(
+ null,
+ new Expr\ConstFetch(new Node\Name('null'))
+ ),
+ array(
+ true,
+ new Expr\ConstFetch(new Node\Name('true'))
+ ),
+ array(
+ false,
+ new Expr\ConstFetch(new Node\Name('false'))
+ ),
+ array(
+ 31415,
+ new Scalar\LNumber(31415)
+ ),
+ array(
+ 3.1415,
+ new Scalar\DNumber(3.1415)
+ ),
+ array(
+ 'Hallo World',
+ new Scalar\String_('Hallo World')
+ ),
+ array(
+ array(1, 2, 3),
+ new Expr\Array_(array(
+ new Expr\ArrayItem(new Scalar\LNumber(1)),
+ new Expr\ArrayItem(new Scalar\LNumber(2)),
+ new Expr\ArrayItem(new Scalar\LNumber(3)),
+ ))
+ ),
+ array(
+ array('foo' => 'bar', 'bar' => 'foo'),
+ new Expr\Array_(array(
+ new Expr\ArrayItem(
+ new Scalar\String_('bar'),
+ new Scalar\String_('foo')
+ ),
+ new Expr\ArrayItem(
+ new Scalar\String_('foo'),
+ new Scalar\String_('bar')
+ ),
+ ))
+ ),
+ array(
+ new Scalar\MagicConst\Dir,
+ new Scalar\MagicConst\Dir
+ )
+ );
+ }
+
+ /**
+ * @dataProvider provideTestTypeHints
+ */
+ public function testTypeHints($typeHint, $expectedType) {
+ $node = $this->createParamBuilder('test')
+ ->setTypeHint($typeHint)
+ ->getNode()
+ ;
+ $type = $node->type;
+
+ /* Manually implement comparison to avoid __toString stupidity */
+ if ($expectedType instanceof Node\NullableType) {
+ $this->assertInstanceOf(get_class($expectedType), $type);
+ $expectedType = $expectedType->type;
+ $type = $type->type;
+ }
+
+ if ($expectedType instanceof Node\Name) {
+ $this->assertInstanceOf(get_class($expectedType), $type);
+ $this->assertEquals($expectedType, $type);
+ } else {
+ $this->assertSame($expectedType, $type);
+ }
+ }
+
+ public function provideTestTypeHints() {
+ return array(
+ array('array', 'array'),
+ array('callable', 'callable'),
+ array('bool', 'bool'),
+ array('int', 'int'),
+ array('float', 'float'),
+ array('string', 'string'),
+ array('iterable', 'iterable'),
+ array('Array', 'array'),
+ array('CALLABLE', 'callable'),
+ array('Some\Class', new Node\Name('Some\Class')),
+ array('\Foo', new Node\Name\FullyQualified('Foo')),
+ array('self', new Node\Name('self')),
+ array('?array', new Node\NullableType('array')),
+ array('?Some\Class', new Node\NullableType(new Node\Name('Some\Class'))),
+ array(new Node\Name('Some\Class'), new Node\Name('Some\Class')),
+ array(new Node\NullableType('int'), new Node\NullableType('int')),
+ array(
+ new Node\NullableType(new Node\Name('Some\Class')),
+ new Node\NullableType(new Node\Name('Some\Class'))
+ ),
+ );
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Parameter type cannot be void
+ */
+ public function testVoidTypeError() {
+ $this->createParamBuilder('test')->setTypeHint('void');
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Type must be a string, or an instance of Name or NullableType
+ */
+ public function testInvalidTypeError() {
+ $this->createParamBuilder('test')->setTypeHint(new \stdClass);
+ }
+
+ public function testByRef() {
+ $node = $this->createParamBuilder('test')
+ ->makeByRef()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Node\Param('test', null, null, true),
+ $node
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php
new file mode 100644
index 0000000..de8f4ce
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/PropertyTest.php
@@ -0,0 +1,147 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser\Comment;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+use PhpParser\Node\Scalar;
+use PhpParser\Node\Stmt;
+
+class PropertyTest extends \PHPUnit_Framework_TestCase
+{
+ public function createPropertyBuilder($name) {
+ return new Property($name);
+ }
+
+ public function testModifiers() {
+ $node = $this->createPropertyBuilder('test')
+ ->makePrivate()
+ ->makeStatic()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Property(
+ Stmt\Class_::MODIFIER_PRIVATE
+ | Stmt\Class_::MODIFIER_STATIC,
+ array(
+ new Stmt\PropertyProperty('test')
+ )
+ ),
+ $node
+ );
+
+ $node = $this->createPropertyBuilder('test')
+ ->makeProtected()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Property(
+ Stmt\Class_::MODIFIER_PROTECTED,
+ array(
+ new Stmt\PropertyProperty('test')
+ )
+ ),
+ $node
+ );
+
+ $node = $this->createPropertyBuilder('test')
+ ->makePublic()
+ ->getNode()
+ ;
+
+ $this->assertEquals(
+ new Stmt\Property(
+ Stmt\Class_::MODIFIER_PUBLIC,
+ array(
+ new Stmt\PropertyProperty('test')
+ )
+ ),
+ $node
+ );
+ }
+
+ public function testDocComment() {
+ $node = $this->createPropertyBuilder('test')
+ ->setDocComment('/** Test */')
+ ->getNode();
+
+ $this->assertEquals(new Stmt\Property(
+ Stmt\Class_::MODIFIER_PUBLIC,
+ array(
+ new Stmt\PropertyProperty('test')
+ ),
+ array(
+ 'comments' => array(new Comment\Doc('/** Test */'))
+ )
+ ), $node);
+ }
+
+ /**
+ * @dataProvider provideTestDefaultValues
+ */
+ public function testDefaultValues($value, $expectedValueNode) {
+ $node = $this->createPropertyBuilder('test')
+ ->setDefault($value)
+ ->getNode()
+ ;
+
+ $this->assertEquals($expectedValueNode, $node->props[0]->default);
+ }
+
+ public function provideTestDefaultValues() {
+ return array(
+ array(
+ null,
+ new Expr\ConstFetch(new Name('null'))
+ ),
+ array(
+ true,
+ new Expr\ConstFetch(new Name('true'))
+ ),
+ array(
+ false,
+ new Expr\ConstFetch(new Name('false'))
+ ),
+ array(
+ 31415,
+ new Scalar\LNumber(31415)
+ ),
+ array(
+ 3.1415,
+ new Scalar\DNumber(3.1415)
+ ),
+ array(
+ 'Hallo World',
+ new Scalar\String_('Hallo World')
+ ),
+ array(
+ array(1, 2, 3),
+ new Expr\Array_(array(
+ new Expr\ArrayItem(new Scalar\LNumber(1)),
+ new Expr\ArrayItem(new Scalar\LNumber(2)),
+ new Expr\ArrayItem(new Scalar\LNumber(3)),
+ ))
+ ),
+ array(
+ array('foo' => 'bar', 'bar' => 'foo'),
+ new Expr\Array_(array(
+ new Expr\ArrayItem(
+ new Scalar\String_('bar'),
+ new Scalar\String_('foo')
+ ),
+ new Expr\ArrayItem(
+ new Scalar\String_('foo'),
+ new Scalar\String_('bar')
+ ),
+ ))
+ ),
+ array(
+ new Scalar\MagicConst\Dir,
+ new Scalar\MagicConst\Dir
+ )
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php
new file mode 100644
index 0000000..fffccb7
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/TraitTest.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace PhpParser\Builder;
+
+use PhpParser\Comment;
+use PhpParser\Node\Stmt;
+
+class TraitTest extends \PHPUnit_Framework_TestCase
+{
+ protected function createTraitBuilder($class) {
+ return new Trait_($class);
+ }
+
+ public function testStmtAddition() {
+ $method1 = new Stmt\ClassMethod('test1');
+ $method2 = new Stmt\ClassMethod('test2');
+ $method3 = new Stmt\ClassMethod('test3');
+ $prop = new Stmt\Property(Stmt\Class_::MODIFIER_PUBLIC, array(
+ new Stmt\PropertyProperty('test')
+ ));
+ $trait = $this->createTraitBuilder('TestTrait')
+ ->setDocComment('/** Nice trait */')
+ ->addStmt($method1)
+ ->addStmts(array($method2, $method3))
+ ->addStmt($prop)
+ ->getNode();
+ $this->assertEquals(new Stmt\Trait_('TestTrait', array(
+ 'stmts' => array($prop, $method1, $method2, $method3)
+ ), array(
+ 'comments' => array(
+ new Comment\Doc('/** Nice trait */')
+ )
+ )), $trait);
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage Unexpected node of type "Stmt_Echo"
+ */
+ public function testInvalidStmtError() {
+ $this->createTraitBuilder('Test')
+ ->addStmt(new Stmt\Echo_(array()))
+ ;
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php b/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php
new file mode 100644
index 0000000..adaeb3a
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Builder/UseTest.php
@@ -0,0 +1,35 @@
+<?php
+
+use PhpParser\Builder;
+use PhpParser\Node\Name;
+use PhpParser\Node\Stmt;
+
+class UseTest extends \PHPUnit_Framework_TestCase
+{
+ protected function createUseBuilder($name, $type = Stmt\Use_::TYPE_NORMAL) {
+ return new Builder\Use_($name, $type);
+ }
+
+ public function testCreation() {
+ $node = $this->createUseBuilder('Foo\Bar')->getNode();
+ $this->assertEquals(new Stmt\Use_(array(
+ new Stmt\UseUse(new Name('Foo\Bar'), 'Bar')
+ )), $node);
+
+ $node = $this->createUseBuilder(new Name('Foo\Bar'))->as('XYZ')->getNode();
+ $this->assertEquals(new Stmt\Use_(array(
+ new Stmt\UseUse(new Name('Foo\Bar'), 'XYZ')
+ )), $node);
+
+ $node = $this->createUseBuilder('foo\bar', Stmt\Use_::TYPE_FUNCTION)->as('foo')->getNode();
+ $this->assertEquals(new Stmt\Use_(array(
+ new Stmt\UseUse(new Name('foo\bar'), 'foo')
+ ), Stmt\Use_::TYPE_FUNCTION), $node);
+ }
+
+ public function testNonExistingMethod() {
+ $this->setExpectedException('LogicException', 'Method "foo" does not exist');
+ $builder = $this->createUseBuilder('Test');
+ $builder->foo();
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php b/vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php
new file mode 100644
index 0000000..1c3ef18
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php
@@ -0,0 +1,108 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Node\Expr;
+
+class BuilderFactoryTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @dataProvider provideTestFactory
+ */
+ public function testFactory($methodName, $className) {
+ $factory = new BuilderFactory;
+ $this->assertInstanceOf($className, $factory->$methodName('test'));
+ }
+
+ public function provideTestFactory() {
+ return array(
+ array('namespace', 'PhpParser\Builder\Namespace_'),
+ array('class', 'PhpParser\Builder\Class_'),
+ array('interface', 'PhpParser\Builder\Interface_'),
+ array('trait', 'PhpParser\Builder\Trait_'),
+ array('method', 'PhpParser\Builder\Method'),
+ array('function', 'PhpParser\Builder\Function_'),
+ array('property', 'PhpParser\Builder\Property'),
+ array('param', 'PhpParser\Builder\Param'),
+ array('use', 'PhpParser\Builder\Use_'),
+ );
+ }
+
+ public function testNonExistingMethod() {
+ $this->setExpectedException('LogicException', 'Method "foo" does not exist');
+ $factory = new BuilderFactory();
+ $factory->foo();
+ }
+
+ public function testIntegration() {
+ $factory = new BuilderFactory;
+ $node = $factory->namespace('Name\Space')
+ ->addStmt($factory->use('Foo\Bar\SomeOtherClass'))
+ ->addStmt($factory->use('Foo\Bar')->as('A'))
+ ->addStmt($factory
+ ->class('SomeClass')
+ ->extend('SomeOtherClass')
+ ->implement('A\Few', '\Interfaces')
+ ->makeAbstract()
+
+ ->addStmt($factory->method('firstMethod'))
+
+ ->addStmt($factory->method('someMethod')
+ ->makePublic()
+ ->makeAbstract()
+ ->addParam($factory->param('someParam')->setTypeHint('SomeClass'))
+ ->setDocComment('/**
+ * This method does something.
+ *
+ * @param SomeClass And takes a parameter
+ */'))
+
+ ->addStmt($factory->method('anotherMethod')
+ ->makeProtected()
+ ->addParam($factory->param('someParam')->setDefault('test'))
+ ->addStmt(new Expr\Print_(new Expr\Variable('someParam'))))
+
+ ->addStmt($factory->property('someProperty')->makeProtected())
+ ->addStmt($factory->property('anotherProperty')
+ ->makePrivate()
+ ->setDefault(array(1, 2, 3))))
+ ->getNode()
+ ;
+
+ $expected = <<<'EOC'
+<?php
+
+namespace Name\Space;
+
+use Foo\Bar\SomeOtherClass;
+use Foo\Bar as A;
+abstract class SomeClass extends SomeOtherClass implements A\Few, \Interfaces
+{
+ protected $someProperty;
+ private $anotherProperty = array(1, 2, 3);
+ function firstMethod()
+ {
+ }
+ /**
+ * This method does something.
+ *
+ * @param SomeClass And takes a parameter
+ */
+ public abstract function someMethod(SomeClass $someParam);
+ protected function anotherMethod($someParam = 'test')
+ {
+ print $someParam;
+ }
+}
+EOC;
+
+ $stmts = array($node);
+ $prettyPrinter = new PrettyPrinter\Standard();
+ $generated = $prettyPrinter->prettyPrintFile($stmts);
+
+ $this->assertEquals(
+ str_replace("\r\n", "\n", $expected),
+ str_replace("\r\n", "\n", $generated)
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/CodeParsingTest.php b/vendor/nikic/php-parser/test/PhpParser/CodeParsingTest.php
new file mode 100644
index 0000000..1a4a9ad
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/CodeParsingTest.php
@@ -0,0 +1,70 @@
+<?php
+
+namespace PhpParser;
+
+require_once __DIR__ . '/CodeTestAbstract.php';
+
+class CodeParsingTest extends CodeTestAbstract
+{
+ /**
+ * @dataProvider provideTestParse
+ */
+ public function testParse($name, $code, $expected, $modeLine) {
+ if (null !== $modeLine) {
+ $modes = array_fill_keys(explode(',', $modeLine), true);
+ } else {
+ $modes = [];
+ }
+
+
+ $lexer = new Lexer\Emulative(array('usedAttributes' => array(
+ 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments'
+ )));
+ $parser5 = new Parser\Php5($lexer);
+ $parser7 = new Parser\Php7($lexer);
+
+ $dumpPositions = isset($modes['positions']);
+ $output5 = $this->getParseOutput($parser5, $code, $dumpPositions);
+ $output7 = $this->getParseOutput($parser7, $code, $dumpPositions);
+
+ if (isset($modes['php5'])) {
+ $this->assertSame($expected, $output5, $name);
+ $this->assertNotSame($expected, $output7, $name);
+ } else if (isset($modes['php7'])) {
+ $this->assertNotSame($expected, $output5, $name);
+ $this->assertSame($expected, $output7, $name);
+ } else {
+ $this->assertSame($expected, $output5, $name);
+ $this->assertSame($expected, $output7, $name);
+ }
+ }
+
+ private function getParseOutput(Parser $parser, $code, $dumpPositions) {
+ $errors = new ErrorHandler\Collecting;
+ $stmts = $parser->parse($code, $errors);
+
+ $output = '';
+ foreach ($errors->getErrors() as $error) {
+ $output .= $this->formatErrorMessage($error, $code) . "\n";
+ }
+
+ if (null !== $stmts) {
+ $dumper = new NodeDumper(['dumpComments' => true, 'dumpPositions' => $dumpPositions]);
+ $output .= $dumper->dump($stmts, $code);
+ }
+
+ return canonicalize($output);
+ }
+
+ public function provideTestParse() {
+ return $this->getTests(__DIR__ . '/../code/parser', 'test');
+ }
+
+ private function formatErrorMessage(Error $e, $code) {
+ if ($e->hasColumnInfo()) {
+ return $e->getMessageWithColumnInfo($code);
+ } else {
+ return $e->getMessage();
+ }
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php b/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php
new file mode 100644
index 0000000..369ee41
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/CodeTestAbstract.php
@@ -0,0 +1,61 @@
+<?php
+
+namespace PhpParser;
+
+abstract class CodeTestAbstract extends \PHPUnit_Framework_TestCase
+{
+ protected function getTests($directory, $fileExtension) {
+ $directory = realpath($directory);
+ $it = new \RecursiveDirectoryIterator($directory);
+ $it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::LEAVES_ONLY);
+ $it = new \RegexIterator($it, '(\.' . preg_quote($fileExtension) . '$)');
+
+ $tests = array();
+ foreach ($it as $file) {
+ $fileName = $file->getPathname();
+ $fileContents = file_get_contents($fileName);
+ $fileContents = canonicalize($fileContents);
+
+ // evaluate @@{expr}@@ expressions
+ $fileContents = preg_replace_callback(
+ '/@@\{(.*?)\}@@/',
+ function($matches) {
+ return eval('return ' . $matches[1] . ';');
+ },
+ $fileContents
+ );
+
+ // parse sections
+ $parts = preg_split("/\n-----(?:\n|$)/", $fileContents);
+
+ // first part is the name
+ $name = array_shift($parts) . ' (' . $fileName . ')';
+ $shortName = ltrim(str_replace($directory, '', $fileName), '/\\');
+
+ // multiple sections possible with always two forming a pair
+ $chunks = array_chunk($parts, 2);
+ foreach ($chunks as $i => $chunk) {
+ $dataSetName = $shortName . (count($chunks) > 1 ? '#' . $i : '');
+ list($expected, $mode) = $this->extractMode($chunk[1]);
+ $tests[$dataSetName] = array($name, $chunk[0], $expected, $mode);
+ }
+ }
+
+ return $tests;
+ }
+
+ private function extractMode($expected) {
+ $firstNewLine = strpos($expected, "\n");
+ if (false === $firstNewLine) {
+ $firstNewLine = strlen($expected);
+ }
+
+ $firstLine = substr($expected, 0, $firstNewLine);
+ if (0 !== strpos($firstLine, '!!')) {
+ return [$expected, null];
+ }
+
+ $expected = (string) substr($expected, $firstNewLine + 1);
+ return [$expected, substr($firstLine, 2)];
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/CommentTest.php b/vendor/nikic/php-parser/test/PhpParser/CommentTest.php
new file mode 100644
index 0000000..081dd57
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/CommentTest.php
@@ -0,0 +1,73 @@
+<?php
+
+namespace PhpParser;
+
+class CommentTest extends \PHPUnit_Framework_TestCase
+{
+ public function testGetSet() {
+ $comment = new Comment('/* Some comment */', 1, 10);
+
+ $this->assertSame('/* Some comment */', $comment->getText());
+ $this->assertSame('/* Some comment */', (string) $comment);
+ $this->assertSame(1, $comment->getLine());
+ $this->assertSame(10, $comment->getFilePos());
+ }
+
+ /**
+ * @dataProvider provideTestReformatting
+ */
+ public function testReformatting($commentText, $reformattedText) {
+ $comment = new Comment($commentText);
+ $this->assertSame($reformattedText, $comment->getReformattedText());
+ }
+
+ public function provideTestReformatting() {
+ return array(
+ array('// Some text' . "\n", '// Some text'),
+ array('/* Some text */', '/* Some text */'),
+ array(
+ '/**
+ * Some text.
+ * Some more text.
+ */',
+ '/**
+ * Some text.
+ * Some more text.
+ */'
+ ),
+ array(
+ '/*
+ Some text.
+ Some more text.
+ */',
+ '/*
+ Some text.
+ Some more text.
+*/'
+ ),
+ array(
+ '/* Some text.
+ More text.
+ Even more text. */',
+ '/* Some text.
+ More text.
+ Even more text. */'
+ ),
+ array(
+ '/* Some text.
+ More text.
+ Indented text. */',
+ '/* Some text.
+ More text.
+ Indented text. */',
+ ),
+ // invalid comment -> no reformatting
+ array(
+ 'hallo
+ world',
+ 'hallo
+ world',
+ ),
+ );
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php
new file mode 100644
index 0000000..3742981
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/CollectingTest.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace PhpParser\ErrorHandler;
+
+use PhpParser\Error;
+
+class CollectingTest extends \PHPUnit_Framework_TestCase {
+ public function testHandleError() {
+ $errorHandler = new Collecting();
+ $this->assertFalse($errorHandler->hasErrors());
+ $this->assertEmpty($errorHandler->getErrors());
+
+ $errorHandler->handleError($e1 = new Error('Test 1'));
+ $errorHandler->handleError($e2 = new Error('Test 2'));
+ $this->assertTrue($errorHandler->hasErrors());
+ $this->assertSame([$e1, $e2], $errorHandler->getErrors());
+
+ $errorHandler->clearErrors();
+ $this->assertFalse($errorHandler->hasErrors());
+ $this->assertEmpty($errorHandler->getErrors());
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php
new file mode 100644
index 0000000..d7df7c2
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/ErrorHandler/ThrowingTest.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace PhpParser\ErrorHandler;
+
+use PhpParser\Error;
+
+class ThrowingTest extends \PHPUnit_Framework_TestCase {
+ /**
+ * @expectedException \PhpParser\Error
+ * @expectedExceptionMessage Test
+ */
+ public function testHandleError() {
+ $errorHandler = new Throwing();
+ $errorHandler->handleError(new Error('Test'));
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php b/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php
new file mode 100644
index 0000000..59e880c
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/ErrorTest.php
@@ -0,0 +1,106 @@
+<?php
+
+namespace PhpParser;
+
+class ErrorTest extends \PHPUnit_Framework_TestCase
+{
+ public function testConstruct() {
+ $attributes = array(
+ 'startLine' => 10,
+ 'endLine' => 11,
+ );
+ $error = new Error('Some error', $attributes);
+
+ $this->assertSame('Some error', $error->getRawMessage());
+ $this->assertSame($attributes, $error->getAttributes());
+ $this->assertSame(10, $error->getStartLine());
+ $this->assertSame(11, $error->getEndLine());
+ $this->assertSame('Some error on line 10', $error->getMessage());
+
+ return $error;
+ }
+
+ /**
+ * @depends testConstruct
+ */
+ public function testSetMessageAndLine(Error $error) {
+ $error->setRawMessage('Some other error');
+ $this->assertSame('Some other error', $error->getRawMessage());
+
+ $error->setStartLine(15);
+ $this->assertSame(15, $error->getStartLine());
+ $this->assertSame('Some other error on line 15', $error->getMessage());
+ }
+
+ public function testUnknownLine() {
+ $error = new Error('Some error');
+
+ $this->assertSame(-1, $error->getStartLine());
+ $this->assertSame(-1, $error->getEndLine());
+ $this->assertSame('Some error on unknown line', $error->getMessage());
+ }
+
+ /** @dataProvider provideTestColumnInfo */
+ public function testColumnInfo($code, $startPos, $endPos, $startColumn, $endColumn) {
+ $error = new Error('Some error', array(
+ 'startFilePos' => $startPos,
+ 'endFilePos' => $endPos,
+ ));
+
+ $this->assertSame(true, $error->hasColumnInfo());
+ $this->assertSame($startColumn, $error->getStartColumn($code));
+ $this->assertSame($endColumn, $error->getEndColumn($code));
+
+ }
+
+ public function provideTestColumnInfo() {
+ return array(
+ // Error at "bar"
+ array("<?php foo bar baz", 10, 12, 11, 13),
+ array("<?php\nfoo bar baz", 10, 12, 5, 7),
+ array("<?php foo\nbar baz", 10, 12, 1, 3),
+ array("<?php foo bar\nbaz", 10, 12, 11, 13),
+ array("<?php\r\nfoo bar baz", 11, 13, 5, 7),
+ // Error at "baz"
+ array("<?php foo bar baz", 14, 16, 15, 17),
+ array("<?php foo bar\nbaz", 14, 16, 1, 3),
+ // Error at string literal
+ array("<?php foo 'bar\nbaz' xyz", 10, 18, 11, 4),
+ array("<?php\nfoo 'bar\nbaz' xyz", 10, 18, 5, 4),
+ array("<?php foo\n'\nbarbaz\n'\nxyz", 10, 19, 1, 1),
+ // Error over full string
+ array("<?php", 0, 4, 1, 5),
+ array("<?\nphp", 0, 5, 1, 3),
+ );
+ }
+
+ public function testNoColumnInfo() {
+ $error = new Error('Some error', 3);
+
+ $this->assertSame(false, $error->hasColumnInfo());
+ try {
+ $error->getStartColumn('');
+ $this->fail('Expected RuntimeException');
+ } catch (\RuntimeException $e) {
+ $this->assertSame('Error does not have column information', $e->getMessage());
+ }
+ try {
+ $error->getEndColumn('');
+ $this->fail('Expected RuntimeException');
+ } catch (\RuntimeException $e) {
+ $this->assertSame('Error does not have column information', $e->getMessage());
+ }
+ }
+
+ /**
+ * @expectedException \RuntimeException
+ * @expectedExceptionMessage Invalid position information
+ */
+ public function testInvalidPosInfo() {
+ $error = new Error('Some error', array(
+ 'startFilePos' => 10,
+ 'endFilePos' => 11,
+ ));
+ $error->getStartColumn('code');
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php b/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php
new file mode 100644
index 0000000..f1fe618
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Lexer/EmulativeTest.php
@@ -0,0 +1,133 @@
+<?php
+
+namespace PhpParser\Lexer;
+
+use PhpParser\LexerTest;
+use PhpParser\Parser\Tokens;
+
+require_once __DIR__ . '/../LexerTest.php';
+
+class EmulativeTest extends LexerTest
+{
+ protected function getLexer(array $options = array()) {
+ return new Emulative($options);
+ }
+
+ /**
+ * @dataProvider provideTestReplaceKeywords
+ */
+ public function testReplaceKeywords($keyword, $expectedToken) {
+ $lexer = $this->getLexer();
+ $lexer->startLexing('<?php ' . $keyword);
+
+ $this->assertSame($expectedToken, $lexer->getNextToken());
+ $this->assertSame(0, $lexer->getNextToken());
+ }
+
+ /**
+ * @dataProvider provideTestReplaceKeywords
+ */
+ public function testNoReplaceKeywordsAfterObjectOperator($keyword) {
+ $lexer = $this->getLexer();
+ $lexer->startLexing('<?php ->' . $keyword);
+
+ $this->assertSame(Tokens::T_OBJECT_OPERATOR, $lexer->getNextToken());
+ $this->assertSame(Tokens::T_STRING, $lexer->getNextToken());
+ $this->assertSame(0, $lexer->getNextToken());
+ }
+
+ public function provideTestReplaceKeywords() {
+ return array(
+ // PHP 5.5
+ array('finally', Tokens::T_FINALLY),
+ array('yield', Tokens::T_YIELD),
+
+ // PHP 5.4
+ array('callable', Tokens::T_CALLABLE),
+ array('insteadof', Tokens::T_INSTEADOF),
+ array('trait', Tokens::T_TRAIT),
+ array('__TRAIT__', Tokens::T_TRAIT_C),
+
+ // PHP 5.3
+ array('__DIR__', Tokens::T_DIR),
+ array('goto', Tokens::T_GOTO),
+ array('namespace', Tokens::T_NAMESPACE),
+ array('__NAMESPACE__', Tokens::T_NS_C),
+ );
+ }
+
+ /**
+ * @dataProvider provideTestLexNewFeatures
+ */
+ public function testLexNewFeatures($code, array $expectedTokens) {
+ $lexer = $this->getLexer();
+ $lexer->startLexing('<?php ' . $code);
+
+ foreach ($expectedTokens as $expectedToken) {
+ list($expectedTokenType, $expectedTokenText) = $expectedToken;
+ $this->assertSame($expectedTokenType, $lexer->getNextToken($text));
+ $this->assertSame($expectedTokenText, $text);
+ }
+ $this->assertSame(0, $lexer->getNextToken());
+ }
+
+ /**
+ * @dataProvider provideTestLexNewFeatures
+ */
+ public function testLeaveStuffAloneInStrings($code) {
+ $stringifiedToken = '"' . addcslashes($code, '"\\') . '"';
+
+ $lexer = $this->getLexer();
+ $lexer->startLexing('<?php ' . $stringifiedToken);
+
+ $this->assertSame(Tokens::T_CONSTANT_ENCAPSED_STRING, $lexer->getNextToken($text));
+ $this->assertSame($stringifiedToken, $text);
+ $this->assertSame(0, $lexer->getNextToken());
+ }
+
+ public function provideTestLexNewFeatures() {
+ return array(
+ array('yield from', array(
+ array(Tokens::T_YIELD_FROM, 'yield from'),
+ )),
+ array("yield\r\nfrom", array(
+ array(Tokens::T_YIELD_FROM, "yield\r\nfrom"),
+ )),
+ array('...', array(
+ array(Tokens::T_ELLIPSIS, '...'),
+ )),
+ array('**', array(
+ array(Tokens::T_POW, '**'),
+ )),
+ array('**=', array(
+ array(Tokens::T_POW_EQUAL, '**='),
+ )),
+ array('??', array(
+ array(Tokens::T_COALESCE, '??'),
+ )),
+ array('<=>', array(
+ array(Tokens::T_SPACESHIP, '<=>'),
+ )),
+ array('0b1010110', array(
+ array(Tokens::T_LNUMBER, '0b1010110'),
+ )),
+ array('0b1011010101001010110101010010101011010101010101101011001110111100', array(
+ array(Tokens::T_DNUMBER, '0b1011010101001010110101010010101011010101010101101011001110111100'),
+ )),
+ array('\\', array(
+ array(Tokens::T_NS_SEPARATOR, '\\'),
+ )),
+ array("<<<'NOWDOC'\nNOWDOC;\n", array(
+ array(Tokens::T_START_HEREDOC, "<<<'NOWDOC'\n"),
+ array(Tokens::T_END_HEREDOC, 'NOWDOC'),
+ array(ord(';'), ';'),
+ )),
+ array("<<<'NOWDOC'\nFoobar\nNOWDOC;\n", array(
+ array(Tokens::T_START_HEREDOC, "<<<'NOWDOC'\n"),
+ array(Tokens::T_ENCAPSED_AND_WHITESPACE, "Foobar\n"),
+ array(Tokens::T_END_HEREDOC, 'NOWDOC'),
+ array(ord(';'), ';'),
+ )),
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/LexerTest.php b/vendor/nikic/php-parser/test/PhpParser/LexerTest.php
new file mode 100644
index 0000000..d2f570e
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/LexerTest.php
@@ -0,0 +1,259 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Parser\Tokens;
+
+class LexerTest extends \PHPUnit_Framework_TestCase
+{
+ /* To allow overwriting in parent class */
+ protected function getLexer(array $options = array()) {
+ return new Lexer($options);
+ }
+
+ /**
+ * @dataProvider provideTestError
+ */
+ public function testError($code, $messages) {
+ if (defined('HHVM_VERSION')) {
+ $this->markTestSkipped('HHVM does not throw warnings from token_get_all()');
+ }
+
+ $errorHandler = new ErrorHandler\Collecting();
+ $lexer = $this->getLexer(['usedAttributes' => [
+ 'comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos'
+ ]]);
+ $lexer->startLexing($code, $errorHandler);
+ $errors = $errorHandler->getErrors();
+
+ $this->assertSame(count($messages), count($errors));
+ for ($i = 0; $i < count($messages); $i++) {
+ $this->assertSame($messages[$i], $errors[$i]->getMessageWithColumnInfo($code));
+ }
+ }
+
+ public function provideTestError() {
+ return array(
+ array("<?php /*", array("Unterminated comment from 1:7 to 1:9")),
+ array("<?php \1", array("Unexpected character \"\1\" (ASCII 1) from 1:7 to 1:7")),
+ array("<?php \0", array("Unexpected null byte from 1:7 to 1:7")),
+ // Error with potentially emulated token
+ array("<?php ?? \0", array("Unexpected null byte from 1:10 to 1:10")),
+ array("<?php\n\0\1 foo /* bar", array(
+ "Unexpected null byte from 2:1 to 2:1",
+ "Unexpected character \"\1\" (ASCII 1) from 2:2 to 2:2",
+ "Unterminated comment from 2:8 to 2:14"
+ )),
+ );
+ }
+
+ /**
+ * @dataProvider provideTestLex
+ */
+ public function testLex($code, $options, $tokens) {
+ $lexer = $this->getLexer($options);
+ $lexer->startLexing($code);
+ while ($id = $lexer->getNextToken($value, $startAttributes, $endAttributes)) {
+ $token = array_shift($tokens);
+
+ $this->assertSame($token[0], $id);
+ $this->assertSame($token[1], $value);
+ $this->assertEquals($token[2], $startAttributes);
+ $this->assertEquals($token[3], $endAttributes);
+ }
+ }
+
+ public function provideTestLex() {
+ return array(
+ // tests conversion of closing PHP tag and drop of whitespace and opening tags
+ array(
+ '<?php tokens ?>plaintext',
+ array(),
+ array(
+ array(
+ Tokens::T_STRING, 'tokens',
+ array('startLine' => 1), array('endLine' => 1)
+ ),
+ array(
+ ord(';'), '?>',
+ array('startLine' => 1), array('endLine' => 1)
+ ),
+ array(
+ Tokens::T_INLINE_HTML, 'plaintext',
+ array('startLine' => 1, 'hasLeadingNewline' => false),
+ array('endLine' => 1)
+ ),
+ )
+ ),
+ // tests line numbers
+ array(
+ '<?php' . "\n" . '$ token /** doc' . "\n" . 'comment */ $',
+ array(),
+ array(
+ array(
+ ord('$'), '$',
+ array('startLine' => 2), array('endLine' => 2)
+ ),
+ array(
+ Tokens::T_STRING, 'token',
+ array('startLine' => 2), array('endLine' => 2)
+ ),
+ array(
+ ord('$'), '$',
+ array(
+ 'startLine' => 3,
+ 'comments' => array(
+ new Comment\Doc('/** doc' . "\n" . 'comment */', 2, 14),
+ )
+ ),
+ array('endLine' => 3)
+ ),
+ )
+ ),
+ // tests comment extraction
+ array(
+ '<?php /* comment */ // comment' . "\n" . '/** docComment 1 *//** docComment 2 */ token',
+ array(),
+ array(
+ array(
+ Tokens::T_STRING, 'token',
+ array(
+ 'startLine' => 2,
+ 'comments' => array(
+ new Comment('/* comment */', 1, 6),
+ new Comment('// comment' . "\n", 1, 20),
+ new Comment\Doc('/** docComment 1 */', 2, 31),
+ new Comment\Doc('/** docComment 2 */', 2, 50),
+ ),
+ ),
+ array('endLine' => 2)
+ ),
+ )
+ ),
+ // tests differing start and end line
+ array(
+ '<?php "foo' . "\n" . 'bar"',
+ array(),
+ array(
+ array(
+ Tokens::T_CONSTANT_ENCAPSED_STRING, '"foo' . "\n" . 'bar"',
+ array('startLine' => 1), array('endLine' => 2)
+ ),
+ )
+ ),
+ // tests exact file offsets
+ array(
+ '<?php "a";' . "\n" . '// foo' . "\n" . '"b";',
+ array('usedAttributes' => array('startFilePos', 'endFilePos')),
+ array(
+ array(
+ Tokens::T_CONSTANT_ENCAPSED_STRING, '"a"',
+ array('startFilePos' => 6), array('endFilePos' => 8)
+ ),
+ array(
+ ord(';'), ';',
+ array('startFilePos' => 9), array('endFilePos' => 9)
+ ),
+ array(
+ Tokens::T_CONSTANT_ENCAPSED_STRING, '"b"',
+ array('startFilePos' => 18), array('endFilePos' => 20)
+ ),
+ array(
+ ord(';'), ';',
+ array('startFilePos' => 21), array('endFilePos' => 21)
+ ),
+ )
+ ),
+ // tests token offsets
+ array(
+ '<?php "a";' . "\n" . '// foo' . "\n" . '"b";',
+ array('usedAttributes' => array('startTokenPos', 'endTokenPos')),
+ array(
+ array(
+ Tokens::T_CONSTANT_ENCAPSED_STRING, '"a"',
+ array('startTokenPos' => 1), array('endTokenPos' => 1)
+ ),
+ array(
+ ord(';'), ';',
+ array('startTokenPos' => 2), array('endTokenPos' => 2)
+ ),
+ array(
+ Tokens::T_CONSTANT_ENCAPSED_STRING, '"b"',
+ array('startTokenPos' => 5), array('endTokenPos' => 5)
+ ),
+ array(
+ ord(';'), ';',
+ array('startTokenPos' => 6), array('endTokenPos' => 6)
+ ),
+ )
+ ),
+ // tests all attributes being disabled
+ array(
+ '<?php /* foo */ $bar;',
+ array('usedAttributes' => array()),
+ array(
+ array(
+ Tokens::T_VARIABLE, '$bar',
+ array(), array()
+ ),
+ array(
+ ord(';'), ';',
+ array(), array()
+ )
+ )
+ )
+ );
+ }
+
+ /**
+ * @dataProvider provideTestHaltCompiler
+ */
+ public function testHandleHaltCompiler($code, $remaining) {
+ $lexer = $this->getLexer();
+ $lexer->startLexing($code);
+
+ while (Tokens::T_HALT_COMPILER !== $lexer->getNextToken());
+
+ $this->assertSame($remaining, $lexer->handleHaltCompiler());
+ $this->assertSame(0, $lexer->getNextToken());
+ }
+
+ public function provideTestHaltCompiler() {
+ return array(
+ array('<?php ... __halt_compiler();Remaining Text', 'Remaining Text'),
+ array('<?php ... __halt_compiler ( ) ;Remaining Text', 'Remaining Text'),
+ array('<?php ... __halt_compiler() ?>Remaining Text', 'Remaining Text'),
+ //array('<?php ... __halt_compiler();' . "\0", "\0"),
+ //array('<?php ... __halt_compiler /* */ ( ) ;Remaining Text', 'Remaining Text'),
+ );
+ }
+
+ /**
+ * @expectedException \PhpParser\Error
+ * @expectedExceptionMessage __HALT_COMPILER must be followed by "();"
+ */
+ public function testHandleHaltCompilerError() {
+ $lexer = $this->getLexer();
+ $lexer->startLexing('<?php ... __halt_compiler invalid ();');
+
+ while (Tokens::T_HALT_COMPILER !== $lexer->getNextToken());
+ $lexer->handleHaltCompiler();
+ }
+
+ public function testGetTokens() {
+ $code = '<?php "a";' . "\n" . '// foo' . "\n" . '"b";';
+ $expectedTokens = array(
+ array(T_OPEN_TAG, '<?php ', 1),
+ array(T_CONSTANT_ENCAPSED_STRING, '"a"', 1),
+ ';',
+ array(T_WHITESPACE, "\n", 1),
+ array(T_COMMENT, '// foo' . "\n", 2),
+ array(T_CONSTANT_ENCAPSED_STRING, '"b"', 3),
+ ';',
+ );
+
+ $lexer = $this->getLexer();
+ $lexer->startLexing($code);
+ $this->assertSame($expectedTokens, $lexer->getTokens());
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php
new file mode 100644
index 0000000..76a89c3
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Node/NameTest.php
@@ -0,0 +1,134 @@
+<?php
+
+namespace PhpParser\Node;
+
+class NameTest extends \PHPUnit_Framework_TestCase
+{
+ public function testConstruct() {
+ $name = new Name(array('foo', 'bar'));
+ $this->assertSame(array('foo', 'bar'), $name->parts);
+
+ $name = new Name('foo\bar');
+ $this->assertSame(array('foo', 'bar'), $name->parts);
+
+ $name = new Name($name);
+ $this->assertSame(array('foo', 'bar'), $name->parts);
+ }
+
+ public function testGet() {
+ $name = new Name('foo');
+ $this->assertSame('foo', $name->getFirst());
+ $this->assertSame('foo', $name->getLast());
+
+ $name = new Name('foo\bar');
+ $this->assertSame('foo', $name->getFirst());
+ $this->assertSame('bar', $name->getLast());
+ }
+
+ public function testToString() {
+ $name = new Name('foo\bar');
+
+ $this->assertSame('foo\bar', (string) $name);
+ $this->assertSame('foo\bar', $name->toString());
+ }
+
+ public function testSlice() {
+ $name = new Name('foo\bar\baz');
+ $this->assertEquals(new Name('foo\bar\baz'), $name->slice(0));
+ $this->assertEquals(new Name('bar\baz'), $name->slice(1));
+ $this->assertNull($name->slice(3));
+ $this->assertEquals(new Name('foo\bar\baz'), $name->slice(-3));
+ $this->assertEquals(new Name('bar\baz'), $name->slice(-2));
+ $this->assertEquals(new Name('foo\bar'), $name->slice(0, -1));
+ $this->assertNull($name->slice(0, -3));
+ $this->assertEquals(new Name('bar'), $name->slice(1, -1));
+ $this->assertNull($name->slice(1, -2));
+ $this->assertEquals(new Name('bar'), $name->slice(-2, 1));
+ $this->assertEquals(new Name('bar'), $name->slice(-2, -1));
+ $this->assertNull($name->slice(-2, -2));
+ }
+
+ /**
+ * @expectedException \OutOfBoundsException
+ * @expectedExceptionMessage Offset 4 is out of bounds
+ */
+ public function testSliceOffsetTooLarge() {
+ (new Name('foo\bar\baz'))->slice(4);
+ }
+
+ /**
+ * @expectedException \OutOfBoundsException
+ * @expectedExceptionMessage Offset -4 is out of bounds
+ */
+ public function testSliceOffsetTooSmall() {
+ (new Name('foo\bar\baz'))->slice(-4);
+ }
+
+ /**
+ * @expectedException \OutOfBoundsException
+ * @expectedExceptionMessage Length 4 is out of bounds
+ */
+ public function testSliceLengthTooLarge() {
+ (new Name('foo\bar\baz'))->slice(0, 4);
+ }
+
+ /**
+ * @expectedException \OutOfBoundsException
+ * @expectedExceptionMessage Length -4 is out of bounds
+ */
+ public function testSliceLengthTooSmall() {
+ (new Name('foo\bar\baz'))->slice(0, -4);
+ }
+
+ public function testConcat() {
+ $this->assertEquals(new Name('foo\bar\baz'), Name::concat('foo', 'bar\baz'));
+ $this->assertEquals(
+ new Name\FullyQualified('foo\bar'),
+ Name\FullyQualified::concat(['foo'], new Name('bar'))
+ );
+
+ $attributes = ['foo' => 'bar'];
+ $this->assertEquals(
+ new Name\Relative('foo\bar\baz', $attributes),
+ Name\Relative::concat(new Name\FullyQualified('foo\bar'), 'baz', $attributes)
+ );
+
+ $this->assertEquals(new Name('foo'), Name::concat(null, 'foo'));
+ $this->assertEquals(new Name('foo'), Name::concat('foo', null));
+ $this->assertNull(Name::concat(null, null));
+ }
+
+ public function testIs() {
+ $name = new Name('foo');
+ $this->assertTrue ($name->isUnqualified());
+ $this->assertFalse($name->isQualified());
+ $this->assertFalse($name->isFullyQualified());
+ $this->assertFalse($name->isRelative());
+
+ $name = new Name('foo\bar');
+ $this->assertFalse($name->isUnqualified());
+ $this->assertTrue ($name->isQualified());
+ $this->assertFalse($name->isFullyQualified());
+ $this->assertFalse($name->isRelative());
+
+ $name = new Name\FullyQualified('foo');
+ $this->assertFalse($name->isUnqualified());
+ $this->assertFalse($name->isQualified());
+ $this->assertTrue ($name->isFullyQualified());
+ $this->assertFalse($name->isRelative());
+
+ $name = new Name\Relative('foo');
+ $this->assertFalse($name->isUnqualified());
+ $this->assertFalse($name->isQualified());
+ $this->assertFalse($name->isFullyQualified());
+ $this->assertTrue ($name->isRelative());
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ * @expectedExceptionMessage Expected string, array of parts or Name instance
+ */
+ public function testInvalidArg() {
+ Name::concat('foo', new \stdClass);
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php
new file mode 100644
index 0000000..3141f56
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/MagicConstTest.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace PhpParser\Node\Scalar;
+
+class MagicConstTest extends \PHPUnit_Framework_TestCase {
+ /**
+ * @dataProvider provideTestGetName
+ */
+ public function testGetName(MagicConst $magicConst, $name) {
+ $this->assertSame($name, $magicConst->getName());
+ }
+
+ public function provideTestGetName() {
+ return array(
+ array(new MagicConst\Class_, '__CLASS__'),
+ array(new MagicConst\Dir, '__DIR__'),
+ array(new MagicConst\File, '__FILE__'),
+ array(new MagicConst\Function_, '__FUNCTION__'),
+ array(new MagicConst\Line, '__LINE__'),
+ array(new MagicConst\Method, '__METHOD__'),
+ array(new MagicConst\Namespace_, '__NAMESPACE__'),
+ array(new MagicConst\Trait_, '__TRAIT__'),
+ );
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php
new file mode 100644
index 0000000..be39035
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Node/Scalar/StringTest.php
@@ -0,0 +1,61 @@
+<?php
+
+namespace PhpParser\Node\Scalar;
+
+class StringTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @dataProvider provideTestParseEscapeSequences
+ */
+ public function testParseEscapeSequences($expected, $string, $quote) {
+ $this->assertSame(
+ $expected,
+ String_::parseEscapeSequences($string, $quote)
+ );
+ }
+
+ /**
+ * @dataProvider provideTestParse
+ */
+ public function testCreate($expected, $string) {
+ $this->assertSame(
+ $expected,
+ String_::parse($string)
+ );
+ }
+
+ public function provideTestParseEscapeSequences() {
+ return array(
+ array('"', '\\"', '"'),
+ array('\\"', '\\"', '`'),
+ array('\\"\\`', '\\"\\`', null),
+ array("\\\$\n\r\t\f\v", '\\\\\$\n\r\t\f\v', null),
+ array("\x1B", '\e', null),
+ array(chr(255), '\xFF', null),
+ array(chr(255), '\377', null),
+ array(chr(0), '\400', null),
+ array("\0", '\0', null),
+ array('\xFF', '\\\\xFF', null),
+ );
+ }
+
+ public function provideTestParse() {
+ $tests = array(
+ array('A', '\'A\''),
+ array('A', 'b\'A\''),
+ array('A', '"A"'),
+ array('A', 'b"A"'),
+ array('\\', '\'\\\\\''),
+ array('\'', '\'\\\'\''),
+ );
+
+ foreach ($this->provideTestParseEscapeSequences() as $i => $test) {
+ // skip second and third tests, they aren't for double quotes
+ if ($i != 1 && $i != 2) {
+ $tests[] = array($test[0], '"' . $test[1] . '"');
+ }
+ }
+
+ return $tests;
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php
new file mode 100644
index 0000000..610972c
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassConstTest.php
@@ -0,0 +1,35 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+class ClassConstTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @dataProvider provideModifiers
+ */
+ public function testModifiers($modifier) {
+ $node = new ClassConst(
+ array(), // invalid
+ constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier))
+ );
+
+ $this->assertTrue($node->{'is' . $modifier}());
+ }
+
+ public function testNoModifiers() {
+ $node = new ClassConst(array(), 0);
+
+ $this->assertTrue($node->isPublic());
+ $this->assertFalse($node->isProtected());
+ $this->assertFalse($node->isPrivate());
+ $this->assertFalse($node->isStatic());
+ }
+
+ public function provideModifiers() {
+ return array(
+ array('public'),
+ array('protected'),
+ array('private'),
+ );
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php
new file mode 100644
index 0000000..fa8aed8
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassMethodTest.php
@@ -0,0 +1,63 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+class ClassMethodTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @dataProvider provideModifiers
+ */
+ public function testModifiers($modifier) {
+ $node = new ClassMethod('foo', array(
+ 'type' => constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier))
+ ));
+
+ $this->assertTrue($node->{'is' . $modifier}());
+ }
+
+ public function testNoModifiers() {
+ $node = new ClassMethod('foo', array('type' => 0));
+
+ $this->assertTrue($node->isPublic());
+ $this->assertFalse($node->isProtected());
+ $this->assertFalse($node->isPrivate());
+ $this->assertFalse($node->isAbstract());
+ $this->assertFalse($node->isFinal());
+ $this->assertFalse($node->isStatic());
+ }
+
+ public function provideModifiers() {
+ return array(
+ array('public'),
+ array('protected'),
+ array('private'),
+ array('abstract'),
+ array('final'),
+ array('static'),
+ );
+ }
+
+ /**
+ * Checks that implicit public modifier detection for method is working
+ *
+ * @dataProvider implicitPublicModifiers
+ *
+ * @param integer $modifier Node type modifier
+ */
+ public function testImplicitPublic($modifier)
+ {
+ $node = new ClassMethod('foo', array(
+ 'type' => constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier))
+ ));
+
+ $this->assertTrue($node->isPublic(), 'Node should be implicitly public');
+ }
+
+ public function implicitPublicModifiers() {
+ return array(
+ array('abstract'),
+ array('final'),
+ array('static'),
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php
new file mode 100644
index 0000000..75d49e3
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/ClassTest.php
@@ -0,0 +1,66 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+class ClassTest extends \PHPUnit_Framework_TestCase
+{
+ public function testIsAbstract() {
+ $class = new Class_('Foo', array('type' => Class_::MODIFIER_ABSTRACT));
+ $this->assertTrue($class->isAbstract());
+
+ $class = new Class_('Foo');
+ $this->assertFalse($class->isAbstract());
+ }
+
+ public function testIsFinal() {
+ $class = new Class_('Foo', array('type' => Class_::MODIFIER_FINAL));
+ $this->assertTrue($class->isFinal());
+
+ $class = new Class_('Foo');
+ $this->assertFalse($class->isFinal());
+ }
+
+ public function testGetMethods() {
+ $methods = array(
+ new ClassMethod('foo'),
+ new ClassMethod('bar'),
+ new ClassMethod('fooBar'),
+ );
+ $class = new Class_('Foo', array(
+ 'stmts' => array(
+ new TraitUse(array()),
+ $methods[0],
+ new ClassConst(array()),
+ $methods[1],
+ new Property(0, array()),
+ $methods[2],
+ )
+ ));
+
+ $this->assertSame($methods, $class->getMethods());
+ }
+
+ public function testGetMethod() {
+ $methodConstruct = new ClassMethod('__CONSTRUCT');
+ $methodTest = new ClassMethod('test');
+ $class = new Class_('Foo', array(
+ 'stmts' => array(
+ new ClassConst(array()),
+ $methodConstruct,
+ new Property(0, array()),
+ $methodTest,
+ )
+ ));
+
+ $this->assertSame($methodConstruct, $class->getMethod('__construct'));
+ $this->assertSame($methodTest, $class->getMethod('test'));
+ $this->assertNull($class->getMethod('nonExisting'));
+ }
+
+ public function testDeprecatedTypeNode() {
+ $class = new Class_('Foo', array('type' => Class_::MODIFIER_ABSTRACT));
+ $this->assertTrue($class->isAbstract());
+ $this->assertSame(Class_::MODIFIER_ABSTRACT, $class->flags);
+ $this->assertSame(Class_::MODIFIER_ABSTRACT, $class->type);
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php
new file mode 100644
index 0000000..c499058
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/InterfaceTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class InterfaceTest extends \PHPUnit_Framework_TestCase
+{
+ public function testGetMethods() {
+ $methods = array(
+ new ClassMethod('foo'),
+ new ClassMethod('bar'),
+ );
+ $interface = new Class_('Foo', array(
+ 'stmts' => array(
+ new Node\Stmt\ClassConst(array(new Node\Const_('C1', new Node\Scalar\String_('C1')))),
+ $methods[0],
+ new Node\Stmt\ClassConst(array(new Node\Const_('C2', new Node\Scalar\String_('C2')))),
+ $methods[1],
+ new Node\Stmt\ClassConst(array(new Node\Const_('C3', new Node\Scalar\String_('C3')))),
+ )
+ ));
+
+ $this->assertSame($methods, $interface->getMethods());
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php
new file mode 100644
index 0000000..bcfc0c6
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Node/Stmt/PropertyTest.php
@@ -0,0 +1,44 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+class PropertyTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @dataProvider provideModifiers
+ */
+ public function testModifiers($modifier) {
+ $node = new Property(
+ constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier)),
+ array() // invalid
+ );
+
+ $this->assertTrue($node->{'is' . $modifier}());
+ }
+
+ public function testNoModifiers() {
+ $node = new Property(0, array());
+
+ $this->assertTrue($node->isPublic());
+ $this->assertFalse($node->isProtected());
+ $this->assertFalse($node->isPrivate());
+ $this->assertFalse($node->isStatic());
+ }
+
+ public function testStaticImplicitlyPublic() {
+ $node = new Property(Class_::MODIFIER_STATIC, array());
+ $this->assertTrue($node->isPublic());
+ $this->assertFalse($node->isProtected());
+ $this->assertFalse($node->isPrivate());
+ $this->assertTrue($node->isStatic());
+ }
+
+ public function provideModifiers() {
+ return array(
+ array('public'),
+ array('protected'),
+ array('private'),
+ array('static'),
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php
new file mode 100644
index 0000000..7fd0a39
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/NodeAbstractTest.php
@@ -0,0 +1,274 @@
+<?php
+
+namespace PhpParser;
+
+class DummyNode extends NodeAbstract {
+ public $subNode1;
+ public $subNode2;
+
+ public function __construct($subNode1, $subNode2, $attributes) {
+ parent::__construct($attributes);
+ $this->subNode1 = $subNode1;
+ $this->subNode2 = $subNode2;
+ }
+
+ public function getSubNodeNames() {
+ return array('subNode1', 'subNode2');
+ }
+
+ // This method is only overwritten because the node is located in an unusual namespace
+ public function getType() {
+ return 'Dummy';
+ }
+}
+
+class NodeAbstractTest extends \PHPUnit_Framework_TestCase
+{
+ public function provideNodes() {
+ $attributes = array(
+ 'startLine' => 10,
+ 'comments' => array(
+ new Comment('// Comment' . "\n"),
+ new Comment\Doc('/** doc comment */'),
+ ),
+ );
+
+ $node = new DummyNode('value1', 'value2', $attributes);
+ $node->notSubNode = 'value3';
+
+ return array(
+ array($attributes, $node),
+ );
+ }
+
+ /**
+ * @dataProvider provideNodes
+ */
+ public function testConstruct(array $attributes, Node $node) {
+ $this->assertSame('Dummy', $node->getType());
+ $this->assertSame(array('subNode1', 'subNode2'), $node->getSubNodeNames());
+ $this->assertSame(10, $node->getLine());
+ $this->assertSame('/** doc comment */', $node->getDocComment()->getText());
+ $this->assertSame('value1', $node->subNode1);
+ $this->assertSame('value2', $node->subNode2);
+ $this->assertTrue(isset($node->subNode1));
+ $this->assertTrue(isset($node->subNode2));
+ $this->assertFalse(isset($node->subNode3));
+ $this->assertSame($attributes, $node->getAttributes());
+
+ return $node;
+ }
+
+ /**
+ * @dataProvider provideNodes
+ */
+ public function testGetDocComment(array $attributes, Node $node) {
+ $this->assertSame('/** doc comment */', $node->getDocComment()->getText());
+ array_pop($node->getAttribute('comments')); // remove doc comment
+ $this->assertNull($node->getDocComment());
+ array_pop($node->getAttribute('comments')); // remove comment
+ $this->assertNull($node->getDocComment());
+ }
+
+ public function testSetDocComment() {
+ $node = new DummyNode(null, null, []);
+
+ // Add doc comment to node without comments
+ $docComment = new Comment\Doc('/** doc */');
+ $node->setDocComment($docComment);
+ $this->assertSame($docComment, $node->getDocComment());
+
+ // Replace it
+ $docComment = new Comment\Doc('/** doc 2 */');
+ $node->setDocComment($docComment);
+ $this->assertSame($docComment, $node->getDocComment());
+
+ // Add docmment to node with other comments
+ $c1 = new Comment('/* foo */');
+ $c2 = new Comment('/* bar */');
+ $docComment = new Comment\Doc('/** baz */');
+ $node->setAttribute('comments', [$c1, $c2]);
+ $node->setDocComment($docComment);
+ $this->assertSame([$c1, $c2, $docComment], $node->getAttribute('comments'));
+ }
+
+ /**
+ * @dataProvider provideNodes
+ */
+ public function testChange(array $attributes, Node $node) {
+ // change of line
+ $node->setLine(15);
+ $this->assertSame(15, $node->getLine());
+
+ // direct modification
+ $node->subNode = 'newValue';
+ $this->assertSame('newValue', $node->subNode);
+
+ // indirect modification
+ $subNode =& $node->subNode;
+ $subNode = 'newNewValue';
+ $this->assertSame('newNewValue', $node->subNode);
+
+ // removal
+ unset($node->subNode);
+ $this->assertFalse(isset($node->subNode));
+ }
+
+ /**
+ * @dataProvider provideNodes
+ */
+ public function testIteration(array $attributes, Node $node) {
+ // Iteration is simple object iteration over properties,
+ // not over subnodes
+ $i = 0;
+ foreach ($node as $key => $value) {
+ if ($i === 0) {
+ $this->assertSame('subNode1', $key);
+ $this->assertSame('value1', $value);
+ } else if ($i === 1) {
+ $this->assertSame('subNode2', $key);
+ $this->assertSame('value2', $value);
+ } else if ($i === 2) {
+ $this->assertSame('notSubNode', $key);
+ $this->assertSame('value3', $value);
+ } else {
+ throw new \Exception;
+ }
+ $i++;
+ }
+ $this->assertSame(3, $i);
+ }
+
+ public function testAttributes() {
+ /** @var $node Node */
+ $node = $this->getMockForAbstractClass('PhpParser\NodeAbstract');
+
+ $this->assertEmpty($node->getAttributes());
+
+ $node->setAttribute('key', 'value');
+ $this->assertTrue($node->hasAttribute('key'));
+ $this->assertSame('value', $node->getAttribute('key'));
+
+ $this->assertFalse($node->hasAttribute('doesNotExist'));
+ $this->assertNull($node->getAttribute('doesNotExist'));
+ $this->assertSame('default', $node->getAttribute('doesNotExist', 'default'));
+
+ $node->setAttribute('null', null);
+ $this->assertTrue($node->hasAttribute('null'));
+ $this->assertNull($node->getAttribute('null'));
+ $this->assertNull($node->getAttribute('null', 'default'));
+
+ $this->assertSame(
+ array(
+ 'key' => 'value',
+ 'null' => null,
+ ),
+ $node->getAttributes()
+ );
+ }
+
+ public function testJsonSerialization() {
+ $code = <<<'PHP'
+<?php
+// comment
+/** doc comment */
+function functionName(&$a = 0, $b = 1.0) {
+ echo 'Foo';
+}
+PHP;
+ $expected = <<<'JSON'
+[
+ {
+ "nodeType": "Stmt_Function",
+ "byRef": false,
+ "name": "functionName",
+ "params": [
+ {
+ "nodeType": "Param",
+ "type": null,
+ "byRef": true,
+ "variadic": false,
+ "name": "a",
+ "default": {
+ "nodeType": "Scalar_LNumber",
+ "value": 0,
+ "attributes": {
+ "startLine": 4,
+ "endLine": 4,
+ "kind": 10
+ }
+ },
+ "attributes": {
+ "startLine": 4,
+ "endLine": 4
+ }
+ },
+ {
+ "nodeType": "Param",
+ "type": null,
+ "byRef": false,
+ "variadic": false,
+ "name": "b",
+ "default": {
+ "nodeType": "Scalar_DNumber",
+ "value": 1,
+ "attributes": {
+ "startLine": 4,
+ "endLine": 4
+ }
+ },
+ "attributes": {
+ "startLine": 4,
+ "endLine": 4
+ }
+ }
+ ],
+ "returnType": null,
+ "stmts": [
+ {
+ "nodeType": "Stmt_Echo",
+ "exprs": [
+ {
+ "nodeType": "Scalar_String",
+ "value": "Foo",
+ "attributes": {
+ "startLine": 5,
+ "endLine": 5,
+ "kind": 1
+ }
+ }
+ ],
+ "attributes": {
+ "startLine": 5,
+ "endLine": 5
+ }
+ }
+ ],
+ "attributes": {
+ "startLine": 4,
+ "comments": [
+ {
+ "nodeType": "Comment",
+ "text": "\/\/ comment\n",
+ "line": 2,
+ "filePos": 6
+ },
+ {
+ "nodeType": "Comment_Doc",
+ "text": "\/** doc comment *\/",
+ "line": 3,
+ "filePos": 17
+ }
+ ],
+ "endLine": 6
+ }
+ }
+]
+JSON;
+
+ $parser = new Parser\Php7(new Lexer());
+ $stmts = $parser->parse(canonicalize($code));
+ $json = json_encode($stmts, JSON_PRETTY_PRINT);
+ $this->assertEquals(canonicalize($expected), canonicalize($json));
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php
new file mode 100644
index 0000000..9bb65a7
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php
@@ -0,0 +1,105 @@
+<?php
+
+namespace PhpParser;
+
+class NodeDumperTest extends \PHPUnit_Framework_TestCase
+{
+ private function canonicalize($string) {
+ return str_replace("\r\n", "\n", $string);
+ }
+
+ /**
+ * @dataProvider provideTestDump
+ */
+ public function testDump($node, $dump) {
+ $dumper = new NodeDumper;
+
+ $this->assertSame($this->canonicalize($dump), $this->canonicalize($dumper->dump($node)));
+ }
+
+ public function provideTestDump() {
+ return array(
+ array(
+ array(),
+'array(
+)'
+ ),
+ array(
+ array('Foo', 'Bar', 'Key' => 'FooBar'),
+'array(
+ 0: Foo
+ 1: Bar
+ Key: FooBar
+)'
+ ),
+ array(
+ new Node\Name(array('Hallo', 'World')),
+'Name(
+ parts: array(
+ 0: Hallo
+ 1: World
+ )
+)'
+ ),
+ array(
+ new Node\Expr\Array_(array(
+ new Node\Expr\ArrayItem(new Node\Scalar\String_('Foo'))
+ )),
+'Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: Foo
+ )
+ byRef: false
+ )
+ )
+)'
+ ),
+ );
+ }
+
+ public function testDumpWithPositions() {
+ $parser = (new ParserFactory)->create(
+ ParserFactory::ONLY_PHP7,
+ new Lexer(['usedAttributes' => ['startLine', 'endLine', 'startFilePos', 'endFilePos']])
+ );
+ $dumper = new NodeDumper(['dumpPositions' => true]);
+
+ $code = "<?php\n\$a = 1;\necho \$a;";
+ $expected = <<<'OUT'
+array(
+ 0: Expr_Assign[2:1 - 2:6](
+ var: Expr_Variable[2:1 - 2:2](
+ name: a
+ )
+ expr: Scalar_LNumber[2:6 - 2:6](
+ value: 1
+ )
+ )
+ 1: Stmt_Echo[3:1 - 3:8](
+ exprs: array(
+ 0: Expr_Variable[3:6 - 3:7](
+ name: a
+ )
+ )
+ )
+)
+OUT;
+
+ $stmts = $parser->parse($code);
+ $dump = $dumper->dump($stmts, $code);
+
+ $this->assertSame($this->canonicalize($expected), $this->canonicalize($dump));
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ * @expectedExceptionMessage Can only dump nodes and arrays.
+ */
+ public function testError() {
+ $dumper = new NodeDumper;
+ $dumper->dump(new \stdClass);
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php
new file mode 100644
index 0000000..70f91b2
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/NodeTraverserTest.php
@@ -0,0 +1,210 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Node\Expr;
+use PhpParser\Node\Scalar\String_;
+
+class NodeTraverserTest extends \PHPUnit_Framework_TestCase
+{
+ public function testNonModifying() {
+ $str1Node = new String_('Foo');
+ $str2Node = new String_('Bar');
+ $echoNode = new Node\Stmt\Echo_(array($str1Node, $str2Node));
+ $stmts = array($echoNode);
+
+ $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+
+ $visitor->expects($this->at(0))->method('beforeTraverse')->with($stmts);
+ $visitor->expects($this->at(1))->method('enterNode')->with($echoNode);
+ $visitor->expects($this->at(2))->method('enterNode')->with($str1Node);
+ $visitor->expects($this->at(3))->method('leaveNode')->with($str1Node);
+ $visitor->expects($this->at(4))->method('enterNode')->with($str2Node);
+ $visitor->expects($this->at(5))->method('leaveNode')->with($str2Node);
+ $visitor->expects($this->at(6))->method('leaveNode')->with($echoNode);
+ $visitor->expects($this->at(7))->method('afterTraverse')->with($stmts);
+
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor($visitor);
+
+ $this->assertEquals($stmts, $traverser->traverse($stmts));
+ }
+
+ public function testModifying() {
+ $str1Node = new String_('Foo');
+ $str2Node = new String_('Bar');
+ $printNode = new Expr\Print_($str1Node);
+
+ // first visitor changes the node, second verifies the change
+ $visitor1 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+ $visitor2 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+
+ // replace empty statements with string1 node
+ $visitor1->expects($this->at(0))->method('beforeTraverse')->with(array())
+ ->will($this->returnValue(array($str1Node)));
+ $visitor2->expects($this->at(0))->method('beforeTraverse')->with(array($str1Node));
+
+ // replace string1 node with print node
+ $visitor1->expects($this->at(1))->method('enterNode')->with($str1Node)
+ ->will($this->returnValue($printNode));
+ $visitor2->expects($this->at(1))->method('enterNode')->with($printNode);
+
+ // replace string1 node with string2 node
+ $visitor1->expects($this->at(2))->method('enterNode')->with($str1Node)
+ ->will($this->returnValue($str2Node));
+ $visitor2->expects($this->at(2))->method('enterNode')->with($str2Node);
+
+ // replace string2 node with string1 node again
+ $visitor1->expects($this->at(3))->method('leaveNode')->with($str2Node)
+ ->will($this->returnValue($str1Node));
+ $visitor2->expects($this->at(3))->method('leaveNode')->with($str1Node);
+
+ // replace print node with string1 node again
+ $visitor1->expects($this->at(4))->method('leaveNode')->with($printNode)
+ ->will($this->returnValue($str1Node));
+ $visitor2->expects($this->at(4))->method('leaveNode')->with($str1Node);
+
+ // replace string1 node with empty statements again
+ $visitor1->expects($this->at(5))->method('afterTraverse')->with(array($str1Node))
+ ->will($this->returnValue(array()));
+ $visitor2->expects($this->at(5))->method('afterTraverse')->with(array());
+
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor($visitor1);
+ $traverser->addVisitor($visitor2);
+
+ // as all operations are reversed we end where we start
+ $this->assertEquals(array(), $traverser->traverse(array()));
+ }
+
+ public function testRemove() {
+ $str1Node = new String_('Foo');
+ $str2Node = new String_('Bar');
+
+ $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+
+ // remove the string1 node, leave the string2 node
+ $visitor->expects($this->at(2))->method('leaveNode')->with($str1Node)
+ ->will($this->returnValue(false));
+
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor($visitor);
+
+ $this->assertEquals(array($str2Node), $traverser->traverse(array($str1Node, $str2Node)));
+ }
+
+ public function testMerge() {
+ $strStart = new String_('Start');
+ $strMiddle = new String_('End');
+ $strEnd = new String_('Middle');
+ $strR1 = new String_('Replacement 1');
+ $strR2 = new String_('Replacement 2');
+
+ $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+
+ // replace strMiddle with strR1 and strR2 by merge
+ $visitor->expects($this->at(4))->method('leaveNode')->with($strMiddle)
+ ->will($this->returnValue(array($strR1, $strR2)));
+
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor($visitor);
+
+ $this->assertEquals(
+ array($strStart, $strR1, $strR2, $strEnd),
+ $traverser->traverse(array($strStart, $strMiddle, $strEnd))
+ );
+ }
+
+ public function testDeepArray() {
+ $strNode = new String_('Foo');
+ $stmts = array(array(array($strNode)));
+
+ $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+ $visitor->expects($this->at(1))->method('enterNode')->with($strNode);
+
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor($visitor);
+
+ $this->assertEquals($stmts, $traverser->traverse($stmts));
+ }
+
+ public function testDontTraverseChildren() {
+ $strNode = new String_('str');
+ $printNode = new Expr\Print_($strNode);
+ $varNode = new Expr\Variable('foo');
+ $mulNode = new Expr\BinaryOp\Mul($varNode, $varNode);
+ $negNode = new Expr\UnaryMinus($mulNode);
+ $stmts = array($printNode, $negNode);
+
+ $visitor1 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+ $visitor2 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+
+ $visitor1->expects($this->at(1))->method('enterNode')->with($printNode)
+ ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CHILDREN));
+ $visitor2->expects($this->at(1))->method('enterNode')->with($printNode);
+
+ $visitor1->expects($this->at(2))->method('leaveNode')->with($printNode);
+ $visitor2->expects($this->at(2))->method('leaveNode')->with($printNode);
+
+ $visitor1->expects($this->at(3))->method('enterNode')->with($negNode);
+ $visitor2->expects($this->at(3))->method('enterNode')->with($negNode);
+
+ $visitor1->expects($this->at(4))->method('enterNode')->with($mulNode);
+ $visitor2->expects($this->at(4))->method('enterNode')->with($mulNode)
+ ->will($this->returnValue(NodeTraverser::DONT_TRAVERSE_CHILDREN));
+
+ $visitor1->expects($this->at(5))->method('leaveNode')->with($mulNode);
+ $visitor2->expects($this->at(5))->method('leaveNode')->with($mulNode);
+
+ $visitor1->expects($this->at(6))->method('leaveNode')->with($negNode);
+ $visitor2->expects($this->at(6))->method('leaveNode')->with($negNode);
+
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor($visitor1);
+ $traverser->addVisitor($visitor2);
+
+ $this->assertEquals($stmts, $traverser->traverse($stmts));
+ }
+
+ public function testRemovingVisitor() {
+ $visitor1 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+ $visitor2 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+ $visitor3 = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor($visitor1);
+ $traverser->addVisitor($visitor2);
+ $traverser->addVisitor($visitor3);
+
+ $preExpected = array($visitor1, $visitor2, $visitor3);
+ $this->assertAttributeSame($preExpected, 'visitors', $traverser, 'The appropriate visitors have not been added');
+
+ $traverser->removeVisitor($visitor2);
+
+ $postExpected = array(0 => $visitor1, 2 => $visitor3);
+ $this->assertAttributeSame($postExpected, 'visitors', $traverser, 'The appropriate visitors are not present after removal');
+ }
+
+ public function testNoCloneNodes() {
+ $stmts = array(new Node\Stmt\Echo_(array(new String_('Foo'), new String_('Bar'))));
+
+ $traverser = new NodeTraverser;
+
+ $this->assertSame($stmts, $traverser->traverse($stmts));
+ }
+
+ /**
+ * @expectedException \LogicException
+ * @expectedExceptionMessage leaveNode() may only return an array if the parent structure is an array
+ */
+ public function testReplaceByArrayOnlyAllowedIfParentIsArray() {
+ $stmts = array(new Node\Expr\UnaryMinus(new Node\Scalar\LNumber(42)));
+
+ $visitor = $this->getMockBuilder('PhpParser\NodeVisitor')->getMock();
+ $visitor->method('leaveNode')->willReturn(array(new Node\Scalar\DNumber(42.0)));
+
+ $traverser = new NodeTraverser();
+ $traverser->addVisitor($visitor);
+ $traverser->traverse($stmts);
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php
new file mode 100644
index 0000000..a9c6cb5
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php
@@ -0,0 +1,449 @@
+<?php
+
+namespace PhpParser\NodeVisitor;
+
+use PhpParser;
+use PhpParser\Node;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Name;
+use PhpParser\Node\Stmt;
+
+class NameResolverTest extends \PHPUnit_Framework_TestCase
+{
+ private function canonicalize($string) {
+ return str_replace("\r\n", "\n", $string);
+ }
+
+ /**
+ * @covers PhpParser\NodeVisitor\NameResolver
+ */
+ public function testResolveNames() {
+ $code = <<<'EOC'
+<?php
+
+namespace Foo {
+ use Hallo as Hi;
+
+ new Bar();
+ new Hi();
+ new Hi\Bar();
+ new \Bar();
+ new namespace\Bar();
+
+ bar();
+ hi();
+ Hi\bar();
+ foo\bar();
+ \bar();
+ namespace\bar();
+}
+namespace {
+ use Hallo as Hi;
+
+ new Bar();
+ new Hi();
+ new Hi\Bar();
+ new \Bar();
+ new namespace\Bar();
+
+ bar();
+ hi();
+ Hi\bar();
+ foo\bar();
+ \bar();
+ namespace\bar();
+}
+namespace Bar {
+ use function foo\bar as baz;
+ use const foo\BAR as BAZ;
+ use foo as bar;
+
+ bar();
+ baz();
+ bar\foo();
+ baz\foo();
+ BAR();
+ BAZ();
+ BAR\FOO();
+ BAZ\FOO();
+
+ bar;
+ baz;
+ bar\foo;
+ baz\foo;
+ BAR;
+ BAZ;
+ BAR\FOO;
+ BAZ\FOO;
+}
+namespace Baz {
+ use A\T\{B\C, D\E};
+ use function X\T\{b\c, d\e};
+ use const Y\T\{B\C, D\E};
+ use Z\T\{G, function f, const K};
+
+ new C;
+ new E;
+ new C\D;
+ new E\F;
+ new G;
+
+ c();
+ e();
+ f();
+ C;
+ E;
+ K;
+}
+EOC;
+ $expectedCode = <<<'EOC'
+namespace Foo {
+ use Hallo as Hi;
+ new \Foo\Bar();
+ new \Hallo();
+ new \Hallo\Bar();
+ new \Bar();
+ new \Foo\Bar();
+ bar();
+ hi();
+ \Hallo\bar();
+ \Foo\foo\bar();
+ \bar();
+ \Foo\bar();
+}
+namespace {
+ use Hallo as Hi;
+ new \Bar();
+ new \Hallo();
+ new \Hallo\Bar();
+ new \Bar();
+ new \Bar();
+ \bar();
+ \hi();
+ \Hallo\bar();
+ \foo\bar();
+ \bar();
+ \bar();
+}
+namespace Bar {
+ use function foo\bar as baz;
+ use const foo\BAR as BAZ;
+ use foo as bar;
+ bar();
+ \foo\bar();
+ \foo\foo();
+ \Bar\baz\foo();
+ BAR();
+ \foo\bar();
+ \foo\FOO();
+ \Bar\BAZ\FOO();
+ bar;
+ baz;
+ \foo\foo;
+ \Bar\baz\foo;
+ BAR;
+ \foo\BAR;
+ \foo\FOO;
+ \Bar\BAZ\FOO;
+}
+namespace Baz {
+ use A\T\{B\C, D\E};
+ use function X\T\{b\c, d\e};
+ use const Y\T\{B\C, D\E};
+ use Z\T\{G, function f, const K};
+ new \A\T\B\C();
+ new \A\T\D\E();
+ new \A\T\B\C\D();
+ new \A\T\D\E\F();
+ new \Z\T\G();
+ \X\T\b\c();
+ \X\T\d\e();
+ \Z\T\f();
+ \Y\T\B\C;
+ \Y\T\D\E;
+ \Z\T\K;
+}
+EOC;
+
+ $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer\Emulative);
+ $prettyPrinter = new PhpParser\PrettyPrinter\Standard;
+ $traverser = new PhpParser\NodeTraverser;
+ $traverser->addVisitor(new NameResolver);
+
+ $stmts = $parser->parse($code);
+ $stmts = $traverser->traverse($stmts);
+
+ $this->assertSame(
+ $this->canonicalize($expectedCode),
+ $prettyPrinter->prettyPrint($stmts)
+ );
+ }
+
+ /**
+ * @covers PhpParser\NodeVisitor\NameResolver
+ */
+ public function testResolveLocations() {
+ $code = <<<'EOC'
+<?php
+namespace NS;
+
+class A extends B implements C, D {
+ use E, F, G {
+ f as private g;
+ E::h as i;
+ E::j insteadof F, G;
+ }
+}
+
+interface A extends C, D {
+ public function a(A $a) : A;
+}
+
+function fn(A $a) : A {}
+function fn2(array $a) : array {}
+function(A $a) : A {};
+
+function fn3(?A $a) : ?A {}
+function fn4(?array $a) : ?array {}
+
+A::b();
+A::$b;
+A::B;
+new A;
+$a instanceof A;
+
+namespace\a();
+namespace\A;
+
+try {
+ $someThing;
+} catch (A $a) {
+ $someThingElse;
+}
+EOC;
+ $expectedCode = <<<'EOC'
+namespace NS;
+
+class A extends \NS\B implements \NS\C, \NS\D
+{
+ use \NS\E, \NS\F, \NS\G {
+ f as private g;
+ \NS\E::h as i;
+ \NS\E::j insteadof \NS\F, \NS\G;
+ }
+}
+interface A extends \NS\C, \NS\D
+{
+ public function a(\NS\A $a) : \NS\A;
+}
+function fn(\NS\A $a) : \NS\A
+{
+}
+function fn2(array $a) : array
+{
+}
+function (\NS\A $a) : \NS\A {
+};
+function fn3(?\NS\A $a) : ?\NS\A
+{
+}
+function fn4(?array $a) : ?array
+{
+}
+\NS\A::b();
+\NS\A::$b;
+\NS\A::B;
+new \NS\A();
+$a instanceof \NS\A;
+\NS\a();
+\NS\A;
+try {
+ $someThing;
+} catch (\NS\A $a) {
+ $someThingElse;
+}
+EOC;
+
+ $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer\Emulative);
+ $prettyPrinter = new PhpParser\PrettyPrinter\Standard;
+ $traverser = new PhpParser\NodeTraverser;
+ $traverser->addVisitor(new NameResolver);
+
+ $stmts = $parser->parse($code);
+ $stmts = $traverser->traverse($stmts);
+
+ $this->assertSame(
+ $this->canonicalize($expectedCode),
+ $prettyPrinter->prettyPrint($stmts)
+ );
+ }
+
+ public function testNoResolveSpecialName() {
+ $stmts = array(new Node\Expr\New_(new Name('self')));
+
+ $traverser = new PhpParser\NodeTraverser;
+ $traverser->addVisitor(new NameResolver);
+
+ $this->assertEquals($stmts, $traverser->traverse($stmts));
+ }
+
+ public function testAddDeclarationNamespacedName() {
+ $nsStmts = array(
+ new Stmt\Class_('A'),
+ new Stmt\Interface_('B'),
+ new Stmt\Function_('C'),
+ new Stmt\Const_(array(
+ new Node\Const_('D', new Node\Scalar\LNumber(42))
+ )),
+ new Stmt\Trait_('E'),
+ new Expr\New_(new Stmt\Class_(null)),
+ );
+
+ $traverser = new PhpParser\NodeTraverser;
+ $traverser->addVisitor(new NameResolver);
+
+ $stmts = $traverser->traverse([new Stmt\Namespace_(new Name('NS'), $nsStmts)]);
+ $this->assertSame('NS\\A', (string) $stmts[0]->stmts[0]->namespacedName);
+ $this->assertSame('NS\\B', (string) $stmts[0]->stmts[1]->namespacedName);
+ $this->assertSame('NS\\C', (string) $stmts[0]->stmts[2]->namespacedName);
+ $this->assertSame('NS\\D', (string) $stmts[0]->stmts[3]->consts[0]->namespacedName);
+ $this->assertSame('NS\\E', (string) $stmts[0]->stmts[4]->namespacedName);
+ $this->assertObjectNotHasAttribute('namespacedName', $stmts[0]->stmts[5]->class);
+
+ $stmts = $traverser->traverse([new Stmt\Namespace_(null, $nsStmts)]);
+ $this->assertSame('A', (string) $stmts[0]->stmts[0]->namespacedName);
+ $this->assertSame('B', (string) $stmts[0]->stmts[1]->namespacedName);
+ $this->assertSame('C', (string) $stmts[0]->stmts[2]->namespacedName);
+ $this->assertSame('D', (string) $stmts[0]->stmts[3]->consts[0]->namespacedName);
+ $this->assertSame('E', (string) $stmts[0]->stmts[4]->namespacedName);
+ $this->assertObjectNotHasAttribute('namespacedName', $stmts[0]->stmts[5]->class);
+ }
+
+ public function testAddRuntimeResolvedNamespacedName() {
+ $stmts = array(
+ new Stmt\Namespace_(new Name('NS'), array(
+ new Expr\FuncCall(new Name('foo')),
+ new Expr\ConstFetch(new Name('FOO')),
+ )),
+ new Stmt\Namespace_(null, array(
+ new Expr\FuncCall(new Name('foo')),
+ new Expr\ConstFetch(new Name('FOO')),
+ )),
+ );
+
+ $traverser = new PhpParser\NodeTraverser;
+ $traverser->addVisitor(new NameResolver);
+ $stmts = $traverser->traverse($stmts);
+
+ $this->assertSame('NS\\foo', (string) $stmts[0]->stmts[0]->name->getAttribute('namespacedName'));
+ $this->assertSame('NS\\FOO', (string) $stmts[0]->stmts[1]->name->getAttribute('namespacedName'));
+
+ $this->assertFalse($stmts[1]->stmts[0]->name->hasAttribute('namespacedName'));
+ $this->assertFalse($stmts[1]->stmts[1]->name->hasAttribute('namespacedName'));
+ }
+
+ /**
+ * @dataProvider provideTestError
+ */
+ public function testError(Node $stmt, $errorMsg) {
+ $this->setExpectedException('PhpParser\Error', $errorMsg);
+
+ $traverser = new PhpParser\NodeTraverser;
+ $traverser->addVisitor(new NameResolver);
+ $traverser->traverse(array($stmt));
+ }
+
+ public function provideTestError() {
+ return array(
+ array(
+ new Stmt\Use_(array(
+ new Stmt\UseUse(new Name('A\B'), 'B', 0, array('startLine' => 1)),
+ new Stmt\UseUse(new Name('C\D'), 'B', 0, array('startLine' => 2)),
+ ), Stmt\Use_::TYPE_NORMAL),
+ 'Cannot use C\D as B because the name is already in use on line 2'
+ ),
+ array(
+ new Stmt\Use_(array(
+ new Stmt\UseUse(new Name('a\b'), 'b', 0, array('startLine' => 1)),
+ new Stmt\UseUse(new Name('c\d'), 'B', 0, array('startLine' => 2)),
+ ), Stmt\Use_::TYPE_FUNCTION),
+ 'Cannot use function c\d as B because the name is already in use on line 2'
+ ),
+ array(
+ new Stmt\Use_(array(
+ new Stmt\UseUse(new Name('A\B'), 'B', 0, array('startLine' => 1)),
+ new Stmt\UseUse(new Name('C\D'), 'B', 0, array('startLine' => 2)),
+ ), Stmt\Use_::TYPE_CONSTANT),
+ 'Cannot use const C\D as B because the name is already in use on line 2'
+ ),
+ array(
+ new Expr\New_(new Name\FullyQualified('self', array('startLine' => 3))),
+ "'\\self' is an invalid class name on line 3"
+ ),
+ array(
+ new Expr\New_(new Name\Relative('self', array('startLine' => 3))),
+ "'\\self' is an invalid class name on line 3"
+ ),
+ array(
+ new Expr\New_(new Name\FullyQualified('PARENT', array('startLine' => 3))),
+ "'\\PARENT' is an invalid class name on line 3"
+ ),
+ array(
+ new Expr\New_(new Name\Relative('STATIC', array('startLine' => 3))),
+ "'\\STATIC' is an invalid class name on line 3"
+ ),
+ );
+ }
+
+ public function testClassNameIsCaseInsensitive()
+ {
+ $source = <<<'EOC'
+<?php
+namespace Foo;
+use Bar\Baz;
+$test = new baz();
+EOC;
+
+ $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer\Emulative);
+ $stmts = $parser->parse($source);
+
+ $traverser = new PhpParser\NodeTraverser;
+ $traverser->addVisitor(new NameResolver);
+
+ $stmts = $traverser->traverse($stmts);
+ $stmt = $stmts[0];
+
+ $this->assertSame(array('Bar', 'Baz'), $stmt->stmts[1]->expr->class->parts);
+ }
+
+ public function testSpecialClassNamesAreCaseInsensitive() {
+ $source = <<<'EOC'
+<?php
+namespace Foo;
+
+class Bar
+{
+ public static function method()
+ {
+ SELF::method();
+ PARENT::method();
+ STATIC::method();
+ }
+}
+EOC;
+
+ $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer\Emulative);
+ $stmts = $parser->parse($source);
+
+ $traverser = new PhpParser\NodeTraverser;
+ $traverser->addVisitor(new NameResolver);
+
+ $stmts = $traverser->traverse($stmts);
+ $classStmt = $stmts[0];
+ $methodStmt = $classStmt->stmts[0]->stmts[0];
+
+ $this->assertSame('SELF', (string)$methodStmt->stmts[0]->class);
+ $this->assertSame('PARENT', (string)$methodStmt->stmts[1]->class);
+ $this->assertSame('STATIC', (string)$methodStmt->stmts[2]->class);
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php b/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php
new file mode 100644
index 0000000..01d3b60
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Parser/MultipleTest.php
@@ -0,0 +1,94 @@
+<?php
+
+namespace PhpParser\Parser;
+
+use PhpParser\Error;
+use PhpParser\Lexer;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Scalar\LNumber;
+use PhpParser\Node\Stmt;
+use PhpParser\ParserTest;
+
+require_once __DIR__ . '/../ParserTest.php';
+
+class MultipleTest extends ParserTest {
+ // This provider is for the generic parser tests, just pick an arbitrary order here
+ protected function getParser(Lexer $lexer) {
+ return new Multiple([new Php5($lexer), new Php7($lexer)]);
+ }
+
+ private function getPrefer7() {
+ $lexer = new Lexer(['usedAttributes' => []]);
+ return new Multiple([new Php7($lexer), new Php5($lexer)]);
+ }
+
+ private function getPrefer5() {
+ $lexer = new Lexer(['usedAttributes' => []]);
+ return new Multiple([new Php5($lexer), new Php7($lexer)]);
+ }
+
+ /** @dataProvider provideTestParse */
+ public function testParse($code, Multiple $parser, $expected) {
+ $this->assertEquals($expected, $parser->parse($code));
+ }
+
+ public function provideTestParse() {
+ return [
+ [
+ // PHP 7 only code
+ '<?php class Test { function function() {} }',
+ $this->getPrefer5(),
+ [
+ new Stmt\Class_('Test', ['stmts' => [
+ new Stmt\ClassMethod('function')
+ ]]),
+ ]
+ ],
+ [
+ // PHP 5 only code
+ '<?php global $$a->b;',
+ $this->getPrefer7(),
+ [
+ new Stmt\Global_([
+ new Expr\Variable(new Expr\PropertyFetch(new Expr\Variable('a'), 'b'))
+ ])
+ ]
+ ],
+ [
+ // Different meaning (PHP 5)
+ '<?php $$a[0];',
+ $this->getPrefer5(),
+ [
+ new Expr\Variable(
+ new Expr\ArrayDimFetch(new Expr\Variable('a'), LNumber::fromString('0'))
+ )
+ ]
+ ],
+ [
+ // Different meaning (PHP 7)
+ '<?php $$a[0];',
+ $this->getPrefer7(),
+ [
+ new Expr\ArrayDimFetch(
+ new Expr\Variable(new Expr\Variable('a')), LNumber::fromString('0')
+ )
+ ]
+ ],
+ ];
+ }
+
+ public function testThrownError() {
+ $this->setExpectedException('PhpParser\Error', 'FAIL A');
+
+ $parserA = $this->getMockBuilder('PhpParser\Parser')->getMock();
+ $parserA->expects($this->at(0))
+ ->method('parse')->will($this->throwException(new Error('FAIL A')));
+
+ $parserB = $this->getMockBuilder('PhpParser\Parser')->getMock();
+ $parserB->expects($this->at(0))
+ ->method('parse')->will($this->throwException(new Error('FAIL B')));
+
+ $parser = new Multiple([$parserA, $parserB]);
+ $parser->parse('dummy');
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php b/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php
new file mode 100644
index 0000000..58c4e61
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Parser/Php5Test.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace PhpParser\Parser;
+
+use PhpParser\Lexer;
+use PhpParser\ParserTest;
+
+require_once __DIR__ . '/../ParserTest.php';
+
+class Php5Test extends ParserTest {
+ protected function getParser(Lexer $lexer) {
+ return new Php5($lexer);
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php b/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php
new file mode 100644
index 0000000..d6ab9e1
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Parser/Php7Test.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace PhpParser\Parser;
+
+use PhpParser\Lexer;
+use PhpParser\ParserTest;
+
+require_once __DIR__ . '/../ParserTest.php';
+
+class Php7Test extends ParserTest {
+ protected function getParser(Lexer $lexer) {
+ return new Php7($lexer);
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php b/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php
new file mode 100644
index 0000000..49c0111
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/ParserFactoryTest.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace PhpParser;
+
+/* This test is very weak, because PHPUnit's assertEquals assertion is way too slow dealing with the
+ * large objects involved here. So we just do some basic instanceof tests instead. */
+class ParserFactoryTest extends \PHPUnit_Framework_TestCase {
+ /** @dataProvider provideTestCreate */
+ public function testCreate($kind, $lexer, $expected) {
+ $this->assertInstanceOf($expected, (new ParserFactory)->create($kind, $lexer));
+ }
+
+ public function provideTestCreate() {
+ $lexer = new Lexer();
+ return [
+ [
+ ParserFactory::PREFER_PHP7, $lexer,
+ 'PhpParser\Parser\Multiple'
+ ],
+ [
+ ParserFactory::PREFER_PHP5, null,
+ 'PhpParser\Parser\Multiple'
+ ],
+ [
+ ParserFactory::ONLY_PHP7, null,
+ 'PhpParser\Parser\Php7'
+ ],
+ [
+ ParserFactory::ONLY_PHP5, $lexer,
+ 'PhpParser\Parser\Php5'
+ ]
+ ];
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/PhpParser/ParserTest.php b/vendor/nikic/php-parser/test/PhpParser/ParserTest.php
new file mode 100644
index 0000000..1295ae0
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/ParserTest.php
@@ -0,0 +1,181 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Comment;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Scalar;
+use PhpParser\Node\Scalar\String_;
+
+abstract class ParserTest extends \PHPUnit_Framework_TestCase
+{
+ /** @returns Parser */
+ abstract protected function getParser(Lexer $lexer);
+
+ /**
+ * @expectedException \PhpParser\Error
+ * @expectedExceptionMessage Syntax error, unexpected EOF on line 1
+ */
+ public function testParserThrowsSyntaxError() {
+ $parser = $this->getParser(new Lexer());
+ $parser->parse('<?php foo');
+ }
+
+ /**
+ * @expectedException \PhpParser\Error
+ * @expectedExceptionMessage Cannot use foo as self because 'self' is a special class name on line 1
+ */
+ public function testParserThrowsSpecialError() {
+ $parser = $this->getParser(new Lexer());
+ $parser->parse('<?php use foo as self;');
+ }
+
+ /**
+ * @expectedException \PhpParser\Error
+ * @expectedExceptionMessage Unterminated comment on line 1
+ */
+ public function testParserThrowsLexerError() {
+ $parser = $this->getParser(new Lexer());
+ $parser->parse('<?php /*');
+ }
+
+ public function testAttributeAssignment() {
+ $lexer = new Lexer(array(
+ 'usedAttributes' => array(
+ 'comments', 'startLine', 'endLine',
+ 'startTokenPos', 'endTokenPos',
+ )
+ ));
+
+ $code = <<<'EOC'
+<?php
+/** Doc comment */
+function test($a) {
+ // Line
+ // Comments
+ echo $a;
+}
+EOC;
+ $code = canonicalize($code);
+
+ $parser = $this->getParser($lexer);
+ $stmts = $parser->parse($code);
+
+ /** @var \PhpParser\Node\Stmt\Function_ $fn */
+ $fn = $stmts[0];
+ $this->assertInstanceOf('PhpParser\Node\Stmt\Function_', $fn);
+ $this->assertEquals(array(
+ 'comments' => array(
+ new Comment\Doc('/** Doc comment */', 2, 6),
+ ),
+ 'startLine' => 3,
+ 'endLine' => 7,
+ 'startTokenPos' => 3,
+ 'endTokenPos' => 21,
+ ), $fn->getAttributes());
+
+ $param = $fn->params[0];
+ $this->assertInstanceOf('PhpParser\Node\Param', $param);
+ $this->assertEquals(array(
+ 'startLine' => 3,
+ 'endLine' => 3,
+ 'startTokenPos' => 7,
+ 'endTokenPos' => 7,
+ ), $param->getAttributes());
+
+ /** @var \PhpParser\Node\Stmt\Echo_ $echo */
+ $echo = $fn->stmts[0];
+ $this->assertInstanceOf('PhpParser\Node\Stmt\Echo_', $echo);
+ $this->assertEquals(array(
+ 'comments' => array(
+ new Comment("// Line\n", 4, 49),
+ new Comment("// Comments\n", 5, 61),
+ ),
+ 'startLine' => 6,
+ 'endLine' => 6,
+ 'startTokenPos' => 16,
+ 'endTokenPos' => 19,
+ ), $echo->getAttributes());
+
+ /** @var \PhpParser\Node\Expr\Variable $var */
+ $var = $echo->exprs[0];
+ $this->assertInstanceOf('PhpParser\Node\Expr\Variable', $var);
+ $this->assertEquals(array(
+ 'startLine' => 6,
+ 'endLine' => 6,
+ 'startTokenPos' => 18,
+ 'endTokenPos' => 18,
+ ), $var->getAttributes());
+ }
+
+ /**
+ * @expectedException \RangeException
+ * @expectedExceptionMessage The lexer returned an invalid token (id=999, value=foobar)
+ */
+ public function testInvalidToken() {
+ $lexer = new InvalidTokenLexer;
+ $parser = $this->getParser($lexer);
+ $parser->parse('dummy');
+ }
+
+ /**
+ * @dataProvider provideTestExtraAttributes
+ */
+ public function testExtraAttributes($code, $expectedAttributes) {
+ $parser = $this->getParser(new Lexer);
+ $stmts = $parser->parse("<?php $code;");
+ $attributes = $stmts[0]->getAttributes();
+ foreach ($expectedAttributes as $name => $value) {
+ $this->assertSame($value, $attributes[$name]);
+ }
+ }
+
+ public function provideTestExtraAttributes() {
+ return array(
+ array('0', ['kind' => Scalar\LNumber::KIND_DEC]),
+ array('9', ['kind' => Scalar\LNumber::KIND_DEC]),
+ array('07', ['kind' => Scalar\LNumber::KIND_OCT]),
+ array('0xf', ['kind' => Scalar\LNumber::KIND_HEX]),
+ array('0XF', ['kind' => Scalar\LNumber::KIND_HEX]),
+ array('0b1', ['kind' => Scalar\LNumber::KIND_BIN]),
+ array('0B1', ['kind' => Scalar\LNumber::KIND_BIN]),
+ array('[]', ['kind' => Expr\Array_::KIND_SHORT]),
+ array('array()', ['kind' => Expr\Array_::KIND_LONG]),
+ array("'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]),
+ array("b'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]),
+ array("B'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]),
+ array('"foo"', ['kind' => String_::KIND_DOUBLE_QUOTED]),
+ array('b"foo"', ['kind' => String_::KIND_DOUBLE_QUOTED]),
+ array('B"foo"', ['kind' => String_::KIND_DOUBLE_QUOTED]),
+ array('"foo$bar"', ['kind' => String_::KIND_DOUBLE_QUOTED]),
+ array('b"foo$bar"', ['kind' => String_::KIND_DOUBLE_QUOTED]),
+ array('B"foo$bar"', ['kind' => String_::KIND_DOUBLE_QUOTED]),
+ array("<<<'STR'\nSTR\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']),
+ array("<<<STR\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']),
+ array("<<<\"STR\"\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']),
+ array("b<<<'STR'\nSTR\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']),
+ array("B<<<'STR'\nSTR\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']),
+ array("<<< \t 'STR'\nSTR\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']),
+ // HHVM doesn't support this due to a lexer bug
+ // (https://github.com/facebook/hhvm/issues/6970)
+ // array("<<<'\xff'\n\xff\n", ['kind' => String_::KIND_NOWDOC, 'docLabel' => "\xff"]),
+ array("<<<\"STR\"\n\$a\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']),
+ array("b<<<\"STR\"\n\$a\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']),
+ array("B<<<\"STR\"\n\$a\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']),
+ array("<<< \t \"STR\"\n\$a\nSTR\n", ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']),
+ array("die", ['kind' => Expr\Exit_::KIND_DIE]),
+ array("die('done')", ['kind' => Expr\Exit_::KIND_DIE]),
+ array("exit", ['kind' => Expr\Exit_::KIND_EXIT]),
+ array("exit(1)", ['kind' => Expr\Exit_::KIND_EXIT]),
+ array("?>Foo", ['hasLeadingNewline' => false]),
+ array("?>\nFoo", ['hasLeadingNewline' => true]),
+ );
+ }
+}
+
+class InvalidTokenLexer extends Lexer {
+ public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) {
+ $value = 'foobar';
+ return 999;
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php b/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php
new file mode 100644
index 0000000..9dbd3d3
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/PrettyPrinterTest.php
@@ -0,0 +1,164 @@
+<?php
+
+namespace PhpParser;
+
+use PhpParser\Comment;
+use PhpParser\Node\Expr;
+use PhpParser\Node\Scalar\Encapsed;
+use PhpParser\Node\Scalar\EncapsedStringPart;
+use PhpParser\Node\Scalar\String_;
+use PhpParser\Node\Stmt;
+use PhpParser\PrettyPrinter\Standard;
+
+require_once __DIR__ . '/CodeTestAbstract.php';
+
+class PrettyPrinterTest extends CodeTestAbstract
+{
+ protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $modeLine) {
+ $lexer = new Lexer\Emulative;
+ $parser5 = new Parser\Php5($lexer);
+ $parser7 = new Parser\Php7($lexer);
+
+ list($version, $options) = $this->parseModeLine($modeLine);
+ $prettyPrinter = new Standard($options);
+
+ try {
+ $output5 = canonicalize($prettyPrinter->$method($parser5->parse($code)));
+ } catch (Error $e) {
+ $output5 = null;
+ if ('php7' !== $version) {
+ throw $e;
+ }
+ }
+
+ try {
+ $output7 = canonicalize($prettyPrinter->$method($parser7->parse($code)));
+ } catch (Error $e) {
+ $output7 = null;
+ if ('php5' !== $version) {
+ throw $e;
+ }
+ }
+
+ if ('php5' === $version) {
+ $this->assertSame($expected, $output5, $name);
+ $this->assertNotSame($expected, $output7, $name);
+ } else if ('php7' === $version) {
+ $this->assertSame($expected, $output7, $name);
+ $this->assertNotSame($expected, $output5, $name);
+ } else {
+ $this->assertSame($expected, $output5, $name);
+ $this->assertSame($expected, $output7, $name);
+ }
+ }
+
+ /**
+ * @dataProvider provideTestPrettyPrint
+ * @covers PhpParser\PrettyPrinter\Standard<extended>
+ */
+ public function testPrettyPrint($name, $code, $expected, $mode) {
+ $this->doTestPrettyPrintMethod('prettyPrint', $name, $code, $expected, $mode);
+ }
+
+ /**
+ * @dataProvider provideTestPrettyPrintFile
+ * @covers PhpParser\PrettyPrinter\Standard<extended>
+ */
+ public function testPrettyPrintFile($name, $code, $expected, $mode) {
+ $this->doTestPrettyPrintMethod('prettyPrintFile', $name, $code, $expected, $mode);
+ }
+
+ public function provideTestPrettyPrint() {
+ return $this->getTests(__DIR__ . '/../code/prettyPrinter', 'test');
+ }
+
+ public function provideTestPrettyPrintFile() {
+ return $this->getTests(__DIR__ . '/../code/prettyPrinter', 'file-test');
+ }
+
+ public function testPrettyPrintExpr() {
+ $prettyPrinter = new Standard;
+ $expr = new Expr\BinaryOp\Mul(
+ new Expr\BinaryOp\Plus(new Expr\Variable('a'), new Expr\Variable('b')),
+ new Expr\Variable('c')
+ );
+ $this->assertEquals('($a + $b) * $c', $prettyPrinter->prettyPrintExpr($expr));
+
+ $expr = new Expr\Closure(array(
+ 'stmts' => array(new Stmt\Return_(new String_("a\nb")))
+ ));
+ $this->assertEquals("function () {\n return 'a\nb';\n}", $prettyPrinter->prettyPrintExpr($expr));
+ }
+
+ public function testCommentBeforeInlineHTML() {
+ $prettyPrinter = new PrettyPrinter\Standard;
+ $comment = new Comment\Doc("/**\n * This is a comment\n */");
+ $stmts = [new Stmt\InlineHTML('Hello World!', ['comments' => [$comment]])];
+ $expected = "<?php\n\n/**\n * This is a comment\n */\n?>\nHello World!";
+ $this->assertSame($expected, $prettyPrinter->prettyPrintFile($stmts));
+ }
+
+ private function parseModeLine($modeLine) {
+ $parts = explode(' ', $modeLine, 2);
+ $version = isset($parts[0]) ? $parts[0] : 'both';
+ $options = isset($parts[1]) ? json_decode($parts[1], true) : [];
+ return [$version, $options];
+ }
+
+ public function testArraySyntaxDefault() {
+ $prettyPrinter = new Standard(['shortArraySyntax' => true]);
+ $expr = new Expr\Array_([
+ new Expr\ArrayItem(new String_('val'), new String_('key'))
+ ]);
+ $expected = "['key' => 'val']";
+ $this->assertSame($expected, $prettyPrinter->prettyPrintExpr($expr));
+ }
+
+ /**
+ * @dataProvider provideTestKindAttributes
+ */
+ public function testKindAttributes($node, $expected) {
+ $prttyPrinter = new PrettyPrinter\Standard;
+ $result = $prttyPrinter->prettyPrintExpr($node);
+ $this->assertSame($expected, $result);
+ }
+
+ public function provideTestKindAttributes() {
+ $nowdoc = ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR'];
+ $heredoc = ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR'];
+ return [
+ // Defaults to single quoted
+ [new String_('foo'), "'foo'"],
+ // Explicit single/double quoted
+ [new String_('foo', ['kind' => String_::KIND_SINGLE_QUOTED]), "'foo'"],
+ [new String_('foo', ['kind' => String_::KIND_DOUBLE_QUOTED]), '"foo"'],
+ // Fallback from doc string if no label
+ [new String_('foo', ['kind' => String_::KIND_NOWDOC]), "'foo'"],
+ [new String_('foo', ['kind' => String_::KIND_HEREDOC]), '"foo"'],
+ // Fallback if string contains label
+ [new String_("A\nB\nC", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'A']), "'A\nB\nC'"],
+ [new String_("A\nB\nC", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'B']), "'A\nB\nC'"],
+ [new String_("A\nB\nC", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'C']), "'A\nB\nC'"],
+ [new String_("STR;", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']), "'STR;'"],
+ // Doc string if label not contained (or not in ending position)
+ [new String_("foo", $nowdoc), "<<<'STR'\nfoo\nSTR\n"],
+ [new String_("foo", $heredoc), "<<<STR\nfoo\nSTR\n"],
+ [new String_("STRx", $nowdoc), "<<<'STR'\nSTRx\nSTR\n"],
+ [new String_("xSTR", $nowdoc), "<<<'STR'\nxSTR\nSTR\n"],
+ // Empty doc string variations (encapsed variant does not occur naturally)
+ [new String_("", $nowdoc), "<<<'STR'\nSTR\n"],
+ [new String_("", $heredoc), "<<<STR\nSTR\n"],
+ [new Encapsed([new EncapsedStringPart('')], $heredoc), "<<<STR\nSTR\n"],
+ // Encapsed doc string variations
+ [new Encapsed([new EncapsedStringPart('foo')], $heredoc), "<<<STR\nfoo\nSTR\n"],
+ [new Encapsed([new EncapsedStringPart('foo'), new Expr\Variable('y')], $heredoc), "<<<STR\nfoo{\$y}\nSTR\n"],
+ [new Encapsed([new EncapsedStringPart("\nSTR"), new Expr\Variable('y')], $heredoc), "<<<STR\n\nSTR{\$y}\nSTR\n"],
+ [new Encapsed([new EncapsedStringPart("\nSTR"), new Expr\Variable('y')], $heredoc), "<<<STR\n\nSTR{\$y}\nSTR\n"],
+ [new Encapsed([new Expr\Variable('y'), new EncapsedStringPart("STR\n")], $heredoc), "<<<STR\n{\$y}STR\n\nSTR\n"],
+ // Encapsed doc string fallback
+ [new Encapsed([new Expr\Variable('y'), new EncapsedStringPart("\nSTR")], $heredoc), '"{$y}\\nSTR"'],
+ [new Encapsed([new EncapsedStringPart("STR\n"), new Expr\Variable('y')], $heredoc), '"STR\\n{$y}"'],
+ [new Encapsed([new EncapsedStringPart("STR")], $heredoc), '"STR"'],
+ ];
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Serializer/XMLTest.php b/vendor/nikic/php-parser/test/PhpParser/Serializer/XMLTest.php
new file mode 100644
index 0000000..e1186f4
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Serializer/XMLTest.php
@@ -0,0 +1,172 @@
+<?php
+
+namespace PhpParser\Serializer;
+
+use PhpParser;
+
+class XMLTest extends \PHPUnit_Framework_TestCase
+{
+ /**
+ * @covers PhpParser\Serializer\XML<extended>
+ */
+ public function testSerialize() {
+ $code = <<<CODE
+<?php
+// comment
+/** doc comment */
+function functionName(&\$a = 0, \$b = 1.0) {
+ echo 'Foo';
+}
+CODE;
+ $xml = <<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<AST xmlns:node="http://nikic.github.com/PHPParser/XML/node" xmlns:subNode="http://nikic.github.com/PHPParser/XML/subNode" xmlns:attribute="http://nikic.github.com/PHPParser/XML/attribute" xmlns:scalar="http://nikic.github.com/PHPParser/XML/scalar">
+ <scalar:array>
+ <node:Stmt_Function>
+ <attribute:startLine>
+ <scalar:int>4</scalar:int>
+ </attribute:startLine>
+ <attribute:comments>
+ <scalar:array>
+ <comment isDocComment="false" line="2">// comment
+</comment>
+ <comment isDocComment="true" line="3">/** doc comment */</comment>
+ </scalar:array>
+ </attribute:comments>
+ <attribute:endLine>
+ <scalar:int>6</scalar:int>
+ </attribute:endLine>
+ <subNode:byRef>
+ <scalar:false/>
+ </subNode:byRef>
+ <subNode:name>
+ <scalar:string>functionName</scalar:string>
+ </subNode:name>
+ <subNode:params>
+ <scalar:array>
+ <node:Param>
+ <attribute:startLine>
+ <scalar:int>4</scalar:int>
+ </attribute:startLine>
+ <attribute:endLine>
+ <scalar:int>4</scalar:int>
+ </attribute:endLine>
+ <subNode:type>
+ <scalar:null/>
+ </subNode:type>
+ <subNode:byRef>
+ <scalar:true/>
+ </subNode:byRef>
+ <subNode:variadic>
+ <scalar:false/>
+ </subNode:variadic>
+ <subNode:name>
+ <scalar:string>a</scalar:string>
+ </subNode:name>
+ <subNode:default>
+ <node:Scalar_LNumber>
+ <attribute:startLine>
+ <scalar:int>4</scalar:int>
+ </attribute:startLine>
+ <attribute:endLine>
+ <scalar:int>4</scalar:int>
+ </attribute:endLine>
+ <attribute:kind>
+ <scalar:int>10</scalar:int>
+ </attribute:kind>
+ <subNode:value>
+ <scalar:int>0</scalar:int>
+ </subNode:value>
+ </node:Scalar_LNumber>
+ </subNode:default>
+ </node:Param>
+ <node:Param>
+ <attribute:startLine>
+ <scalar:int>4</scalar:int>
+ </attribute:startLine>
+ <attribute:endLine>
+ <scalar:int>4</scalar:int>
+ </attribute:endLine>
+ <subNode:type>
+ <scalar:null/>
+ </subNode:type>
+ <subNode:byRef>
+ <scalar:false/>
+ </subNode:byRef>
+ <subNode:variadic>
+ <scalar:false/>
+ </subNode:variadic>
+ <subNode:name>
+ <scalar:string>b</scalar:string>
+ </subNode:name>
+ <subNode:default>
+ <node:Scalar_DNumber>
+ <attribute:startLine>
+ <scalar:int>4</scalar:int>
+ </attribute:startLine>
+ <attribute:endLine>
+ <scalar:int>4</scalar:int>
+ </attribute:endLine>
+ <subNode:value>
+ <scalar:float>1</scalar:float>
+ </subNode:value>
+ </node:Scalar_DNumber>
+ </subNode:default>
+ </node:Param>
+ </scalar:array>
+ </subNode:params>
+ <subNode:returnType>
+ <scalar:null/>
+ </subNode:returnType>
+ <subNode:stmts>
+ <scalar:array>
+ <node:Stmt_Echo>
+ <attribute:startLine>
+ <scalar:int>5</scalar:int>
+ </attribute:startLine>
+ <attribute:endLine>
+ <scalar:int>5</scalar:int>
+ </attribute:endLine>
+ <subNode:exprs>
+ <scalar:array>
+ <node:Scalar_String>
+ <attribute:startLine>
+ <scalar:int>5</scalar:int>
+ </attribute:startLine>
+ <attribute:endLine>
+ <scalar:int>5</scalar:int>
+ </attribute:endLine>
+ <attribute:kind>
+ <scalar:int>1</scalar:int>
+ </attribute:kind>
+ <subNode:value>
+ <scalar:string>Foo</scalar:string>
+ </subNode:value>
+ </node:Scalar_String>
+ </scalar:array>
+ </subNode:exprs>
+ </node:Stmt_Echo>
+ </scalar:array>
+ </subNode:stmts>
+ </node:Stmt_Function>
+ </scalar:array>
+</AST>
+XML;
+
+ $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer);
+ $serializer = new XML;
+
+ $code = str_replace("\r\n", "\n", $code);
+ $stmts = $parser->parse($code);
+ $this->assertXmlStringEqualsXmlString($xml, $serializer->serialize($stmts));
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ * @expectedExceptionMessage Unexpected node type
+ */
+ public function testError() {
+ $serializer = new XML;
+ $serializer->serialize(array(new \stdClass));
+ }
+}
diff --git a/vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php b/vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php
new file mode 100644
index 0000000..3bc86db
--- /dev/null
+++ b/vendor/nikic/php-parser/test/PhpParser/Unserializer/XMLTest.php
@@ -0,0 +1,150 @@
+<?php
+
+namespace PhpParser\Unserializer;
+
+use PhpParser\Comment;
+use PhpParser\Node\Scalar;
+
+class XMLTest extends \PHPUnit_Framework_TestCase
+{
+ public function testNode() {
+ $xml = <<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<AST xmlns:node="http://nikic.github.com/PHPParser/XML/node" xmlns:subNode="http://nikic.github.com/PHPParser/XML/subNode" xmlns:attribute="http://nikic.github.com/PHPParser/XML/attribute" xmlns:scalar="http://nikic.github.com/PHPParser/XML/scalar">
+ <node:Scalar_String line="1" docComment="/** doc comment */">
+ <attribute:startLine>
+ <scalar:int>1</scalar:int>
+ </attribute:startLine>
+ <attribute:comments>
+ <scalar:array>
+ <comment isDocComment="false" line="2">// comment
+</comment>
+ <comment isDocComment="true" line="3">/** doc comment */</comment>
+ </scalar:array>
+ </attribute:comments>
+ <subNode:value>
+ <scalar:string>Test</scalar:string>
+ </subNode:value>
+ </node:Scalar_String>
+</AST>
+XML;
+
+ $unserializer = new XML;
+ $this->assertEquals(
+ new Scalar\String_('Test', array(
+ 'startLine' => 1,
+ 'comments' => array(
+ new Comment('// comment' . "\n", 2),
+ new Comment\Doc('/** doc comment */', 3),
+ ),
+ )),
+ $unserializer->unserialize($xml)
+ );
+ }
+
+ public function testEmptyNode() {
+ $xml = <<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<AST xmlns:node="http://nikic.github.com/PHPParser/XML/node">
+ <node:Scalar_MagicConst_Class />
+</AST>
+XML;
+
+ $unserializer = new XML;
+
+ $this->assertEquals(
+ new Scalar\MagicConst\Class_,
+ $unserializer->unserialize($xml)
+ );
+ }
+
+ public function testScalars() {
+ $xml = <<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<AST xmlns:scalar="http://nikic.github.com/PHPParser/XML/scalar">
+ <scalar:array>
+ <scalar:array></scalar:array>
+ <scalar:array/>
+ <scalar:string>test</scalar:string>
+ <scalar:string></scalar:string>
+ <scalar:string/>
+ <scalar:int>1</scalar:int>
+ <scalar:float>1</scalar:float>
+ <scalar:float>1.5</scalar:float>
+ <scalar:true/>
+ <scalar:false/>
+ <scalar:null/>
+ </scalar:array>
+</AST>
+XML;
+ $result = array(
+ array(), array(),
+ 'test', '', '',
+ 1,
+ 1, 1.5,
+ true, false, null
+ );
+
+ $unserializer = new XML;
+ $this->assertEquals($result, $unserializer->unserialize($xml));
+ }
+
+ /**
+ * @expectedException \DomainException
+ * @expectedExceptionMessage AST root element not found
+ */
+ public function testWrongRootElementError() {
+ $xml = <<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<notAST/>
+XML;
+
+ $unserializer = new XML;
+ $unserializer->unserialize($xml);
+ }
+
+ /**
+ * @dataProvider provideTestErrors
+ */
+ public function testErrors($xml, $errorMsg) {
+ $this->setExpectedException('DomainException', $errorMsg);
+
+ $xml = <<<XML
+<?xml version="1.0" encoding="UTF-8"?>
+<AST xmlns:scalar="http://nikic.github.com/PHPParser/XML/scalar"
+ xmlns:node="http://nikic.github.com/PHPParser/XML/node"
+ xmlns:subNode="http://nikic.github.com/PHPParser/XML/subNode"
+ xmlns:foo="http://nikic.github.com/PHPParser/XML/foo">
+ $xml
+</AST>
+XML;
+
+ $unserializer = new XML;
+ $unserializer->unserialize($xml);
+ }
+
+ public function provideTestErrors() {
+ return array(
+ array('<scalar:true>test</scalar:true>', '"true" scalar must be empty'),
+ array('<scalar:false>test</scalar:false>', '"false" scalar must be empty'),
+ array('<scalar:null>test</scalar:null>', '"null" scalar must be empty'),
+ array('<scalar:foo>bar</scalar:foo>', 'Unknown scalar type "foo"'),
+ array('<scalar:int>x</scalar:int>', '"x" is not a valid int'),
+ array('<scalar:float>x</scalar:float>', '"x" is not a valid float'),
+ array('', 'Expected node or scalar'),
+ array('<foo:bar>test</foo:bar>', 'Unexpected node of type "foo:bar"'),
+ array(
+ '<node:Scalar_String><foo:bar>test</foo:bar></node:Scalar_String>',
+ 'Expected sub node or attribute, got node of type "foo:bar"'
+ ),
+ array(
+ '<node:Scalar_String><subNode:value/></node:Scalar_String>',
+ 'Expected node or scalar'
+ ),
+ array(
+ '<node:Foo><subNode:value/></node:Foo>',
+ 'Unknown node type "Foo"'
+ ),
+ );
+ }
+}
diff --git a/vendor/nikic/php-parser/test/bootstrap.php b/vendor/nikic/php-parser/test/bootstrap.php
new file mode 100644
index 0000000..9526b64
--- /dev/null
+++ b/vendor/nikic/php-parser/test/bootstrap.php
@@ -0,0 +1,20 @@
+<?php
+
+namespace PhpParser;
+
+require __DIR__ . '/../vendor/autoload.php';
+
+function canonicalize($str) {
+ // normalize EOL style
+ $str = str_replace("\r\n", "\n", $str);
+
+ // trim newlines at end
+ $str = rtrim($str, "\n");
+
+ // remove trailing whitespace on all lines
+ $lines = explode("\n", $str);
+ $lines = array_map(function($line) {
+ return rtrim($line, " \t");
+ }, $lines);
+ return implode("\n", $lines);
+}
diff --git a/vendor/nikic/php-parser/test/code/parser/blockComments.test b/vendor/nikic/php-parser/test/code/parser/blockComments.test
new file mode 100644
index 0000000..0d12326
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/blockComments.test
@@ -0,0 +1,23 @@
+Comments on blocks
+-----
+<?php
+
+// foo
+{
+ // bar
+ {
+ // baz
+ $a;
+ }
+}
+-----
+array(
+ 0: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // foo
+ 1: // bar
+ 2: // baz
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/comments.test b/vendor/nikic/php-parser/test/code/parser/comments.test
new file mode 100644
index 0000000..e15b969
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/comments.test
@@ -0,0 +1,100 @@
+Comments
+-----
+<?php
+
+/** doc 1 */
+/* foobar 1 */
+// foo 1
+// bar 1
+$var;
+
+if ($cond) {
+ /** doc 2 */
+ /* foobar 2 */
+ // foo 2
+ // bar 2
+}
+
+/** doc 3 */
+/* foobar 3 */
+// foo 3
+// bar 3
+-----
+array(
+ 0: Expr_Variable(
+ name: var
+ comments: array(
+ 0: /** doc 1 */
+ 1: /* foobar 1 */
+ 2: // foo 1
+ 3: // bar 1
+ )
+ )
+ 1: Stmt_If(
+ cond: Expr_Variable(
+ name: cond
+ )
+ stmts: array(
+ 0: Stmt_Nop(
+ comments: array(
+ 0: /** doc 2 */
+ 1: /* foobar 2 */
+ 2: // foo 2
+ 3: // bar 2
+ )
+ )
+ )
+ elseifs: array(
+ )
+ else: null
+ )
+ 2: Stmt_Nop(
+ comments: array(
+ 0: /** doc 3 */
+ 1: /* foobar 3 */
+ 2: // foo 3
+ 3: // bar 3
+ )
+ )
+)
+-----
+<?php
+
+/** doc */
+/* foobar */
+// foo
+// bar
+
+?>
+-----
+array(
+ 0: Stmt_Nop(
+ comments: array(
+ 0: /** doc */
+ 1: /* foobar */
+ 2: // foo
+ 3: // bar
+ )
+ )
+)
+-----
+<?php
+
+// comment
+if (42) {}
+-----
+array(
+ 0: Stmt_If(
+ cond: Scalar_LNumber(
+ value: 42
+ )
+ stmts: array(
+ )
+ elseifs: array(
+ )
+ else: null
+ comments: array(
+ 0: // comment
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/errorHandling/eofError.test b/vendor/nikic/php-parser/test/code/parser/errorHandling/eofError.test
new file mode 100644
index 0000000..92951b7
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/errorHandling/eofError.test
@@ -0,0 +1,32 @@
+Error positions
+-----
+<?php foo
+-----
+Syntax error, unexpected EOF from 1:10 to 1:10
+array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ )
+)
+-----
+<?php foo /* bar */
+-----
+Syntax error, unexpected EOF from 1:20 to 1:20
+array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ )
+ 1: Stmt_Nop(
+ comments: array(
+ 0: /* bar */
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/errorHandling/lexerErrors.test b/vendor/nikic/php-parser/test/code/parser/errorHandling/lexerErrors.test
new file mode 100644
index 0000000..cfb7282
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/errorHandling/lexerErrors.test
@@ -0,0 +1,124 @@
+Lexer errors
+-----
+<?php
+
+$a = 42;
+/*
+$b = 24;
+-----
+Unterminated comment from 4:1 to 5:9
+array(
+ 0: Expr_Assign(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Scalar_LNumber(
+ value: 42
+ )
+ )
+ 1: Stmt_Nop(
+ comments: array(
+ 0: /*
+ $b = 24;
+ )
+ )
+)
+-----
+<?php
+
+$a = 42;
+@@{ "\1" }@@
+$b = 24;
+-----
+Unexpected character "@@{ "\1" }@@" (ASCII 1) from 4:1 to 4:1
+array(
+ 0: Expr_Assign(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Scalar_LNumber(
+ value: 42
+ )
+ )
+ 1: Expr_Assign(
+ var: Expr_Variable(
+ name: b
+ )
+ expr: Scalar_LNumber(
+ value: 24
+ )
+ )
+)
+-----
+<?php
+
+$a = 42;
+@@{ "\0" }@@
+$b = 24;
+-----
+Unexpected null byte from 4:1 to 4:1
+array(
+ 0: Expr_Assign(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Scalar_LNumber(
+ value: 42
+ )
+ )
+ 1: Expr_Assign(
+ var: Expr_Variable(
+ name: b
+ )
+ expr: Scalar_LNumber(
+ value: 24
+ )
+ )
+)
+-----
+<?php
+
+$a = 1;
+@@{ "\1" }@@
+$b = 2;
+@@{ "\2" }@@
+$c = 3;
+-----
+Unexpected character "@@{ "\1" }@@" (ASCII 1) from 4:1 to 4:1
+Unexpected character "@@{ "\2" }@@" (ASCII 2) from 6:1 to 6:1
+array(
+ 0: Expr_Assign(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+ 1: Expr_Assign(
+ var: Expr_Variable(
+ name: b
+ )
+ expr: Scalar_LNumber(
+ value: 2
+ )
+ )
+ 2: Expr_Assign(
+ var: Expr_Variable(
+ name: c
+ )
+ expr: Scalar_LNumber(
+ value: 3
+ )
+ )
+)
+-----
+<?php
+
+if ($b) {
+ $a = 1;
+ /* unterminated
+}
+-----
+Unterminated comment from 5:5 to 6:2
+Syntax error, unexpected EOF from 6:2 to 6:2 \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/errorHandling/recovery.test b/vendor/nikic/php-parser/test/code/parser/errorHandling/recovery.test
new file mode 100644
index 0000000..5800ce3
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/errorHandling/recovery.test
@@ -0,0 +1,375 @@
+Error recovery
+-----
+<?php
+
+foo()
+bar()
+baz()
+-----
+Syntax error, unexpected T_STRING from 4:1 to 4:3
+Syntax error, unexpected T_STRING from 5:1 to 5:3
+Syntax error, unexpected EOF from 5:6 to 5:6
+array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ args: array(
+ )
+ )
+ 1: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: bar
+ )
+ )
+ args: array(
+ )
+ )
+ 2: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: baz
+ )
+ )
+ args: array(
+ )
+ )
+)
+-----
+<?php
+
+foo()
+bar();
+baz();
+-----
+Syntax error, unexpected T_STRING from 4:1 to 4:3
+array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ args: array(
+ )
+ )
+ 1: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: bar
+ )
+ )
+ args: array(
+ )
+ )
+ 2: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: baz
+ )
+ )
+ args: array(
+ )
+ )
+)
+-----
+<?php
+
+foo();
+bar()
+baz();
+-----
+Syntax error, unexpected T_STRING from 5:1 to 5:3
+array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ args: array(
+ )
+ )
+ 1: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: bar
+ )
+ )
+ args: array(
+ )
+ )
+ 2: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: baz
+ )
+ )
+ args: array(
+ )
+ )
+)
+-----
+<?php
+abc;
+1 + ;
+-----
+Syntax error, unexpected ';' from 3:5 to 3:5
+array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: abc
+ )
+ )
+ )
+ 1: Scalar_LNumber(
+ value: 1
+ )
+)
+-----
+<?php
+function test() {
+ 1 +
+}
+-----
+Syntax error, unexpected '}' from 4:1 to 4:1
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: test
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ 0: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+)
+-----
+<?php
+
+$i = 0;
+while
+
+$j = 1;
+$k = 2;
+-----
+Syntax error, unexpected T_VARIABLE, expecting '(' from 6:1 to 6:2
+array(
+ 0: Expr_Assign(
+ var: Expr_Variable(
+ name: i
+ )
+ expr: Scalar_LNumber(
+ value: 0
+ )
+ )
+ 1: Expr_Assign(
+ var: Expr_Variable(
+ name: j
+ )
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+ 2: Expr_Assign(
+ var: Expr_Variable(
+ name: k
+ )
+ expr: Scalar_LNumber(
+ value: 2
+ )
+ )
+)
+-----
+<?php
+
+$i = 0;
+while () {
+ $j = 1;
+}
+$k = 2;
+// The output here drops the loop - would require Error node to handle this
+-----
+Syntax error, unexpected ')' from 4:8 to 4:8
+array(
+ 0: Expr_Assign(
+ var: Expr_Variable(
+ name: i
+ )
+ expr: Scalar_LNumber(
+ value: 0
+ )
+ )
+ 1: Expr_Assign(
+ var: Expr_Variable(
+ name: j
+ )
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+ 2: Expr_Assign(
+ var: Expr_Variable(
+ name: k
+ )
+ expr: Scalar_LNumber(
+ value: 2
+ )
+ )
+ 3: Stmt_Nop(
+ comments: array(
+ 0: // The output here drops the loop - would require Error node to handle this
+ )
+ )
+)
+-----
+<?php
+// Can't recover this yet, as the '}' for the inner_statement_list
+// is always required.
+
+$i = 0;
+while (true) {
+ $i = 1;
+ $i = 2;
+-----
+Syntax error, unexpected EOF from 8:12 to 8:12
+-----
+<?php
+$foo->
+;
+-----
+!!positions
+Syntax error, unexpected ';', expecting T_STRING or T_VARIABLE or '{' or '$' from 3:1 to 3:1
+array(
+ 0: Expr_PropertyFetch[2:1 - 3:1](
+ var: Expr_Variable[2:1 - 2:4](
+ name: foo
+ )
+ name: Expr_Error[3:1 - 3:1](
+ )
+ )
+)
+-----
+<?php
+function foo() {
+ $bar->
+}
+-----
+!!positions
+Syntax error, unexpected '}', expecting T_STRING or T_VARIABLE or '{' or '$' from 4:1 to 4:1
+array(
+ 0: Stmt_Function[2:1 - 4:1](
+ byRef: false
+ name: foo
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ 0: Expr_PropertyFetch[3:5 - 4:1](
+ var: Expr_Variable[3:5 - 3:8](
+ name: bar
+ )
+ name: Expr_Error[4:1 - 4:1](
+ )
+ )
+ )
+ )
+)
+-----
+<?php
+new T
+-----
+Syntax error, unexpected EOF from 2:6 to 2:6
+array(
+ 0: Expr_New(
+ class: Name(
+ parts: array(
+ 0: T
+ )
+ )
+ args: array(
+ )
+ )
+)
+-----
+<?php
+new
+-----
+!!php7,positions
+Syntax error, unexpected EOF from 2:4 to 2:4
+array(
+ 0: Expr_New[2:1 - 2:4](
+ class: Expr_Error[2:4 - 2:4](
+ )
+ args: array(
+ )
+ )
+)
+-----
+<?php
+$foo instanceof
+-----
+!!php7
+Syntax error, unexpected EOF from 2:16 to 2:16
+array(
+ 0: Expr_Instanceof(
+ expr: Expr_Variable(
+ name: foo
+ )
+ class: Expr_Error(
+ )
+ )
+)
+-----
+<?php
+$
+-----
+!!php7
+Syntax error, unexpected EOF, expecting T_VARIABLE or '{' or '$' from 2:2 to 2:2
+array(
+ 0: Expr_Variable(
+ name: Expr_Error(
+ )
+ )
+)
+-----
+<?php
+Foo::$
+-----
+!!php7
+Syntax error, unexpected EOF, expecting T_VARIABLE or '{' or '$' from 2:7 to 2:7
+array(
+ 0: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: Foo
+ )
+ )
+ name: Expr_Error(
+ )
+ )
+)
+-----
+<?php
+Foo::
+-----
+!!php7
+Syntax error, unexpected EOF from 2:6 to 2:6
+array(
+ 0: Expr_ClassConstFetch(
+ class: Name(
+ parts: array(
+ 0: Foo
+ )
+ )
+ name: Expr_Error(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/arrayDef.test b/vendor/nikic/php-parser/test/code/parser/expr/arrayDef.test
new file mode 100644
index 0000000..28baf26
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/arrayDef.test
@@ -0,0 +1,142 @@
+Array definitions
+-----
+<?php
+
+array();
+array('a');
+array('a', );
+array('a', 'b');
+array('a', &$b, 'c' => 'd', 'e' => &$f);
+
+// short array syntax
+[];
+[1, 2, 3];
+['a' => 'b'];
+-----
+array(
+ 0: Expr_Array(
+ items: array(
+ )
+ )
+ 1: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: a
+ )
+ byRef: false
+ )
+ )
+ )
+ 2: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: a
+ )
+ byRef: false
+ )
+ )
+ )
+ 3: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: a
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: b
+ )
+ byRef: false
+ )
+ )
+ )
+ 4: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: a
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: true
+ )
+ 2: Expr_ArrayItem(
+ key: Scalar_String(
+ value: c
+ )
+ value: Scalar_String(
+ value: d
+ )
+ byRef: false
+ )
+ 3: Expr_ArrayItem(
+ key: Scalar_String(
+ value: e
+ )
+ value: Expr_Variable(
+ name: f
+ )
+ byRef: true
+ )
+ )
+ )
+ 5: Expr_Array(
+ items: array(
+ )
+ comments: array(
+ 0: // short array syntax
+ )
+ )
+ 6: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 2
+ )
+ byRef: false
+ )
+ 2: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 3
+ )
+ byRef: false
+ )
+ )
+ )
+ 7: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: Scalar_String(
+ value: a
+ )
+ value: Scalar_String(
+ value: b
+ )
+ byRef: false
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/arrayDestructuring.test b/vendor/nikic/php-parser/test/code/parser/expr/arrayDestructuring.test
new file mode 100644
index 0000000..4ca76b2
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/arrayDestructuring.test
@@ -0,0 +1,144 @@
+Array destructuring
+-----
+<?php
+
+[$a, $b] = [$c, $d];
+[, $a, , , $b, ,] = $foo;
+[, [[$a]], $b] = $bar;
+['a' => $b, 'b' => $a] = $baz;
+-----
+!!php7
+array(
+ 0: Expr_Assign(
+ var: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ )
+ )
+ )
+ expr: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: c
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: d
+ )
+ byRef: false
+ )
+ )
+ )
+ )
+ 1: Expr_Assign(
+ var: Expr_Array(
+ items: array(
+ 0: null
+ 1: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ )
+ 2: null
+ 3: null
+ 4: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ )
+ 5: null
+ )
+ )
+ expr: Expr_Variable(
+ name: foo
+ )
+ )
+ 2: Expr_Assign(
+ var: Expr_Array(
+ items: array(
+ 0: null
+ 1: Expr_ArrayItem(
+ key: null
+ value: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ )
+ )
+ )
+ byRef: false
+ )
+ )
+ )
+ byRef: false
+ )
+ 2: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ )
+ )
+ )
+ expr: Expr_Variable(
+ name: bar
+ )
+ )
+ 3: Expr_Assign(
+ var: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: Scalar_String(
+ value: a
+ )
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: Scalar_String(
+ value: b
+ )
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ )
+ )
+ )
+ expr: Expr_Variable(
+ name: baz
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/assign.test b/vendor/nikic/php-parser/test/code/parser/expr/assign.test
new file mode 100644
index 0000000..1d6b187
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/assign.test
@@ -0,0 +1,301 @@
+Assignments
+-----
+<?php
+// simple assign
+$a = $b;
+
+// combined assign
+$a &= $b;
+$a |= $b;
+$a ^= $b;
+$a .= $b;
+$a /= $b;
+$a -= $b;
+$a %= $b;
+$a *= $b;
+$a += $b;
+$a <<= $b;
+$a >>= $b;
+$a **= $b;
+
+// chained assign
+$a = $b *= $c **= $d;
+
+// by ref assign
+$a =& $b;
+
+// list() assign
+list($a) = $b;
+list($a, , $b) = $c;
+list($a, list(, $c), $d) = $e;
+
+// inc/dec
+++$a;
+$a++;
+--$a;
+$a--;
+-----
+array(
+ 0: Expr_Assign(
+ var: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // simple assign
+ )
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // simple assign
+ )
+ )
+ 1: Expr_AssignOp_BitwiseAnd(
+ var: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // combined assign
+ )
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // combined assign
+ )
+ )
+ 2: Expr_AssignOp_BitwiseOr(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 3: Expr_AssignOp_BitwiseXor(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 4: Expr_AssignOp_Concat(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 5: Expr_AssignOp_Div(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 6: Expr_AssignOp_Minus(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 7: Expr_AssignOp_Mod(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 8: Expr_AssignOp_Mul(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 9: Expr_AssignOp_Plus(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 10: Expr_AssignOp_ShiftLeft(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 11: Expr_AssignOp_ShiftRight(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 12: Expr_AssignOp_Pow(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 13: Expr_Assign(
+ var: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // chained assign
+ )
+ )
+ expr: Expr_AssignOp_Mul(
+ var: Expr_Variable(
+ name: b
+ )
+ expr: Expr_AssignOp_Pow(
+ var: Expr_Variable(
+ name: c
+ )
+ expr: Expr_Variable(
+ name: d
+ )
+ )
+ )
+ comments: array(
+ 0: // chained assign
+ )
+ )
+ 14: Expr_AssignRef(
+ var: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // by ref assign
+ )
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // by ref assign
+ )
+ )
+ 15: Expr_Assign(
+ var: Expr_List(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ )
+ )
+ comments: array(
+ 0: // list() assign
+ )
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // list() assign
+ )
+ )
+ 16: Expr_Assign(
+ var: Expr_List(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ )
+ 1: null
+ 2: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ )
+ )
+ )
+ expr: Expr_Variable(
+ name: c
+ )
+ )
+ 17: Expr_Assign(
+ var: Expr_List(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Expr_List(
+ items: array(
+ 0: null
+ 1: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: c
+ )
+ byRef: false
+ )
+ )
+ )
+ byRef: false
+ )
+ 2: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: d
+ )
+ byRef: false
+ )
+ )
+ )
+ expr: Expr_Variable(
+ name: e
+ )
+ )
+ 18: Expr_PreInc(
+ var: Expr_Variable(
+ name: a
+ )
+ comments: array(
+ 0: // inc/dec
+ )
+ )
+ 19: Expr_PostInc(
+ var: Expr_Variable(
+ name: a
+ )
+ )
+ 20: Expr_PreDec(
+ var: Expr_Variable(
+ name: a
+ )
+ )
+ 21: Expr_PostDec(
+ var: Expr_Variable(
+ name: a
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/assignNewByRef.test b/vendor/nikic/php-parser/test/code/parser/expr/assignNewByRef.test
new file mode 100644
index 0000000..10e1317
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/assignNewByRef.test
@@ -0,0 +1,39 @@
+Assigning new by reference (PHP 5 only)
+-----
+<?php
+$a =& new B;
+-----
+!!php5
+array(
+ 0: Expr_AssignRef(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_New(
+ class: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ args: array(
+ )
+ )
+ )
+)
+-----
+<?php
+$a =& new B;
+-----
+!!php7
+Syntax error, unexpected T_NEW from 2:7 to 2:9
+array(
+ 0: Expr_New(
+ class: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ args: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/cast.test b/vendor/nikic/php-parser/test/code/parser/expr/cast.test
new file mode 100644
index 0000000..3c54ba7
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/cast.test
@@ -0,0 +1,72 @@
+Casts
+-----
+<?php
+(array) $a;
+(bool) $a;
+(boolean) $a;
+(real) $a;
+(double) $a;
+(float) $a;
+(int) $a;
+(integer) $a;
+(object) $a;
+(string) $a;
+(unset) $a;
+-----
+array(
+ 0: Expr_Cast_Array(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 1: Expr_Cast_Bool(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 2: Expr_Cast_Bool(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 3: Expr_Cast_Double(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 4: Expr_Cast_Double(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 5: Expr_Cast_Double(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 6: Expr_Cast_Int(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 7: Expr_Cast_Int(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 8: Expr_Cast_Object(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 9: Expr_Cast_String(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 10: Expr_Cast_Unset(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/clone.test b/vendor/nikic/php-parser/test/code/parser/expr/clone.test
new file mode 100644
index 0000000..6401566
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/clone.test
@@ -0,0 +1,13 @@
+Clone
+-----
+<?php
+
+clone $a;
+-----
+array(
+ 0: Expr_Clone(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/closure.test b/vendor/nikic/php-parser/test/code/parser/expr/closure.test
new file mode 100644
index 0000000..f459b60
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/closure.test
@@ -0,0 +1,142 @@
+Closures
+-----
+<?php
+function($a) { $a; };
+function($a) use($b) {};
+function() use($a, &$b) {};
+function &($a) {};
+static function() {};
+function($a) : array {};
+function() use($a) : \Foo\Bar {};
+-----
+array(
+ 0: Expr_Closure(
+ static: false
+ byRef: false
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ )
+ uses: array(
+ )
+ returnType: null
+ stmts: array(
+ 0: Expr_Variable(
+ name: a
+ )
+ )
+ )
+ 1: Expr_Closure(
+ static: false
+ byRef: false
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ )
+ uses: array(
+ 0: Expr_ClosureUse(
+ var: b
+ byRef: false
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 2: Expr_Closure(
+ static: false
+ byRef: false
+ params: array(
+ )
+ uses: array(
+ 0: Expr_ClosureUse(
+ var: a
+ byRef: false
+ )
+ 1: Expr_ClosureUse(
+ var: b
+ byRef: true
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 3: Expr_Closure(
+ static: false
+ byRef: true
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ )
+ uses: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 4: Expr_Closure(
+ static: true
+ byRef: false
+ params: array(
+ )
+ uses: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 5: Expr_Closure(
+ static: false
+ byRef: false
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ )
+ uses: array(
+ )
+ returnType: array
+ stmts: array(
+ )
+ )
+ 6: Expr_Closure(
+ static: false
+ byRef: false
+ params: array(
+ )
+ uses: array(
+ 0: Expr_ClosureUse(
+ var: a
+ byRef: false
+ )
+ )
+ returnType: Name_FullyQualified(
+ parts: array(
+ 0: Foo
+ 1: Bar
+ )
+ )
+ stmts: array(
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/comparison.test b/vendor/nikic/php-parser/test/code/parser/expr/comparison.test
new file mode 100644
index 0000000..d5b1e35
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/comparison.test
@@ -0,0 +1,107 @@
+Comparison operators
+-----
+<?php
+$a < $b;
+$a <= $b;
+$a > $b;
+$a >= $b;
+$a == $b;
+$a === $b;
+$a != $b;
+$a !== $b;
+$a <=> $b;
+$a instanceof B;
+$a instanceof $b;
+-----
+array(
+ 0: Expr_BinaryOp_Smaller(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 1: Expr_BinaryOp_SmallerOrEqual(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 2: Expr_BinaryOp_Greater(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 3: Expr_BinaryOp_GreaterOrEqual(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 4: Expr_BinaryOp_Equal(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 5: Expr_BinaryOp_Identical(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 6: Expr_BinaryOp_NotEqual(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 7: Expr_BinaryOp_NotIdentical(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 8: Expr_BinaryOp_Spaceship(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 9: Expr_Instanceof(
+ expr: Expr_Variable(
+ name: a
+ )
+ class: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ )
+ 10: Expr_Instanceof(
+ expr: Expr_Variable(
+ name: a
+ )
+ class: Expr_Variable(
+ name: b
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test b/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test
new file mode 100644
index 0000000..3e7a23e
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/constant_expr.test
@@ -0,0 +1,621 @@
+Expressions in static scalar context
+-----
+<?php
+
+const T_1 = 1 << 1;
+const T_2 = 1 / 2;
+const T_3 = 1.5 + 1.5;
+const T_4 = "foo" . "bar";
+const T_5 = (1.5 + 1.5) * 2;
+const T_6 = "foo" . 2 . 3 . 4.0;
+const T_7 = __LINE__;
+const T_8 = <<<ENDOFSTRING
+This is a test string
+ENDOFSTRING;
+const T_9 = ~-1;
+const T_10 = (-1?:1) + (0?2:3);
+const T_11 = 1 && 0;
+const T_12 = 1 and 1;
+const T_13 = 0 || 0;
+const T_14 = 1 or 0;
+const T_15 = 1 xor 1;
+const T_16 = 1 xor 0;
+const T_17 = 1 < 0;
+const T_18 = 0 <= 0;
+const T_19 = 1 > 0;
+const T_20 = 1 >= 0;
+const T_21 = 1 === 1;
+const T_22 = 1 !== 1;
+const T_23 = 0 != "0";
+const T_24 = 1 == "1";
+const T_25 = 1 + 2 * 3;
+const T_26 = "1" + 2 + "3";
+const T_27 = 2 ** 3;
+const T_28 = [1, 2, 3][1];
+const T_29 = 12 - 13;
+const T_30 = 12 ^ 13;
+const T_31 = 12 & 13;
+const T_32 = 12 | 13;
+const T_33 = 12 % 3;
+const T_34 = 100 >> 4;
+const T_35 = !false;
+-----
+array(
+ 0: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_1
+ value: Expr_BinaryOp_ShiftLeft(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ 1: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_2
+ value: Expr_BinaryOp_Div(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 2
+ )
+ )
+ )
+ )
+ )
+ 2: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_3
+ value: Expr_BinaryOp_Plus(
+ left: Scalar_DNumber(
+ value: 1.5
+ )
+ right: Scalar_DNumber(
+ value: 1.5
+ )
+ )
+ )
+ )
+ )
+ 3: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_4
+ value: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: foo
+ )
+ right: Scalar_String(
+ value: bar
+ )
+ )
+ )
+ )
+ )
+ 4: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_5
+ value: Expr_BinaryOp_Mul(
+ left: Expr_BinaryOp_Plus(
+ left: Scalar_DNumber(
+ value: 1.5
+ )
+ right: Scalar_DNumber(
+ value: 1.5
+ )
+ )
+ right: Scalar_LNumber(
+ value: 2
+ )
+ )
+ )
+ )
+ )
+ 5: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_6
+ value: Expr_BinaryOp_Concat(
+ left: Expr_BinaryOp_Concat(
+ left: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: foo
+ )
+ right: Scalar_LNumber(
+ value: 2
+ )
+ )
+ right: Scalar_LNumber(
+ value: 3
+ )
+ )
+ right: Scalar_DNumber(
+ value: 4
+ )
+ )
+ )
+ )
+ )
+ 6: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_7
+ value: Scalar_MagicConst_Line(
+ )
+ )
+ )
+ )
+ 7: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_8
+ value: Scalar_String(
+ value: This is a test string
+ )
+ )
+ )
+ )
+ 8: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_9
+ value: Expr_BitwiseNot(
+ expr: Expr_UnaryMinus(
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ )
+ 9: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_10
+ value: Expr_BinaryOp_Plus(
+ left: Expr_Ternary(
+ cond: Expr_UnaryMinus(
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+ if: null
+ else: Scalar_LNumber(
+ value: 1
+ )
+ )
+ right: Expr_Ternary(
+ cond: Scalar_LNumber(
+ value: 0
+ )
+ if: Scalar_LNumber(
+ value: 2
+ )
+ else: Scalar_LNumber(
+ value: 3
+ )
+ )
+ )
+ )
+ )
+ )
+ 10: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_11
+ value: Expr_BinaryOp_BooleanAnd(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ )
+ )
+ 11: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_12
+ value: Expr_BinaryOp_LogicalAnd(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ 12: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_13
+ value: Expr_BinaryOp_BooleanOr(
+ left: Scalar_LNumber(
+ value: 0
+ )
+ right: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ )
+ )
+ 13: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_14
+ value: Expr_BinaryOp_LogicalOr(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ )
+ )
+ 14: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_15
+ value: Expr_BinaryOp_LogicalXor(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ 15: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_16
+ value: Expr_BinaryOp_LogicalXor(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ )
+ )
+ 16: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_17
+ value: Expr_BinaryOp_Smaller(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ )
+ )
+ 17: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_18
+ value: Expr_BinaryOp_SmallerOrEqual(
+ left: Scalar_LNumber(
+ value: 0
+ )
+ right: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ )
+ )
+ 18: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_19
+ value: Expr_BinaryOp_Greater(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ )
+ )
+ 19: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_20
+ value: Expr_BinaryOp_GreaterOrEqual(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ )
+ )
+ 20: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_21
+ value: Expr_BinaryOp_Identical(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ 21: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_22
+ value: Expr_BinaryOp_NotIdentical(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ 22: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_23
+ value: Expr_BinaryOp_NotEqual(
+ left: Scalar_LNumber(
+ value: 0
+ )
+ right: Scalar_String(
+ value: 0
+ )
+ )
+ )
+ )
+ )
+ 23: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_24
+ value: Expr_BinaryOp_Equal(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Scalar_String(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ 24: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_25
+ value: Expr_BinaryOp_Plus(
+ left: Scalar_LNumber(
+ value: 1
+ )
+ right: Expr_BinaryOp_Mul(
+ left: Scalar_LNumber(
+ value: 2
+ )
+ right: Scalar_LNumber(
+ value: 3
+ )
+ )
+ )
+ )
+ )
+ )
+ 25: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_26
+ value: Expr_BinaryOp_Plus(
+ left: Expr_BinaryOp_Plus(
+ left: Scalar_String(
+ value: 1
+ )
+ right: Scalar_LNumber(
+ value: 2
+ )
+ )
+ right: Scalar_String(
+ value: 3
+ )
+ )
+ )
+ )
+ )
+ 26: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_27
+ value: Expr_BinaryOp_Pow(
+ left: Scalar_LNumber(
+ value: 2
+ )
+ right: Scalar_LNumber(
+ value: 3
+ )
+ )
+ )
+ )
+ )
+ 27: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_28
+ value: Expr_ArrayDimFetch(
+ var: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 2
+ )
+ byRef: false
+ )
+ 2: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 3
+ )
+ byRef: false
+ )
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ 28: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_29
+ value: Expr_BinaryOp_Minus(
+ left: Scalar_LNumber(
+ value: 12
+ )
+ right: Scalar_LNumber(
+ value: 13
+ )
+ )
+ )
+ )
+ )
+ 29: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_30
+ value: Expr_BinaryOp_BitwiseXor(
+ left: Scalar_LNumber(
+ value: 12
+ )
+ right: Scalar_LNumber(
+ value: 13
+ )
+ )
+ )
+ )
+ )
+ 30: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_31
+ value: Expr_BinaryOp_BitwiseAnd(
+ left: Scalar_LNumber(
+ value: 12
+ )
+ right: Scalar_LNumber(
+ value: 13
+ )
+ )
+ )
+ )
+ )
+ 31: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_32
+ value: Expr_BinaryOp_BitwiseOr(
+ left: Scalar_LNumber(
+ value: 12
+ )
+ right: Scalar_LNumber(
+ value: 13
+ )
+ )
+ )
+ )
+ )
+ 32: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_33
+ value: Expr_BinaryOp_Mod(
+ left: Scalar_LNumber(
+ value: 12
+ )
+ right: Scalar_LNumber(
+ value: 3
+ )
+ )
+ )
+ )
+ )
+ 33: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_34
+ value: Expr_BinaryOp_ShiftRight(
+ left: Scalar_LNumber(
+ value: 100
+ )
+ right: Scalar_LNumber(
+ value: 4
+ )
+ )
+ )
+ )
+ )
+ 34: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: T_35
+ value: Expr_BooleanNot(
+ expr: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: false
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test b/vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test
new file mode 100644
index 0000000..ce3fce9
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/errorSuppress.test
@@ -0,0 +1,12 @@
+Error suppression
+-----
+<?php
+@$a;
+-----
+array(
+ 0: Expr_ErrorSuppress(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/exit.test b/vendor/nikic/php-parser/test/code/parser/expr/exit.test
new file mode 100644
index 0000000..8f21e5b
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/exit.test
@@ -0,0 +1,34 @@
+Exit
+-----
+<?php
+exit;
+exit();
+exit('Die!');
+die;
+die();
+die('Exit!');
+-----
+array(
+ 0: Expr_Exit(
+ expr: null
+ )
+ 1: Expr_Exit(
+ expr: null
+ )
+ 2: Expr_Exit(
+ expr: Scalar_String(
+ value: Die!
+ )
+ )
+ 3: Expr_Exit(
+ expr: null
+ )
+ 4: Expr_Exit(
+ expr: null
+ )
+ 5: Expr_Exit(
+ expr: Scalar_String(
+ value: Exit!
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/args.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/args.test
new file mode 100644
index 0000000..6d73520
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/args.test
@@ -0,0 +1,99 @@
+Arguments
+-----
+<?php
+
+f();
+f($a);
+f($a, $b);
+f(&$a);
+f($a, ...$b);
+-----
+array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: f
+ )
+ )
+ args: array(
+ )
+ )
+ 1: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: f
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 2: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: f
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ unpack: false
+ )
+ 1: Arg(
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 3: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: f
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: true
+ unpack: false
+ )
+ )
+ )
+ 4: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: f
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ unpack: false
+ )
+ 1: Arg(
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ unpack: true
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constFetch.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constFetch.test
new file mode 100644
index 0000000..7686d2d
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constFetch.test
@@ -0,0 +1,33 @@
+Constant fetches
+-----
+<?php
+
+A;
+A::B;
+A::class;
+-----
+array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ )
+ 1: Expr_ClassConstFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: B
+ )
+ 2: Expr_ClassConstFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: class
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test
new file mode 100644
index 0000000..682f780
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/constantDeref.test
@@ -0,0 +1,231 @@
+Array/string dereferencing
+-----
+<?php
+
+"abc"[2];
+"abc"[2][0][0];
+
+[1, 2, 3][2];
+[1, 2, 3][2][0][0];
+
+array(1, 2, 3)[2];
+array(1, 2, 3)[2][0][0];
+
+FOO[0];
+Foo::BAR[1];
+$foo::BAR[2][1][0];
+-----
+array(
+ 0: Expr_ArrayDimFetch(
+ var: Scalar_String(
+ value: abc
+ )
+ dim: Scalar_LNumber(
+ value: 2
+ )
+ )
+ 1: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Scalar_String(
+ value: abc
+ )
+ dim: Scalar_LNumber(
+ value: 2
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ 2: Expr_ArrayDimFetch(
+ var: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 2
+ )
+ byRef: false
+ )
+ 2: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 3
+ )
+ byRef: false
+ )
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 2
+ )
+ )
+ 3: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 2
+ )
+ byRef: false
+ )
+ 2: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 3
+ )
+ byRef: false
+ )
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 2
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ 4: Expr_ArrayDimFetch(
+ var: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 2
+ )
+ byRef: false
+ )
+ 2: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 3
+ )
+ byRef: false
+ )
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 2
+ )
+ )
+ 5: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 2
+ )
+ byRef: false
+ )
+ 2: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 3
+ )
+ byRef: false
+ )
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 2
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ 6: Expr_ArrayDimFetch(
+ var: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: FOO
+ )
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ 7: Expr_ArrayDimFetch(
+ var: Expr_ClassConstFetch(
+ class: Name(
+ parts: array(
+ 0: Foo
+ )
+ )
+ name: BAR
+ )
+ dim: Scalar_LNumber(
+ value: 1
+ )
+ )
+ 8: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_ClassConstFetch(
+ class: Expr_Variable(
+ name: foo
+ )
+ name: BAR
+ )
+ dim: Scalar_LNumber(
+ value: 2
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 1
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/funcCall.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/funcCall.test
new file mode 100644
index 0000000..62f69e3
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/funcCall.test
@@ -0,0 +1,132 @@
+Function calls
+-----
+<?php
+
+// function name variations
+a();
+$a();
+${'a'}();
+$$a();
+$$$a();
+$a['b']();
+$a{'b'}();
+$a->b['c']();
+
+// array dereferencing
+a()['b'];
+-----
+array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: a
+ )
+ comments: array(
+ 0: // function name variations
+ )
+ )
+ args: array(
+ )
+ comments: array(
+ 0: // function name variations
+ )
+ )
+ 1: Expr_FuncCall(
+ name: Expr_Variable(
+ name: a
+ )
+ args: array(
+ )
+ )
+ 2: Expr_FuncCall(
+ name: Expr_Variable(
+ name: Scalar_String(
+ value: a
+ )
+ )
+ args: array(
+ )
+ )
+ 3: Expr_FuncCall(
+ name: Expr_Variable(
+ name: Expr_Variable(
+ name: a
+ )
+ )
+ args: array(
+ )
+ )
+ 4: Expr_FuncCall(
+ name: Expr_Variable(
+ name: Expr_Variable(
+ name: Expr_Variable(
+ name: a
+ )
+ )
+ )
+ args: array(
+ )
+ )
+ 5: Expr_FuncCall(
+ name: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ args: array(
+ )
+ )
+ 6: Expr_FuncCall(
+ name: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ args: array(
+ )
+ )
+ 7: Expr_FuncCall(
+ name: Expr_ArrayDimFetch(
+ var: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ name: b
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ args: array(
+ )
+ )
+ 8: Expr_ArrayDimFetch(
+ var: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: a
+ )
+ comments: array(
+ 0: // array dereferencing
+ )
+ )
+ args: array(
+ )
+ comments: array(
+ 0: // array dereferencing
+ )
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ comments: array(
+ 0: // array dereferencing
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test
new file mode 100644
index 0000000..5e36ff8
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/newDeref.test
@@ -0,0 +1,70 @@
+New expression dereferencing
+-----
+<?php
+
+(new A)->b;
+(new A)->b();
+(new A)['b'];
+(new A)['b']['c'];
+-----
+array(
+ 0: Expr_PropertyFetch(
+ var: Expr_New(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ args: array(
+ )
+ )
+ name: b
+ )
+ 1: Expr_MethodCall(
+ var: Expr_New(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ args: array(
+ )
+ )
+ name: b
+ args: array(
+ )
+ )
+ 2: Expr_ArrayDimFetch(
+ var: Expr_New(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ args: array(
+ )
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ 3: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_New(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ args: array(
+ )
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test
new file mode 100644
index 0000000..584461b
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/objectAccess.test
@@ -0,0 +1,145 @@
+Object access
+-----
+<?php
+
+// property fetch variations
+$a->b;
+$a->b['c'];
+$a->b{'c'};
+
+// method call variations
+$a->b();
+$a->{'b'}();
+$a->$b();
+$a->$b['c']();
+
+// array dereferencing
+$a->b()['c'];
+$a->b(){'c'}; // invalid PHP: drop Support?
+-----
+!!php5
+array(
+ 0: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // property fetch variations
+ )
+ )
+ name: b
+ comments: array(
+ 0: // property fetch variations
+ )
+ )
+ 1: Expr_ArrayDimFetch(
+ var: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ name: b
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ 2: Expr_ArrayDimFetch(
+ var: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ name: b
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ 3: Expr_MethodCall(
+ var: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // method call variations
+ )
+ )
+ name: b
+ args: array(
+ )
+ comments: array(
+ 0: // method call variations
+ )
+ )
+ 4: Expr_MethodCall(
+ var: Expr_Variable(
+ name: a
+ )
+ name: Scalar_String(
+ value: b
+ )
+ args: array(
+ )
+ )
+ 5: Expr_MethodCall(
+ var: Expr_Variable(
+ name: a
+ )
+ name: Expr_Variable(
+ name: b
+ )
+ args: array(
+ )
+ )
+ 6: Expr_MethodCall(
+ var: Expr_Variable(
+ name: a
+ )
+ name: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: b
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ args: array(
+ )
+ )
+ 7: Expr_ArrayDimFetch(
+ var: Expr_MethodCall(
+ var: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // array dereferencing
+ )
+ )
+ name: b
+ args: array(
+ )
+ comments: array(
+ 0: // array dereferencing
+ )
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ comments: array(
+ 0: // array dereferencing
+ )
+ )
+ 8: Expr_ArrayDimFetch(
+ var: Expr_MethodCall(
+ var: Expr_Variable(
+ name: a
+ )
+ name: b
+ args: array(
+ )
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ 9: Stmt_Nop(
+ comments: array(
+ 0: // invalid PHP: drop Support?
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test
new file mode 100644
index 0000000..ea3f9ef
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test
@@ -0,0 +1,62 @@
+Simple array access
+-----
+<?php
+
+$a['b'];
+$a['b']['c'];
+$a[] = $b;
+$a{'b'};
+${$a}['b'];
+-----
+array(
+ 0: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ 1: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ 2: Expr_Assign(
+ var: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ dim: null
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ 3: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ 4: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: Expr_Variable(
+ name: a
+ )
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticCall.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticCall.test
new file mode 100644
index 0000000..b806f7d
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticCall.test
@@ -0,0 +1,173 @@
+Static calls
+-----
+<?php
+
+// method name variations
+A::b();
+A::{'b'}();
+A::$b();
+A::$b['c']();
+A::$b['c']['d']();
+
+// array dereferencing
+A::b()['c'];
+
+// class name variations
+static::b();
+$a::b();
+${'a'}::b();
+$a['b']::c();
+-----
+!!php5
+array(
+ 0: Expr_StaticCall(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ comments: array(
+ 0: // method name variations
+ )
+ )
+ name: b
+ args: array(
+ )
+ comments: array(
+ 0: // method name variations
+ )
+ )
+ 1: Expr_StaticCall(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: Scalar_String(
+ value: b
+ )
+ args: array(
+ )
+ )
+ 2: Expr_StaticCall(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: Expr_Variable(
+ name: b
+ )
+ args: array(
+ )
+ )
+ 3: Expr_StaticCall(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: b
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ args: array(
+ )
+ )
+ 4: Expr_StaticCall(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: b
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ dim: Scalar_String(
+ value: d
+ )
+ )
+ args: array(
+ )
+ )
+ 5: Expr_ArrayDimFetch(
+ var: Expr_StaticCall(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ comments: array(
+ 0: // array dereferencing
+ )
+ )
+ name: b
+ args: array(
+ )
+ comments: array(
+ 0: // array dereferencing
+ )
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ comments: array(
+ 0: // array dereferencing
+ )
+ )
+ 6: Expr_StaticCall(
+ class: Name(
+ parts: array(
+ 0: static
+ )
+ comments: array(
+ 0: // class name variations
+ )
+ )
+ name: b
+ args: array(
+ )
+ comments: array(
+ 0: // class name variations
+ )
+ )
+ 7: Expr_StaticCall(
+ class: Expr_Variable(
+ name: a
+ )
+ name: b
+ args: array(
+ )
+ )
+ 8: Expr_StaticCall(
+ class: Expr_Variable(
+ name: Scalar_String(
+ value: a
+ )
+ )
+ name: b
+ args: array(
+ )
+ )
+ 9: Expr_StaticCall(
+ class: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ name: c
+ args: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test
new file mode 100644
index 0000000..3d3cde5
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test
@@ -0,0 +1,91 @@
+Static property fetches
+-----
+<?php
+
+// property name variations
+A::$b;
+A::$$b;
+A::${'b'};
+
+// array access
+A::$b['c'];
+A::$b{'c'};
+
+// class name variations can be found in staticCall.test
+-----
+array(
+ 0: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ comments: array(
+ 0: // property name variations
+ )
+ )
+ name: b
+ comments: array(
+ 0: // property name variations
+ )
+ )
+ 1: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: Expr_Variable(
+ name: b
+ )
+ )
+ 2: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: Scalar_String(
+ value: b
+ )
+ )
+ 3: Expr_ArrayDimFetch(
+ var: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ comments: array(
+ 0: // array access
+ )
+ )
+ name: b
+ comments: array(
+ 0: // array access
+ )
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ comments: array(
+ 0: // array access
+ )
+ )
+ 4: Expr_ArrayDimFetch(
+ var: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: b
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ 5: Stmt_Nop(
+ comments: array(
+ 0: // class name variations can be found in staticCall.test
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/includeAndEval.test b/vendor/nikic/php-parser/test/code/parser/expr/includeAndEval.test
new file mode 100644
index 0000000..8870ea5
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/includeAndEval.test
@@ -0,0 +1,40 @@
+Include and eval
+-----
+<?php
+include 'A.php';
+include_once 'A.php';
+require 'A.php';
+require_once 'A.php';
+eval('A');
+-----
+array(
+ 0: Expr_Include(
+ expr: Scalar_String(
+ value: A.php
+ )
+ type: TYPE_INCLUDE (1)
+ )
+ 1: Expr_Include(
+ expr: Scalar_String(
+ value: A.php
+ )
+ type: TYPE_INCLUDE_ONCE (2)
+ )
+ 2: Expr_Include(
+ expr: Scalar_String(
+ value: A.php
+ )
+ type: TYPE_REQUIRE (3)
+ )
+ 3: Expr_Include(
+ expr: Scalar_String(
+ value: A.php
+ )
+ type: TYPE_REQURE_ONCE (4)
+ )
+ 4: Expr_Eval(
+ expr: Scalar_String(
+ value: A
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test b/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test
new file mode 100644
index 0000000..3a43d0d
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/issetAndEmpty.test
@@ -0,0 +1,75 @@
+isset() and empty()
+-----
+<?php
+isset($a);
+isset($a, $b, $c);
+
+empty($a);
+empty(foo());
+empty(array(1, 2, 3));
+-----
+array(
+ 0: Expr_Isset(
+ vars: array(
+ 0: Expr_Variable(
+ name: a
+ )
+ )
+ )
+ 1: Expr_Isset(
+ vars: array(
+ 0: Expr_Variable(
+ name: a
+ )
+ 1: Expr_Variable(
+ name: b
+ )
+ 2: Expr_Variable(
+ name: c
+ )
+ )
+ )
+ 2: Expr_Empty(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 3: Expr_Empty(
+ expr: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ args: array(
+ )
+ )
+ )
+ 4: Expr_Empty(
+ expr: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 2
+ )
+ byRef: false
+ )
+ 2: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 3
+ )
+ byRef: false
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/listWithKeys.test b/vendor/nikic/php-parser/test/code/parser/expr/listWithKeys.test
new file mode 100644
index 0000000..48e9637
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/listWithKeys.test
@@ -0,0 +1,75 @@
+List destructing with keys
+-----
+<?php
+
+list('a' => $b) = ['a' => 'b'];
+list('a' => list($b => $c), 'd' => $e) = $x;
+-----
+!!php7
+array(
+ 0: Expr_Assign(
+ var: Expr_List(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: Scalar_String(
+ value: a
+ )
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ )
+ )
+ )
+ expr: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: Scalar_String(
+ value: a
+ )
+ value: Scalar_String(
+ value: b
+ )
+ byRef: false
+ )
+ )
+ )
+ )
+ 1: Expr_Assign(
+ var: Expr_List(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: Scalar_String(
+ value: a
+ )
+ value: Expr_List(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: Expr_Variable(
+ name: b
+ )
+ value: Expr_Variable(
+ name: c
+ )
+ byRef: false
+ )
+ )
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: Scalar_String(
+ value: d
+ )
+ value: Expr_Variable(
+ name: e
+ )
+ byRef: false
+ )
+ )
+ )
+ expr: Expr_Variable(
+ name: x
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/logic.test b/vendor/nikic/php-parser/test/code/parser/expr/logic.test
new file mode 100644
index 0000000..b3634e9
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/logic.test
@@ -0,0 +1,159 @@
+Logical operators
+-----
+<?php
+
+// boolean ops
+$a && $b;
+$a || $b;
+!$a;
+!!$a;
+
+// logical ops
+$a and $b;
+$a or $b;
+$a xor $b;
+
+// precedence
+$a && $b || $c && $d;
+$a && ($b || $c) && $d;
+
+$a = $b || $c;
+$a = $b or $c;
+-----
+array(
+ 0: Expr_BinaryOp_BooleanAnd(
+ left: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // boolean ops
+ )
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // boolean ops
+ )
+ )
+ 1: Expr_BinaryOp_BooleanOr(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 2: Expr_BooleanNot(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 3: Expr_BooleanNot(
+ expr: Expr_BooleanNot(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ )
+ 4: Expr_BinaryOp_LogicalAnd(
+ left: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // logical ops
+ )
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // logical ops
+ )
+ )
+ 5: Expr_BinaryOp_LogicalOr(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 6: Expr_BinaryOp_LogicalXor(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 7: Expr_BinaryOp_BooleanOr(
+ left: Expr_BinaryOp_BooleanAnd(
+ left: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // precedence
+ )
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // precedence
+ )
+ )
+ right: Expr_BinaryOp_BooleanAnd(
+ left: Expr_Variable(
+ name: c
+ )
+ right: Expr_Variable(
+ name: d
+ )
+ )
+ comments: array(
+ 0: // precedence
+ )
+ )
+ 8: Expr_BinaryOp_BooleanAnd(
+ left: Expr_BinaryOp_BooleanAnd(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_BinaryOp_BooleanOr(
+ left: Expr_Variable(
+ name: b
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+ )
+ right: Expr_Variable(
+ name: d
+ )
+ )
+ 9: Expr_Assign(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_BinaryOp_BooleanOr(
+ left: Expr_Variable(
+ name: b
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+ )
+ 10: Expr_BinaryOp_LogicalOr(
+ left: Expr_Assign(
+ var: Expr_Variable(
+ name: a
+ )
+ expr: Expr_Variable(
+ name: b
+ )
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/math.test b/vendor/nikic/php-parser/test/code/parser/expr/math.test
new file mode 100644
index 0000000..3c00ebc
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/math.test
@@ -0,0 +1,256 @@
+Mathematical operators
+-----
+<?php
+
+// unary ops
+~$a;
++$a;
+-$a;
+
+// binary ops
+$a & $b;
+$a | $b;
+$a ^ $b;
+$a . $b;
+$a / $b;
+$a - $b;
+$a % $b;
+$a * $b;
+$a + $b;
+$a << $b;
+$a >> $b;
+$a ** $b;
+
+// associativity
+$a * $b * $c;
+$a * ($b * $c);
+
+// precedence
+$a + $b * $c;
+($a + $b) * $c;
+
+// pow is special
+$a ** $b ** $c;
+($a ** $b) ** $c;
+-----
+array(
+ 0: Expr_BitwiseNot(
+ expr: Expr_Variable(
+ name: a
+ )
+ comments: array(
+ 0: // unary ops
+ )
+ )
+ 1: Expr_UnaryPlus(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 2: Expr_UnaryMinus(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 3: Expr_BinaryOp_BitwiseAnd(
+ left: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // binary ops
+ )
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // binary ops
+ )
+ )
+ 4: Expr_BinaryOp_BitwiseOr(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 5: Expr_BinaryOp_BitwiseXor(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 6: Expr_BinaryOp_Concat(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 7: Expr_BinaryOp_Div(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 8: Expr_BinaryOp_Minus(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 9: Expr_BinaryOp_Mod(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 10: Expr_BinaryOp_Mul(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 11: Expr_BinaryOp_Plus(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 12: Expr_BinaryOp_ShiftLeft(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 13: Expr_BinaryOp_ShiftRight(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 14: Expr_BinaryOp_Pow(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ 15: Expr_BinaryOp_Mul(
+ left: Expr_BinaryOp_Mul(
+ left: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // associativity
+ )
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // associativity
+ )
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ comments: array(
+ 0: // associativity
+ )
+ )
+ 16: Expr_BinaryOp_Mul(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_BinaryOp_Mul(
+ left: Expr_Variable(
+ name: b
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+ )
+ 17: Expr_BinaryOp_Plus(
+ left: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // precedence
+ )
+ )
+ right: Expr_BinaryOp_Mul(
+ left: Expr_Variable(
+ name: b
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+ comments: array(
+ 0: // precedence
+ )
+ )
+ 18: Expr_BinaryOp_Mul(
+ left: Expr_BinaryOp_Plus(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+ 19: Expr_BinaryOp_Pow(
+ left: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // pow is special
+ )
+ )
+ right: Expr_BinaryOp_Pow(
+ left: Expr_Variable(
+ name: b
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+ comments: array(
+ 0: // pow is special
+ )
+ )
+ 20: Expr_BinaryOp_Pow(
+ left: Expr_BinaryOp_Pow(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/new.test b/vendor/nikic/php-parser/test/code/parser/expr/new.test
new file mode 100644
index 0000000..a132bbb
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/new.test
@@ -0,0 +1,146 @@
+New
+-----
+<?php
+
+new A;
+new A($b);
+
+// class name variations
+new $a();
+new $a['b']();
+new A::$b();
+// DNCR object access
+new $a->b();
+new $a->b->c();
+new $a->b['c']();
+new $a->b{'c'}();
+
+// test regression introduces by new dereferencing syntax
+(new A);
+-----
+array(
+ 0: Expr_New(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ args: array(
+ )
+ )
+ 1: Expr_New(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 2: Expr_New(
+ class: Expr_Variable(
+ name: a
+ )
+ args: array(
+ )
+ comments: array(
+ 0: // class name variations
+ )
+ )
+ 3: Expr_New(
+ class: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ args: array(
+ )
+ )
+ 4: Expr_New(
+ class: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: b
+ )
+ args: array(
+ )
+ )
+ 5: Expr_New(
+ class: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ name: b
+ )
+ args: array(
+ )
+ comments: array(
+ 0: // DNCR object access
+ )
+ )
+ 6: Expr_New(
+ class: Expr_PropertyFetch(
+ var: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ name: b
+ )
+ name: c
+ )
+ args: array(
+ )
+ )
+ 7: Expr_New(
+ class: Expr_ArrayDimFetch(
+ var: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ name: b
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ args: array(
+ )
+ )
+ 8: Expr_New(
+ class: Expr_ArrayDimFetch(
+ var: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ name: b
+ )
+ dim: Scalar_String(
+ value: c
+ )
+ )
+ args: array(
+ )
+ )
+ 9: Expr_New(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ args: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/newWithoutClass.test b/vendor/nikic/php-parser/test/code/parser/expr/newWithoutClass.test
new file mode 100644
index 0000000..ca7f498
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/newWithoutClass.test
@@ -0,0 +1,23 @@
+New without a class
+-----
+<?php
+new;
+-----
+!!php5
+Syntax error, unexpected ';' from 2:4 to 2:4
+array(
+)
+-----
+<?php
+new;
+-----
+!!php7
+Syntax error, unexpected ';' from 2:4 to 2:4
+array(
+ 0: Expr_New(
+ class: Expr_Error(
+ )
+ args: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/print.test b/vendor/nikic/php-parser/test/code/parser/expr/print.test
new file mode 100644
index 0000000..d07afda
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/print.test
@@ -0,0 +1,12 @@
+Print
+-----
+<?php
+print $a;
+-----
+array(
+ 0: Expr_Print(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/shellExec.test b/vendor/nikic/php-parser/test/code/parser/expr/shellExec.test
new file mode 100644
index 0000000..2304fd9
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/shellExec.test
@@ -0,0 +1,46 @@
+Shell execution
+-----
+<?php
+``;
+`test`;
+`test $A`;
+`test \``;
+`test \"`;
+-----
+array(
+ 0: Expr_ShellExec(
+ parts: array(
+ )
+ )
+ 1: Expr_ShellExec(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: test
+ )
+ )
+ )
+ 2: Expr_ShellExec(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: test
+ )
+ 1: Expr_Variable(
+ name: A
+ )
+ )
+ )
+ 3: Expr_ShellExec(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: test `
+ )
+ )
+ )
+ 4: Expr_ShellExec(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: test \"
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/ternaryAndCoalesce.test b/vendor/nikic/php-parser/test/code/parser/expr/ternaryAndCoalesce.test
new file mode 100644
index 0000000..268935d
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/ternaryAndCoalesce.test
@@ -0,0 +1,149 @@
+Ternary operator
+-----
+<?php
+
+// ternary
+$a ? $b : $c;
+$a ?: $c;
+
+// precedence
+$a ? $b : $c ? $d : $e;
+$a ? $b : ($c ? $d : $e);
+
+// null coalesce
+$a ?? $b;
+$a ?? $b ?? $c;
+$a ?? $b ? $c : $d;
+$a && $b ?? $c;
+-----
+array(
+ 0: Expr_Ternary(
+ cond: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // ternary
+ )
+ )
+ if: Expr_Variable(
+ name: b
+ )
+ else: Expr_Variable(
+ name: c
+ )
+ comments: array(
+ 0: // ternary
+ )
+ )
+ 1: Expr_Ternary(
+ cond: Expr_Variable(
+ name: a
+ )
+ if: null
+ else: Expr_Variable(
+ name: c
+ )
+ )
+ 2: Expr_Ternary(
+ cond: Expr_Ternary(
+ cond: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // precedence
+ )
+ )
+ if: Expr_Variable(
+ name: b
+ )
+ else: Expr_Variable(
+ name: c
+ )
+ comments: array(
+ 0: // precedence
+ )
+ )
+ if: Expr_Variable(
+ name: d
+ )
+ else: Expr_Variable(
+ name: e
+ )
+ comments: array(
+ 0: // precedence
+ )
+ )
+ 3: Expr_Ternary(
+ cond: Expr_Variable(
+ name: a
+ )
+ if: Expr_Variable(
+ name: b
+ )
+ else: Expr_Ternary(
+ cond: Expr_Variable(
+ name: c
+ )
+ if: Expr_Variable(
+ name: d
+ )
+ else: Expr_Variable(
+ name: e
+ )
+ )
+ )
+ 4: Expr_BinaryOp_Coalesce(
+ left: Expr_Variable(
+ name: a
+ comments: array(
+ 0: // null coalesce
+ )
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ comments: array(
+ 0: // null coalesce
+ )
+ )
+ 5: Expr_BinaryOp_Coalesce(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_BinaryOp_Coalesce(
+ left: Expr_Variable(
+ name: b
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+ )
+ 6: Expr_Ternary(
+ cond: Expr_BinaryOp_Coalesce(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ if: Expr_Variable(
+ name: c
+ )
+ else: Expr_Variable(
+ name: d
+ )
+ )
+ 7: Expr_BinaryOp_Coalesce(
+ left: Expr_BinaryOp_BooleanAnd(
+ left: Expr_Variable(
+ name: a
+ )
+ right: Expr_Variable(
+ name: b
+ )
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/globalNonSimpleVarError.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/globalNonSimpleVarError.test
new file mode 100644
index 0000000..c4e4a48
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/globalNonSimpleVarError.test
@@ -0,0 +1,16 @@
+Non-simple variables are forbidden in PHP 7
+-----
+<?php
+global $$foo->bar;
+-----
+!!php7
+Syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' from 2:13 to 2:14
+array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: bar
+ )
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test
new file mode 100644
index 0000000..bb3e7fb
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/indirectCall.test
@@ -0,0 +1,481 @@
+UVS indirect calls
+-----
+<?php
+
+id('var_dump')(1);
+id('id')('var_dump')(2);
+id()()('var_dump')(4);
+id(['udef', 'id'])[1]()('var_dump')(5);
+(function($x) { return $x; })('id')('var_dump')(8);
+($f = function($x = null) use (&$f) {
+ return $x ?: $f;
+})()()()('var_dump')(9);
+[$obj, 'id']()('id')($id)('var_dump')(10);
+'id'()('id')('var_dump')(12);
+('i' . 'd')()('var_dump')(13);
+'\id'('var_dump')(14);
+-----
+!!php7
+array(
+ 0: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: id
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 1: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: id
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: id
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 2
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 2: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: id
+ )
+ )
+ args: array(
+ )
+ )
+ args: array(
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 4
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 3: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_ArrayDimFetch(
+ var: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: id
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: udef
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: id
+ )
+ byRef: false
+ )
+ )
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 1
+ )
+ )
+ args: array(
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 5
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 4: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_Closure(
+ static: false
+ byRef: false
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: x
+ default: null
+ )
+ )
+ uses: array(
+ )
+ returnType: null
+ stmts: array(
+ 0: Stmt_Return(
+ expr: Expr_Variable(
+ name: x
+ )
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: id
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 8
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 5: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_Assign(
+ var: Expr_Variable(
+ name: f
+ )
+ expr: Expr_Closure(
+ static: false
+ byRef: false
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: x
+ default: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: null
+ )
+ )
+ )
+ )
+ )
+ uses: array(
+ 0: Expr_ClosureUse(
+ var: f
+ byRef: true
+ )
+ )
+ returnType: null
+ stmts: array(
+ 0: Stmt_Return(
+ expr: Expr_Ternary(
+ cond: Expr_Variable(
+ name: x
+ )
+ if: null
+ else: Expr_Variable(
+ name: f
+ )
+ )
+ )
+ )
+ )
+ )
+ args: array(
+ )
+ )
+ args: array(
+ )
+ )
+ args: array(
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 9
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 6: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: obj
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: id
+ )
+ byRef: false
+ )
+ )
+ )
+ args: array(
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: id
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Variable(
+ name: id
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 10
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 7: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Scalar_String(
+ value: id
+ )
+ args: array(
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: id
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 12
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 8: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: i
+ )
+ right: Scalar_String(
+ value: d
+ )
+ )
+ args: array(
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 13
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 9: Expr_FuncCall(
+ name: Expr_FuncCall(
+ name: Scalar_String(
+ value: \id
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_String(
+ value: var_dump
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 14
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/isset.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/isset.test
new file mode 100644
index 0000000..35bc8ed
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/isset.test
@@ -0,0 +1,74 @@
+UVS isset() on temporaries
+-----
+<?php
+
+isset(([0, 1] + [])[0]);
+isset(['a' => 'b']->a);
+isset("str"->a);
+-----
+!!php7
+array(
+ 0: Expr_Isset(
+ vars: array(
+ 0: Expr_ArrayDimFetch(
+ var: Expr_BinaryOp_Plus(
+ left: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 0
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ )
+ )
+ )
+ right: Expr_Array(
+ items: array(
+ )
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ )
+ 1: Expr_Isset(
+ vars: array(
+ 0: Expr_PropertyFetch(
+ var: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: Scalar_String(
+ value: a
+ )
+ value: Scalar_String(
+ value: b
+ )
+ byRef: false
+ )
+ )
+ )
+ name: a
+ )
+ )
+ )
+ 2: Expr_Isset(
+ vars: array(
+ 0: Expr_PropertyFetch(
+ var: Scalar_String(
+ value: str
+ )
+ name: a
+ )
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test
new file mode 100644
index 0000000..2c5ba90
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/misc.test
@@ -0,0 +1,109 @@
+Uniform variable syntax in PHP 7 (misc)
+-----
+<?php
+
+A::A[0];
+A::A[0][1][2];
+"string"->length();
+(clone $obj)->b[0](1);
+[0, 1][0] = 1;
+-----
+!!php7
+array(
+ 0: Expr_ArrayDimFetch(
+ var: Expr_ClassConstFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: A
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ 1: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_ClassConstFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: A
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 1
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 2
+ )
+ )
+ 2: Expr_MethodCall(
+ var: Scalar_String(
+ value: string
+ )
+ name: length
+ args: array(
+ )
+ )
+ 3: Expr_FuncCall(
+ name: Expr_ArrayDimFetch(
+ var: Expr_PropertyFetch(
+ var: Expr_Clone(
+ expr: Expr_Variable(
+ name: obj
+ )
+ )
+ name: b
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 4: Expr_Assign(
+ var: Expr_ArrayDimFetch(
+ var: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 0
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Scalar_LNumber(
+ value: 1
+ )
+ byRef: false
+ )
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/new.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/new.test
new file mode 100644
index 0000000..e5f92f9
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/new.test
@@ -0,0 +1,95 @@
+UVS new expressions
+-----
+<?php
+new $className;
+new $array['className'];
+new $array{'className'};
+new $obj->className;
+new Test::$className;
+new $test::$className;
+new $weird[0]->foo::$className;
+-----
+!!php7
+array(
+ 0: Expr_New(
+ class: Expr_Variable(
+ name: className
+ )
+ args: array(
+ )
+ )
+ 1: Expr_New(
+ class: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: array
+ )
+ dim: Scalar_String(
+ value: className
+ )
+ )
+ args: array(
+ )
+ )
+ 2: Expr_New(
+ class: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: array
+ )
+ dim: Scalar_String(
+ value: className
+ )
+ )
+ args: array(
+ )
+ )
+ 3: Expr_New(
+ class: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: obj
+ )
+ name: className
+ )
+ args: array(
+ )
+ )
+ 4: Expr_New(
+ class: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: Test
+ )
+ )
+ name: className
+ )
+ args: array(
+ )
+ )
+ 5: Expr_New(
+ class: Expr_StaticPropertyFetch(
+ class: Expr_Variable(
+ name: test
+ )
+ name: className
+ )
+ args: array(
+ )
+ )
+ 6: Expr_New(
+ class: Expr_StaticPropertyFetch(
+ class: Expr_PropertyFetch(
+ var: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: weird
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ name: foo
+ )
+ name: className
+ )
+ args: array(
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/uvs/staticProperty.test b/vendor/nikic/php-parser/test/code/parser/expr/uvs/staticProperty.test
new file mode 100644
index 0000000..5fadfc4
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/uvs/staticProperty.test
@@ -0,0 +1,93 @@
+UVS static access
+-----
+<?php
+A::$b;
+$A::$b;
+'A'::$b;
+('A' . '')::$b;
+'A'[0]::$b;
+A::$$b;
+A::$$c[1];
+A::$A::$b;
+-----
+!!php7
+array(
+ 0: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: b
+ )
+ 1: Expr_StaticPropertyFetch(
+ class: Expr_Variable(
+ name: A
+ )
+ name: b
+ )
+ 2: Expr_StaticPropertyFetch(
+ class: Scalar_String(
+ value: A
+ )
+ name: b
+ )
+ 3: Expr_StaticPropertyFetch(
+ class: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: A
+ )
+ right: Scalar_String(
+ value:
+ )
+ )
+ name: b
+ )
+ 4: Expr_StaticPropertyFetch(
+ class: Expr_ArrayDimFetch(
+ var: Scalar_String(
+ value: A
+ )
+ dim: Scalar_LNumber(
+ value: 0
+ )
+ )
+ name: b
+ )
+ 5: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: Expr_Variable(
+ name: b
+ )
+ )
+ 6: Expr_ArrayDimFetch(
+ var: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: Expr_Variable(
+ name: c
+ )
+ )
+ dim: Scalar_LNumber(
+ value: 1
+ )
+ )
+ 7: Expr_StaticPropertyFetch(
+ class: Expr_StaticPropertyFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: A
+ )
+ name: b
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/expr/variable.test b/vendor/nikic/php-parser/test/code/parser/expr/variable.test
new file mode 100644
index 0000000..3a709f9
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/expr/variable.test
@@ -0,0 +1,55 @@
+Variable syntaxes
+-----
+<?php
+
+$a;
+${'a'};
+${foo()};
+$$a;
+$$$a;
+$$a['b'];
+-----
+!!php5
+array(
+ 0: Expr_Variable(
+ name: a
+ )
+ 1: Expr_Variable(
+ name: Scalar_String(
+ value: a
+ )
+ )
+ 2: Expr_Variable(
+ name: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ args: array(
+ )
+ )
+ )
+ 3: Expr_Variable(
+ name: Expr_Variable(
+ name: a
+ )
+ )
+ 4: Expr_Variable(
+ name: Expr_Variable(
+ name: Expr_Variable(
+ name: a
+ )
+ )
+ )
+ 5: Expr_Variable(
+ name: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: a
+ )
+ dim: Scalar_String(
+ value: b
+ )
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/constantString.test b/vendor/nikic/php-parser/test/code/parser/scalar/constantString.test
new file mode 100644
index 0000000..3f80df4
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/scalar/constantString.test
@@ -0,0 +1,60 @@
+Constant string syntaxes
+-----
+<?php
+
+'';
+"";
+b'';
+b"";
+'Hi';
+b'Hi';
+B'Hi';
+"Hi";
+b"Hi";
+B"Hi";
+'!\'!\\!\a!';
+"!\"!\\!\$!\n!\r!\t!\f!\v!\e!\a";
+"!\xFF!\377!\400!\0!";
+-----
+array(
+ 0: Scalar_String(
+ value:
+ )
+ 1: Scalar_String(
+ value:
+ )
+ 2: Scalar_String(
+ value:
+ )
+ 3: Scalar_String(
+ value:
+ )
+ 4: Scalar_String(
+ value: Hi
+ )
+ 5: Scalar_String(
+ value: Hi
+ )
+ 6: Scalar_String(
+ value: Hi
+ )
+ 7: Scalar_String(
+ value: Hi
+ )
+ 8: Scalar_String(
+ value: Hi
+ )
+ 9: Scalar_String(
+ value: Hi
+ )
+ 10: Scalar_String(
+ value: !'!\!\a!
+ )
+ 11: Scalar_String(
+ value: !"!\!$!
+ !@@{ "\r" }@@!@@{ "\t" }@@!@@{ "\f" }@@!@@{ "\v" }@@!@@{ chr(27) /* "\e" */ }@@!\a
+ )
+ 12: Scalar_String(
+ value: !@@{ chr(255) }@@!@@{ chr(255) }@@!@@{ chr(0) }@@!@@{ chr(0) }@@!
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/docString.test b/vendor/nikic/php-parser/test/code/parser/scalar/docString.test
new file mode 100644
index 0000000..e1b1420
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/scalar/docString.test
@@ -0,0 +1,90 @@
+Nowdoc and heredoc strings
+-----
+<?php
+
+// empty strings
+<<<'EOS'
+EOS;
+<<<EOS
+EOS;
+
+// constant encapsed strings
+<<<'EOS'
+Test '" $a \n
+EOS;
+<<<EOS
+Test '" \$a \n
+EOS;
+
+// encapsed strings
+<<<EOS
+Test $a
+EOS;
+<<<EOS
+Test $a and $b->c test
+EOS;
+
+b<<<EOS
+Binary
+EOS;
+
+-----
+array(
+ 0: Scalar_String(
+ value:
+ comments: array(
+ 0: // empty strings
+ )
+ )
+ 1: Scalar_String(
+ value:
+ )
+ 2: Scalar_String(
+ value: Test '" $a \n
+ comments: array(
+ 0: // constant encapsed strings
+ )
+ )
+ 3: Scalar_String(
+ value: Test '" $a
+
+ )
+ 4: Scalar_Encapsed(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: Test
+ )
+ 1: Expr_Variable(
+ name: a
+ )
+ )
+ comments: array(
+ 0: // encapsed strings
+ )
+ )
+ 5: Scalar_Encapsed(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: Test
+ )
+ 1: Expr_Variable(
+ name: a
+ )
+ 2: Scalar_EncapsedStringPart(
+ value: and
+ )
+ 3: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: b
+ )
+ name: c
+ )
+ 4: Scalar_EncapsedStringPart(
+ value: test
+ )
+ )
+ )
+ 6: Scalar_String(
+ value: Binary
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/docStringNewlines.test b/vendor/nikic/php-parser/test/code/parser/scalar/docStringNewlines.test
new file mode 100644
index 0000000..28b920f
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/scalar/docStringNewlines.test
@@ -0,0 +1,61 @@
+Trailing newlines in doc strings
+-----
+<?php
+
+<<<'EOF'@@{ "\n\n" }@@EOF;
+<<<'EOF'@@{ "\n\n\n" }@@EOF;
+<<<'EOF'@@{ "\nFoo\n\n" }@@EOF;
+<<<EOF@@{ "\n\$var\n\n" }@@EOF;
+
+<<<'EOF'@@{ "\r\n\r\n" }@@EOF;
+<<<'EOF'@@{ "\r\n\r\n\r\n" }@@EOF;
+<<<'EOF'@@{ "\r\nFoo\r\n\r\n" }@@EOF;
+<<<EOF@@{ "\r\n\$var\r\n\r\n" }@@EOF;
+
+-----
+array(
+ 0: Scalar_String(
+ value:
+ )
+ 1: Scalar_String(
+ value:
+
+ )
+ 2: Scalar_String(
+ value: Foo
+
+ )
+ 3: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_Variable(
+ name: var
+ )
+ 1: Scalar_EncapsedStringPart(
+ value:
+
+ )
+ )
+ )
+ 4: Scalar_String(
+ value:
+ )
+ 5: Scalar_String(
+ value:
+
+ )
+ 6: Scalar_String(
+ value: Foo
+
+ )
+ 7: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_Variable(
+ name: var
+ )
+ 1: Scalar_EncapsedStringPart(
+ value:
+
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/encapsedString.test b/vendor/nikic/php-parser/test/code/parser/scalar/encapsedString.test
new file mode 100644
index 0000000..af05567
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/scalar/encapsedString.test
@@ -0,0 +1,242 @@
+Encapsed strings
+-----
+<?php
+
+"$A";
+"$A->B";
+"$A[B]";
+"$A[0]";
+"$A[0x0]";
+"$A[$B]";
+"{$A}";
+"{$A['B']}";
+"${A}";
+"${A['B']}";
+"${$A}";
+"\{$A}";
+"\{ $A }";
+"\\{$A}";
+"\\{ $A }";
+"{$$A}[B]";
+"$$A[B]";
+"A $B C";
+b"$A";
+B"$A";
+-----
+array(
+ 0: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_Variable(
+ name: A
+ )
+ )
+ )
+ 1: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: A
+ )
+ name: B
+ )
+ )
+ )
+ 2: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: A
+ )
+ dim: Scalar_String(
+ value: B
+ )
+ )
+ )
+ )
+ 3: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: A
+ )
+ dim: Scalar_String(
+ value: 0
+ )
+ )
+ )
+ )
+ 4: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: A
+ )
+ dim: Scalar_String(
+ value: 0x0
+ )
+ )
+ )
+ )
+ 5: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: A
+ )
+ dim: Expr_Variable(
+ name: B
+ )
+ )
+ )
+ )
+ 6: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_Variable(
+ name: A
+ )
+ )
+ )
+ 7: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: A
+ )
+ dim: Scalar_String(
+ value: B
+ )
+ )
+ )
+ )
+ 8: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_Variable(
+ name: A
+ )
+ )
+ )
+ 9: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: A
+ )
+ dim: Scalar_String(
+ value: B
+ )
+ )
+ )
+ )
+ 10: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_Variable(
+ name: Expr_Variable(
+ name: A
+ )
+ )
+ )
+ )
+ 11: Scalar_Encapsed(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: \{
+ )
+ 1: Expr_Variable(
+ name: A
+ )
+ 2: Scalar_EncapsedStringPart(
+ value: }
+ )
+ )
+ )
+ 12: Scalar_Encapsed(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: \{
+ )
+ 1: Expr_Variable(
+ name: A
+ )
+ 2: Scalar_EncapsedStringPart(
+ value: }
+ )
+ )
+ )
+ 13: Scalar_Encapsed(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: \
+ )
+ 1: Expr_Variable(
+ name: A
+ )
+ )
+ )
+ 14: Scalar_Encapsed(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: \{
+ )
+ 1: Expr_Variable(
+ name: A
+ )
+ 2: Scalar_EncapsedStringPart(
+ value: }
+ )
+ )
+ )
+ 15: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_Variable(
+ name: Expr_Variable(
+ name: A
+ )
+ )
+ 1: Scalar_EncapsedStringPart(
+ value: [B]
+ )
+ )
+ )
+ 16: Scalar_Encapsed(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: $
+ )
+ 1: Expr_ArrayDimFetch(
+ var: Expr_Variable(
+ name: A
+ )
+ dim: Scalar_String(
+ value: B
+ )
+ )
+ )
+ )
+ 17: Scalar_Encapsed(
+ parts: array(
+ 0: Scalar_EncapsedStringPart(
+ value: A
+ )
+ 1: Expr_Variable(
+ name: B
+ )
+ 2: Scalar_EncapsedStringPart(
+ value: C
+ )
+ )
+ )
+ 18: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_Variable(
+ name: A
+ )
+ )
+ )
+ 19: Scalar_Encapsed(
+ parts: array(
+ 0: Expr_Variable(
+ name: A
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/float.test b/vendor/nikic/php-parser/test/code/parser/scalar/float.test
new file mode 100644
index 0000000..a16028e
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/scalar/float.test
@@ -0,0 +1,74 @@
+Different float syntaxes
+-----
+<?php
+
+0.0;
+0.;
+.0;
+0e0;
+0E0;
+0e+0;
+0e-0;
+30.20e10;
+300.200e100;
+1e10000;
+
+// various integer -> float overflows
+// (all are actually the same number, just in different representations)
+18446744073709551615;
+0xFFFFFFFFFFFFFFFF;
+01777777777777777777777;
+0177777777777777777777787;
+0b1111111111111111111111111111111111111111111111111111111111111111;
+-----
+array(
+ 0: Scalar_DNumber(
+ value: 0
+ )
+ 1: Scalar_DNumber(
+ value: 0
+ )
+ 2: Scalar_DNumber(
+ value: 0
+ )
+ 3: Scalar_DNumber(
+ value: 0
+ )
+ 4: Scalar_DNumber(
+ value: 0
+ )
+ 5: Scalar_DNumber(
+ value: 0
+ )
+ 6: Scalar_DNumber(
+ value: 0
+ )
+ 7: Scalar_DNumber(
+ value: 302000000000
+ )
+ 8: Scalar_DNumber(
+ value: 3.002E+102
+ )
+ 9: Scalar_DNumber(
+ value: INF
+ )
+ 10: Scalar_DNumber(
+ value: 1.844674407371E+19
+ comments: array(
+ 0: // various integer -> float overflows
+ 1: // (all are actually the same number, just in different representations)
+ )
+ )
+ 11: Scalar_DNumber(
+ value: 1.844674407371E+19
+ )
+ 12: Scalar_DNumber(
+ value: 1.844674407371E+19
+ )
+ 13: Scalar_DNumber(
+ value: 1.844674407371E+19
+ )
+ 14: Scalar_DNumber(
+ value: 1.844674407371E+19
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/int.test b/vendor/nikic/php-parser/test/code/parser/scalar/int.test
new file mode 100644
index 0000000..5a21267
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/scalar/int.test
@@ -0,0 +1,43 @@
+Different integer syntaxes
+-----
+<?php
+
+0;
+1;
+@@{ PHP_INT_MAX }@@;
+@@{ PHP_INT_MAX + 1 }@@;
+0xFFF;
+0xfff;
+0XfFf;
+0777;
+0b111000111000;
+-----
+array(
+ 0: Scalar_LNumber(
+ value: 0
+ )
+ 1: Scalar_LNumber(
+ value: 1
+ )
+ 2: Scalar_LNumber(
+ value: @@{ PHP_INT_MAX }@@
+ )
+ 3: Scalar_DNumber(
+ value: @@{ PHP_INT_MAX + 1 }@@
+ )
+ 4: Scalar_LNumber(
+ value: 4095
+ )
+ 5: Scalar_LNumber(
+ value: 4095
+ )
+ 6: Scalar_LNumber(
+ value: 4095
+ )
+ 7: Scalar_LNumber(
+ value: 511
+ )
+ 8: Scalar_LNumber(
+ value: 3640
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/invalidOctal.test b/vendor/nikic/php-parser/test/code/parser/scalar/invalidOctal.test
new file mode 100644
index 0000000..bef3061
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/scalar/invalidOctal.test
@@ -0,0 +1,22 @@
+Invalid octal literals
+-----
+<?php
+0787;
+-----
+!!php7
+Invalid numeric literal from 2:1 to 2:4
+array(
+ 0: Scalar_LNumber(
+ value: 0
+ )
+)
+-----
+<?php
+0787;
+-----
+!!php5
+array(
+ 0: Scalar_LNumber(
+ value: 7
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/magicConst.test b/vendor/nikic/php-parser/test/code/parser/scalar/magicConst.test
new file mode 100644
index 0000000..9b981eb
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/scalar/magicConst.test
@@ -0,0 +1,31 @@
+Magic constants
+-----
+<?php
+
+__CLASS__;
+__DIR__;
+__FILE__;
+__FUNCTION__;
+__LINE__;
+__METHOD__;
+__NAMESPACE__;
+__TRAIT__;
+-----
+array(
+ 0: Scalar_MagicConst_Class(
+ )
+ 1: Scalar_MagicConst_Dir(
+ )
+ 2: Scalar_MagicConst_File(
+ )
+ 3: Scalar_MagicConst_Function(
+ )
+ 4: Scalar_MagicConst_Line(
+ )
+ 5: Scalar_MagicConst_Method(
+ )
+ 6: Scalar_MagicConst_Namespace(
+ )
+ 7: Scalar_MagicConst_Trait(
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/scalar/unicodeEscape.test b/vendor/nikic/php-parser/test/code/parser/scalar/unicodeEscape.test
new file mode 100644
index 0000000..33a9611
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/scalar/unicodeEscape.test
@@ -0,0 +1,20 @@
+Unicode escape sequence
+-----
+<?php
+
+"\u{0}";
+"\u{114}";
+"\u{1F602}";
+-----
+!!php7
+array(
+ 0: Scalar_String(
+ value: @@{"\0"}@@
+ )
+ 1: Scalar_String(
+ value: Ä”
+ )
+ 2: Scalar_String(
+ value: @@{"\xF0\x9F\x98\x82"}@@
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/semiReserved.test b/vendor/nikic/php-parser/test/code/parser/semiReserved.test
new file mode 100644
index 0000000..3410530
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/semiReserved.test
@@ -0,0 +1,382 @@
+Valid usages of reserved keywords as identifiers
+-----
+<?php
+
+class Test {
+ function array() {}
+ function public() {}
+
+ static function list() {}
+ static function protected() {}
+
+ public $class;
+ public $private;
+
+ const TRAIT = 3, FINAL = 4;
+
+ const __CLASS__ = 1, __TRAIT__ = 2, __FUNCTION__ = 3, __METHOD__ = 4, __LINE__ = 5,
+ __FILE__ = 6, __DIR__ = 7, __NAMESPACE__ = 8;
+ // __halt_compiler does not work
+}
+
+$t = new Test;
+$t->array();
+$t->public();
+
+Test::list();
+Test::protected();
+
+$t->class;
+$t->private;
+
+Test::TRAIT;
+Test::FINAL;
+
+class Foo {
+ use TraitA, TraitB {
+ TraitA::catch insteadof namespace\TraitB;
+ TraitA::list as foreach;
+ TraitB::throw as protected public;
+ TraitB::self as protected;
+ exit as die;
+ \TraitC::exit as bye;
+ namespace\TraitC::exit as byebye;
+ TraitA::
+ //
+ /** doc comment */
+ #
+ catch /* comment */
+ // comment
+ # comment
+ insteadof TraitB;
+ }
+}
+-----
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: Test
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: 0
+ byRef: false
+ name: array
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 1: Stmt_ClassMethod(
+ flags: 0
+ byRef: false
+ name: public
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 2: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC (8)
+ byRef: false
+ name: list
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 3: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC (8)
+ byRef: false
+ name: protected
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 4: Stmt_Property(
+ flags: MODIFIER_PUBLIC (1)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: class
+ default: null
+ )
+ )
+ )
+ 5: Stmt_Property(
+ flags: MODIFIER_PUBLIC (1)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: private
+ default: null
+ )
+ )
+ )
+ 6: Stmt_ClassConst(
+ flags: 0
+ consts: array(
+ 0: Const(
+ name: TRAIT
+ value: Scalar_LNumber(
+ value: 3
+ )
+ )
+ 1: Const(
+ name: FINAL
+ value: Scalar_LNumber(
+ value: 4
+ )
+ )
+ )
+ )
+ 7: Stmt_ClassConst(
+ flags: 0
+ consts: array(
+ 0: Const(
+ name: __CLASS__
+ value: Scalar_LNumber(
+ value: 1
+ )
+ )
+ 1: Const(
+ name: __TRAIT__
+ value: Scalar_LNumber(
+ value: 2
+ )
+ )
+ 2: Const(
+ name: __FUNCTION__
+ value: Scalar_LNumber(
+ value: 3
+ )
+ )
+ 3: Const(
+ name: __METHOD__
+ value: Scalar_LNumber(
+ value: 4
+ )
+ )
+ 4: Const(
+ name: __LINE__
+ value: Scalar_LNumber(
+ value: 5
+ )
+ )
+ 5: Const(
+ name: __FILE__
+ value: Scalar_LNumber(
+ value: 6
+ )
+ )
+ 6: Const(
+ name: __DIR__
+ value: Scalar_LNumber(
+ value: 7
+ )
+ )
+ 7: Const(
+ name: __NAMESPACE__
+ value: Scalar_LNumber(
+ value: 8
+ )
+ )
+ )
+ )
+ )
+ )
+ 1: Expr_Assign(
+ var: Expr_Variable(
+ name: t
+ )
+ expr: Expr_New(
+ class: Name(
+ parts: array(
+ 0: Test
+ )
+ )
+ args: array(
+ )
+ )
+ )
+ 2: Expr_MethodCall(
+ var: Expr_Variable(
+ name: t
+ )
+ name: array
+ args: array(
+ )
+ )
+ 3: Expr_MethodCall(
+ var: Expr_Variable(
+ name: t
+ )
+ name: public
+ args: array(
+ )
+ )
+ 4: Expr_StaticCall(
+ class: Name(
+ parts: array(
+ 0: Test
+ )
+ )
+ name: list
+ args: array(
+ )
+ )
+ 5: Expr_StaticCall(
+ class: Name(
+ parts: array(
+ 0: Test
+ )
+ )
+ name: protected
+ args: array(
+ )
+ )
+ 6: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: t
+ )
+ name: class
+ )
+ 7: Expr_PropertyFetch(
+ var: Expr_Variable(
+ name: t
+ )
+ name: private
+ )
+ 8: Expr_ClassConstFetch(
+ class: Name(
+ parts: array(
+ 0: Test
+ )
+ )
+ name: TRAIT
+ )
+ 9: Expr_ClassConstFetch(
+ class: Name(
+ parts: array(
+ 0: Test
+ )
+ )
+ name: FINAL
+ )
+ 10: Stmt_Class(
+ flags: 0
+ name: Foo
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_TraitUse(
+ traits: array(
+ 0: Name(
+ parts: array(
+ 0: TraitA
+ )
+ )
+ 1: Name(
+ parts: array(
+ 0: TraitB
+ )
+ )
+ )
+ adaptations: array(
+ 0: Stmt_TraitUseAdaptation_Precedence(
+ trait: Name(
+ parts: array(
+ 0: TraitA
+ )
+ )
+ method: catch
+ insteadof: array(
+ 0: Name_Relative(
+ parts: array(
+ 0: TraitB
+ )
+ )
+ )
+ )
+ 1: Stmt_TraitUseAdaptation_Alias(
+ trait: Name(
+ parts: array(
+ 0: TraitA
+ )
+ )
+ method: list
+ newModifier: null
+ newName: foreach
+ )
+ 2: Stmt_TraitUseAdaptation_Alias(
+ trait: Name(
+ parts: array(
+ 0: TraitB
+ )
+ )
+ method: throw
+ newModifier: MODIFIER_PROTECTED (2)
+ newName: public
+ )
+ 3: Stmt_TraitUseAdaptation_Alias(
+ trait: Name(
+ parts: array(
+ 0: TraitB
+ )
+ )
+ method: self
+ newModifier: MODIFIER_PROTECTED (2)
+ newName: null
+ )
+ 4: Stmt_TraitUseAdaptation_Alias(
+ trait: null
+ method: exit
+ newModifier: null
+ newName: die
+ )
+ 5: Stmt_TraitUseAdaptation_Alias(
+ trait: Name_FullyQualified(
+ parts: array(
+ 0: TraitC
+ )
+ )
+ method: exit
+ newModifier: null
+ newName: bye
+ )
+ 6: Stmt_TraitUseAdaptation_Alias(
+ trait: Name_Relative(
+ parts: array(
+ 0: TraitC
+ )
+ )
+ method: exit
+ newModifier: null
+ newName: byebye
+ )
+ 7: Stmt_TraitUseAdaptation_Precedence(
+ trait: Name(
+ parts: array(
+ 0: TraitA
+ )
+ )
+ method: catch
+ insteadof: array(
+ 0: Name(
+ parts: array(
+ 0: TraitB
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test b/vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test
new file mode 100644
index 0000000..ae83dab
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/blocklessStatement.test
@@ -0,0 +1,112 @@
+Blockless statements for if/for/etc
+-----
+<?php
+
+if ($a) $A;
+elseif ($b) $B;
+else $C;
+
+for (;;) $foo;
+
+foreach ($a as $b) $AB;
+
+while ($a) $A;
+
+do $A; while ($a);
+
+declare (a='b') $C;
+-----
+array(
+ 0: Stmt_If(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ 0: Expr_Variable(
+ name: A
+ )
+ )
+ elseifs: array(
+ 0: Stmt_ElseIf(
+ cond: Expr_Variable(
+ name: b
+ )
+ stmts: array(
+ 0: Expr_Variable(
+ name: B
+ )
+ )
+ )
+ )
+ else: Stmt_Else(
+ stmts: array(
+ 0: Expr_Variable(
+ name: C
+ )
+ )
+ )
+ )
+ 1: Stmt_For(
+ init: array(
+ )
+ cond: array(
+ )
+ loop: array(
+ )
+ stmts: array(
+ 0: Expr_Variable(
+ name: foo
+ )
+ )
+ )
+ 2: Stmt_Foreach(
+ expr: Expr_Variable(
+ name: a
+ )
+ keyVar: null
+ byRef: false
+ valueVar: Expr_Variable(
+ name: b
+ )
+ stmts: array(
+ 0: Expr_Variable(
+ name: AB
+ )
+ )
+ )
+ 3: Stmt_While(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ 0: Expr_Variable(
+ name: A
+ )
+ )
+ )
+ 4: Stmt_Do(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ 0: Expr_Variable(
+ name: A
+ )
+ )
+ )
+ 5: Stmt_Declare(
+ declares: array(
+ 0: Stmt_DeclareDeclare(
+ key: a
+ value: Scalar_String(
+ value: b
+ )
+ )
+ )
+ stmts: array(
+ 0: Expr_Variable(
+ name: C
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/abstract.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/abstract.test
new file mode 100644
index 0000000..8c9a99c
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/abstract.test
@@ -0,0 +1,39 @@
+Abstract class
+-----
+<?php
+
+abstract class A {
+ public function a() {}
+ abstract public function b();
+}
+-----
+array(
+ 0: Stmt_Class(
+ flags: MODIFIER_ABSTRACT (16)
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_PUBLIC (1)
+ byRef: false
+ name: a
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 1: Stmt_ClassMethod(
+ flags: MODIFIER_PUBLIC | MODIFIER_ABSTRACT (17)
+ byRef: false
+ name: b
+ params: array(
+ )
+ returnType: null
+ stmts: null
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/anonymous.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/anonymous.test
new file mode 100644
index 0000000..266d943
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/anonymous.test
@@ -0,0 +1,195 @@
+Anonymous classes
+-----
+<?php
+
+new class {
+ public function test() {}
+};
+new class extends A implements B, C {};
+new class() {
+ public $foo;
+};
+new class($a, $b) extends A {
+ use T;
+};
+
+class A {
+ public function test() {
+ return new class($this) extends A {
+ const A = 'B';
+ };
+ }
+}
+-----
+array(
+ 0: Expr_New(
+ class: Stmt_Class(
+ flags: 0
+ name: null
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_PUBLIC (1)
+ byRef: false
+ name: test
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+ args: array(
+ )
+ )
+ 1: Expr_New(
+ class: Stmt_Class(
+ flags: 0
+ name: null
+ extends: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ implements: array(
+ 0: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ 1: Name(
+ parts: array(
+ 0: C
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+ args: array(
+ )
+ )
+ 2: Expr_New(
+ class: Stmt_Class(
+ flags: 0
+ name: null
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_Property(
+ flags: MODIFIER_PUBLIC (1)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: foo
+ default: null
+ )
+ )
+ )
+ )
+ )
+ args: array(
+ )
+ )
+ 3: Expr_New(
+ class: Stmt_Class(
+ flags: 0
+ name: null
+ extends: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_TraitUse(
+ traits: array(
+ 0: Name(
+ parts: array(
+ 0: T
+ )
+ )
+ )
+ adaptations: array(
+ )
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ unpack: false
+ )
+ 1: Arg(
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 4: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_PUBLIC (1)
+ byRef: false
+ name: test
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ 0: Stmt_Return(
+ expr: Expr_New(
+ class: Stmt_Class(
+ flags: 0
+ name: null
+ extends: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassConst(
+ flags: 0
+ consts: array(
+ 0: Const(
+ name: A
+ value: Scalar_String(
+ value: B
+ )
+ )
+ )
+ )
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Variable(
+ name: this
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/conditional.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/conditional.test
new file mode 100644
index 0000000..e18090c
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/conditional.test
@@ -0,0 +1,33 @@
+Conditional class definition
+-----
+<?php
+
+if (true) {
+ class A {}
+}
+-----
+array(
+ 0: Stmt_If(
+ cond: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: true
+ )
+ )
+ )
+ stmts: array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ )
+ )
+ )
+ elseifs: array(
+ )
+ else: null
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/constModifierErrors.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/constModifierErrors.test
new file mode 100644
index 0000000..b3604ed
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/constModifierErrors.test
@@ -0,0 +1,121 @@
+Invalid class constant modifiers
+-----
+<?php
+class A {
+ static const X = 1;
+}
+-----
+!!php7
+Cannot use 'static' as constant modifier from 3:5 to 3:10
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassConst(
+ flags: MODIFIER_STATIC (8)
+ consts: array(
+ 0: Const(
+ name: X
+ value: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ )
+)
+-----
+<?php
+class A {
+ abstract const X = 1;
+}
+-----
+!!php7
+Cannot use 'abstract' as constant modifier from 3:5 to 3:12
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassConst(
+ flags: MODIFIER_ABSTRACT (16)
+ consts: array(
+ 0: Const(
+ name: X
+ value: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ )
+)
+-----
+<?php
+class A {
+ final const X = 1;
+}
+-----
+!!php7
+Cannot use 'final' as constant modifier from 3:5 to 3:9
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassConst(
+ flags: MODIFIER_FINAL (32)
+ consts: array(
+ 0: Const(
+ name: X
+ value: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ )
+)
+-----
+<?php
+class A {
+ public public const X = 1;
+}
+-----
+!!php7
+Multiple access type modifiers are not allowed from 3:12 to 3:17
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassConst(
+ flags: MODIFIER_PUBLIC (1)
+ consts: array(
+ 0: Const(
+ name: X
+ value: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/constModifiers.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/constModifiers.test
new file mode 100644
index 0000000..7129d28
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/constModifiers.test
@@ -0,0 +1,67 @@
+Class constant modifiers
+-----
+<?php
+
+class Foo {
+ const A = 1;
+ public const B = 2;
+ protected const C = 3;
+ private const D = 4;
+}
+-----
+!!php7
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: Foo
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassConst(
+ flags: 0
+ consts: array(
+ 0: Const(
+ name: A
+ value: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ 1: Stmt_ClassConst(
+ flags: MODIFIER_PUBLIC (1)
+ consts: array(
+ 0: Const(
+ name: B
+ value: Scalar_LNumber(
+ value: 2
+ )
+ )
+ )
+ )
+ 2: Stmt_ClassConst(
+ flags: MODIFIER_PROTECTED (2)
+ consts: array(
+ 0: Const(
+ name: C
+ value: Scalar_LNumber(
+ value: 3
+ )
+ )
+ )
+ )
+ 3: Stmt_ClassConst(
+ flags: MODIFIER_PRIVATE (4)
+ consts: array(
+ 0: Const(
+ name: D
+ value: Scalar_LNumber(
+ value: 4
+ )
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/final.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/final.test
new file mode 100644
index 0000000..86cc458
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/final.test
@@ -0,0 +1,17 @@
+Final class
+-----
+<?php
+
+final class A {}
+-----
+array(
+ 0: Stmt_Class(
+ flags: MODIFIER_FINAL (32)
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/implicitPublic.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/implicitPublic.test
new file mode 100644
index 0000000..08452c1
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/implicitPublic.test
@@ -0,0 +1,92 @@
+Implicitly public properties and methods
+-----
+<?php
+
+abstract class A {
+ var $a;
+ static $b;
+ abstract function c();
+ final function d() {}
+ static function e() {}
+ final static function f() {}
+ function g() {}
+}
+-----
+array(
+ 0: Stmt_Class(
+ flags: MODIFIER_ABSTRACT (16)
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_Property(
+ flags: 0
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: a
+ default: null
+ )
+ )
+ )
+ 1: Stmt_Property(
+ flags: MODIFIER_STATIC (8)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: b
+ default: null
+ )
+ )
+ )
+ 2: Stmt_ClassMethod(
+ flags: MODIFIER_ABSTRACT (16)
+ byRef: false
+ name: c
+ params: array(
+ )
+ returnType: null
+ stmts: null
+ )
+ 3: Stmt_ClassMethod(
+ flags: MODIFIER_FINAL (32)
+ byRef: false
+ name: d
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 4: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC (8)
+ byRef: false
+ name: e
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 5: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC | MODIFIER_FINAL (40)
+ byRef: false
+ name: f
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 6: Stmt_ClassMethod(
+ flags: 0
+ byRef: false
+ name: g
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/interface.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/interface.test
new file mode 100644
index 0000000..d00bdbd
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/interface.test
@@ -0,0 +1,36 @@
+Interface
+-----
+<?php
+
+interface A extends C, D {
+ public function a();
+}
+-----
+array(
+ 0: Stmt_Interface(
+ name: A
+ extends: array(
+ 0: Name(
+ parts: array(
+ 0: C
+ )
+ )
+ 1: Name(
+ parts: array(
+ 0: D
+ )
+ )
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_PUBLIC (1)
+ byRef: false
+ name: a
+ params: array(
+ )
+ returnType: null
+ stmts: null
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test
new file mode 100644
index 0000000..5a1fd3f
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/modifier.test
@@ -0,0 +1,215 @@
+Invalid modifier combination
+-----
+<?php class A { public public $a; }
+-----
+Multiple access type modifiers are not allowed from 1:24 to 1:29
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_Property(
+ flags: MODIFIER_PUBLIC (1)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: a
+ default: null
+ )
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { public protected $a; }
+-----
+Multiple access type modifiers are not allowed from 1:24 to 1:32
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_Property(
+ flags: MODIFIER_PUBLIC | MODIFIER_PROTECTED (3)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: a
+ default: null
+ )
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { abstract abstract function a(); }
+-----
+Multiple abstract modifiers are not allowed from 1:26 to 1:33
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_ABSTRACT (16)
+ byRef: false
+ name: a
+ params: array(
+ )
+ returnType: null
+ stmts: null
+ )
+ )
+ )
+)
+-----
+<?php class A { static static $a; }
+-----
+Multiple static modifiers are not allowed from 1:24 to 1:29
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_Property(
+ flags: MODIFIER_STATIC (8)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: a
+ default: null
+ )
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { final final function a() {} }
+-----
+Multiple final modifiers are not allowed from 1:23 to 1:27
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_FINAL (32)
+ byRef: false
+ name: a
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { abstract final function a(); }
+-----
+Cannot use the final modifier on an abstract class member from 1:26 to 1:30
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_ABSTRACT | MODIFIER_FINAL (48)
+ byRef: false
+ name: a
+ params: array(
+ )
+ returnType: null
+ stmts: null
+ )
+ )
+ )
+)
+-----
+<?php abstract final class A { }
+// Type in the partial parse could conceivably be any of 0, 16 or 32
+-----
+Syntax error, unexpected T_FINAL, expecting T_CLASS from 1:16 to 1:20
+array(
+ 0: Stmt_Class(
+ flags: MODIFIER_FINAL (32)
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ )
+ )
+ 1: Stmt_Nop(
+ comments: array(
+ 0: // Type in the partial parse could conceivably be any of 0, 16 or 32
+ )
+ )
+)
+-----
+<?php class A { abstract $a; }
+-----
+Properties cannot be declared abstract from 1:17 to 1:24
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_Property(
+ flags: MODIFIER_ABSTRACT (16)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: a
+ default: null
+ )
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { final $a; }
+-----
+Properties cannot be declared final from 1:17 to 1:21
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_Property(
+ flags: MODIFIER_FINAL (32)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: a
+ default: null
+ )
+ )
+ )
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/name.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/name.test
new file mode 100644
index 0000000..880da3a
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/name.test
@@ -0,0 +1,201 @@
+Invalid class name
+-----
+<?php class self {}
+-----
+Cannot use 'self' as class name as it is reserved from 1:13 to 1:16
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: self
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php class PARENT {}
+-----
+Cannot use 'PARENT' as class name as it is reserved from 1:13 to 1:18
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: PARENT
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php class static {}
+-----
+Syntax error, unexpected T_STATIC, expecting T_STRING from 1:13 to 1:18
+array(
+)
+-----
+<?php class A extends self {}
+-----
+Cannot use 'self' as class name as it is reserved from 1:23 to 1:26
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: Name(
+ parts: array(
+ 0: self
+ )
+ )
+ implements: array(
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php class A extends PARENT {}
+-----
+Cannot use 'PARENT' as class name as it is reserved from 1:23 to 1:28
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: Name(
+ parts: array(
+ 0: PARENT
+ )
+ )
+ implements: array(
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php class A extends static {}
+-----
+Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR from 1:23 to 1:28
+array(
+)
+-----
+<?php class A implements self {}
+-----
+Cannot use 'self' as interface name as it is reserved from 1:26 to 1:29
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ 0: Name(
+ parts: array(
+ 0: self
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php class A implements PARENT {}
+-----
+Cannot use 'PARENT' as interface name as it is reserved from 1:26 to 1:31
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ 0: Name(
+ parts: array(
+ 0: PARENT
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php class A implements static {}
+-----
+Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR from 1:26 to 1:31
+array(
+)
+-----
+<?php interface self {}
+-----
+Cannot use 'self' as class name as it is reserved from 1:17 to 1:20
+array(
+ 0: Stmt_Interface(
+ name: self
+ extends: array(
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php interface PARENT {}
+-----
+Cannot use 'PARENT' as class name as it is reserved from 1:17 to 1:22
+array(
+ 0: Stmt_Interface(
+ name: PARENT
+ extends: array(
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php interface static {}
+-----
+Syntax error, unexpected T_STATIC, expecting T_STRING from 1:17 to 1:22
+array(
+)
+-----
+<?php interface A extends self {}
+-----
+Cannot use 'self' as interface name as it is reserved from 1:27 to 1:30
+array(
+ 0: Stmt_Interface(
+ name: A
+ extends: array(
+ 0: Name(
+ parts: array(
+ 0: self
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php interface A extends PARENT {}
+-----
+Cannot use 'PARENT' as interface name as it is reserved from 1:27 to 1:32
+array(
+ 0: Stmt_Interface(
+ name: A
+ extends: array(
+ 0: Name(
+ parts: array(
+ 0: PARENT
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php interface A extends static {}
+-----
+Syntax error, unexpected T_STATIC, expecting T_STRING or T_NAMESPACE or T_NS_SEPARATOR from 1:27 to 1:32
+array(
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test
new file mode 100644
index 0000000..e459e17
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/php4Style.test
@@ -0,0 +1,50 @@
+PHP 4 style declarations
+-----
+<?php
+
+class A {
+ var $foo;
+ function bar() {}
+ static abstract function baz() {}
+}
+-----
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_Property(
+ flags: 0
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: foo
+ default: null
+ )
+ )
+ )
+ 1: Stmt_ClassMethod(
+ flags: 0
+ byRef: false
+ name: bar
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 2: Stmt_ClassMethod(
+ flags: MODIFIER_ABSTRACT | MODIFIER_STATIC (24)
+ byRef: false
+ name: baz
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test
new file mode 100644
index 0000000..b2f8994
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/simple.test
@@ -0,0 +1,156 @@
+Class declaration
+-----
+<?php
+
+class A extends B implements C, D {
+ const A = 'B', C = 'D';
+
+ public $a = 'b', $c = 'd';
+ protected $e;
+ private $f;
+
+ public function a() {}
+ public static function b($a) {}
+ public final function c() : B {}
+ protected function d() {}
+ private function e() {}
+}
+-----
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ implements: array(
+ 0: Name(
+ parts: array(
+ 0: C
+ )
+ )
+ 1: Name(
+ parts: array(
+ 0: D
+ )
+ )
+ )
+ stmts: array(
+ 0: Stmt_ClassConst(
+ flags: 0
+ consts: array(
+ 0: Const(
+ name: A
+ value: Scalar_String(
+ value: B
+ )
+ )
+ 1: Const(
+ name: C
+ value: Scalar_String(
+ value: D
+ )
+ )
+ )
+ )
+ 1: Stmt_Property(
+ flags: MODIFIER_PUBLIC (1)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: a
+ default: Scalar_String(
+ value: b
+ )
+ )
+ 1: Stmt_PropertyProperty(
+ name: c
+ default: Scalar_String(
+ value: d
+ )
+ )
+ )
+ )
+ 2: Stmt_Property(
+ flags: MODIFIER_PROTECTED (2)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: e
+ default: null
+ )
+ )
+ )
+ 3: Stmt_Property(
+ flags: MODIFIER_PRIVATE (4)
+ props: array(
+ 0: Stmt_PropertyProperty(
+ name: f
+ default: null
+ )
+ )
+ )
+ 4: Stmt_ClassMethod(
+ flags: MODIFIER_PUBLIC (1)
+ byRef: false
+ name: a
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 5: Stmt_ClassMethod(
+ flags: MODIFIER_PUBLIC | MODIFIER_STATIC (9)
+ byRef: false
+ name: b
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 6: Stmt_ClassMethod(
+ flags: MODIFIER_PUBLIC | MODIFIER_FINAL (33)
+ byRef: false
+ name: c
+ params: array(
+ )
+ returnType: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ stmts: array(
+ )
+ )
+ 7: Stmt_ClassMethod(
+ flags: MODIFIER_PROTECTED (2)
+ byRef: false
+ name: d
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 8: Stmt_ClassMethod(
+ flags: MODIFIER_PRIVATE (4)
+ byRef: false
+ name: e
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/staticMethod.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/staticMethod.test
new file mode 100644
index 0000000..225596a
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/staticMethod.test
@@ -0,0 +1,151 @@
+Some special methods cannot be static
+-----
+<?php class A { static function __construct() {} }
+-----
+Constructor __construct() cannot be static from 1:17 to 1:22
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC (8)
+ byRef: false
+ name: __construct
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { static function __destruct() {} }
+-----
+Destructor __destruct() cannot be static from 1:17 to 1:22
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC (8)
+ byRef: false
+ name: __destruct
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { static function __clone() {} }
+-----
+Clone method __clone() cannot be static from 1:17 to 1:22
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC (8)
+ byRef: false
+ name: __clone
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { static function __CONSTRUCT() {} }
+-----
+Constructor __CONSTRUCT() cannot be static from 1:17 to 1:22
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC (8)
+ byRef: false
+ name: __CONSTRUCT
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { static function __Destruct() {} }
+-----
+Destructor __Destruct() cannot be static from 1:17 to 1:22
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC (8)
+ byRef: false
+ name: __Destruct
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+)
+-----
+<?php class A { static function __cLoNe() {} }
+-----
+Clone method __cLoNe() cannot be static from 1:17 to 1:22
+array(
+ 0: Stmt_Class(
+ flags: 0
+ name: A
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_STATIC (8)
+ byRef: false
+ name: __cLoNe
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/trait.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/trait.test
new file mode 100644
index 0000000..75c6ec6
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/class/trait.test
@@ -0,0 +1,160 @@
+Traits
+-----
+<?php
+
+trait A {
+ public function a() {}
+}
+
+class B {
+ use C;
+ use D {
+ a as protected b;
+ c as d;
+ e as private;
+ }
+ use E, F, G {
+ E::a insteadof F, G;
+ E::b as protected c;
+ E::d as e;
+ E::f as private;
+ }
+}
+-----
+array(
+ 0: Stmt_Trait(
+ name: A
+ stmts: array(
+ 0: Stmt_ClassMethod(
+ flags: MODIFIER_PUBLIC (1)
+ byRef: false
+ name: a
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ )
+ 1: Stmt_Class(
+ flags: 0
+ name: B
+ extends: null
+ implements: array(
+ )
+ stmts: array(
+ 0: Stmt_TraitUse(
+ traits: array(
+ 0: Name(
+ parts: array(
+ 0: C
+ )
+ )
+ )
+ adaptations: array(
+ )
+ )
+ 1: Stmt_TraitUse(
+ traits: array(
+ 0: Name(
+ parts: array(
+ 0: D
+ )
+ )
+ )
+ adaptations: array(
+ 0: Stmt_TraitUseAdaptation_Alias(
+ trait: null
+ method: a
+ newModifier: MODIFIER_PROTECTED (2)
+ newName: b
+ )
+ 1: Stmt_TraitUseAdaptation_Alias(
+ trait: null
+ method: c
+ newModifier: null
+ newName: d
+ )
+ 2: Stmt_TraitUseAdaptation_Alias(
+ trait: null
+ method: e
+ newModifier: MODIFIER_PRIVATE (4)
+ newName: null
+ )
+ )
+ )
+ 2: Stmt_TraitUse(
+ traits: array(
+ 0: Name(
+ parts: array(
+ 0: E
+ )
+ )
+ 1: Name(
+ parts: array(
+ 0: F
+ )
+ )
+ 2: Name(
+ parts: array(
+ 0: G
+ )
+ )
+ )
+ adaptations: array(
+ 0: Stmt_TraitUseAdaptation_Precedence(
+ trait: Name(
+ parts: array(
+ 0: E
+ )
+ )
+ method: a
+ insteadof: array(
+ 0: Name(
+ parts: array(
+ 0: F
+ )
+ )
+ 1: Name(
+ parts: array(
+ 0: G
+ )
+ )
+ )
+ )
+ 1: Stmt_TraitUseAdaptation_Alias(
+ trait: Name(
+ parts: array(
+ 0: E
+ )
+ )
+ method: b
+ newModifier: MODIFIER_PROTECTED (2)
+ newName: c
+ )
+ 2: Stmt_TraitUseAdaptation_Alias(
+ trait: Name(
+ parts: array(
+ 0: E
+ )
+ )
+ method: d
+ newModifier: null
+ newName: e
+ )
+ 3: Stmt_TraitUseAdaptation_Alias(
+ trait: Name(
+ parts: array(
+ 0: E
+ )
+ )
+ method: f
+ newModifier: MODIFIER_PRIVATE (4)
+ newName: null
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/const.test b/vendor/nikic/php-parser/test/code/parser/stmt/const.test
new file mode 100644
index 0000000..da21f41
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/const.test
@@ -0,0 +1,40 @@
+Global constants
+-----
+<?php
+
+const A = 0, B = 1.0, C = 'A', D = E;
+-----
+array(
+ 0: Stmt_Const(
+ consts: array(
+ 0: Const(
+ name: A
+ value: Scalar_LNumber(
+ value: 0
+ )
+ )
+ 1: Const(
+ name: B
+ value: Scalar_DNumber(
+ value: 1
+ )
+ )
+ 2: Const(
+ name: C
+ value: Scalar_String(
+ value: A
+ )
+ )
+ 3: Const(
+ name: D
+ value: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: E
+ )
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/controlFlow.test b/vendor/nikic/php-parser/test/code/parser/stmt/controlFlow.test
new file mode 100644
index 0000000..2de1c4f
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/controlFlow.test
@@ -0,0 +1,55 @@
+Control flow statements
+-----
+<?php
+
+break;
+break 2;
+
+continue;
+continue 2;
+
+return;
+return $a;
+
+throw $e;
+
+label:
+goto label;
+-----
+array(
+ 0: Stmt_Break(
+ num: null
+ )
+ 1: Stmt_Break(
+ num: Scalar_LNumber(
+ value: 2
+ )
+ )
+ 2: Stmt_Continue(
+ num: null
+ )
+ 3: Stmt_Continue(
+ num: Scalar_LNumber(
+ value: 2
+ )
+ )
+ 4: Stmt_Return(
+ expr: null
+ )
+ 5: Stmt_Return(
+ expr: Expr_Variable(
+ name: a
+ )
+ )
+ 6: Stmt_Throw(
+ expr: Expr_Variable(
+ name: e
+ )
+ )
+ 7: Stmt_Label(
+ name: label
+ )
+ 8: Stmt_Goto(
+ name: label
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/declare.test b/vendor/nikic/php-parser/test/code/parser/stmt/declare.test
new file mode 100644
index 0000000..93afe67
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/declare.test
@@ -0,0 +1,60 @@
+Declare
+-----
+<?php
+
+declare (X='Y');
+
+declare (A='B', C='D') {}
+
+declare (A='B', C='D'):
+enddeclare;
+-----
+array(
+ 0: Stmt_Declare(
+ declares: array(
+ 0: Stmt_DeclareDeclare(
+ key: X
+ value: Scalar_String(
+ value: Y
+ )
+ )
+ )
+ stmts: null
+ )
+ 1: Stmt_Declare(
+ declares: array(
+ 0: Stmt_DeclareDeclare(
+ key: A
+ value: Scalar_String(
+ value: B
+ )
+ )
+ 1: Stmt_DeclareDeclare(
+ key: C
+ value: Scalar_String(
+ value: D
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+ 2: Stmt_Declare(
+ declares: array(
+ 0: Stmt_DeclareDeclare(
+ key: A
+ value: Scalar_String(
+ value: B
+ )
+ )
+ 1: Stmt_DeclareDeclare(
+ key: C
+ value: Scalar_String(
+ value: D
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/echo.test b/vendor/nikic/php-parser/test/code/parser/stmt/echo.test
new file mode 100644
index 0000000..1d03eae
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/echo.test
@@ -0,0 +1,32 @@
+Echo
+-----
+<?php
+
+echo 'Hallo World!';
+echo 'Hallo', ' ', 'World', '!';
+-----
+array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_String(
+ value: Hallo World!
+ )
+ )
+ )
+ 1: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_String(
+ value: Hallo
+ )
+ 1: Scalar_String(
+ value:
+ )
+ 2: Scalar_String(
+ value: World
+ )
+ 3: Scalar_String(
+ value: !
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/builtinTypeDeclarations.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/builtinTypeDeclarations.test
new file mode 100644
index 0000000..b9bd807
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/builtinTypeDeclarations.test
@@ -0,0 +1,52 @@
+Scalar type declarations
+-----
+<?php
+function test(bool $a, Int $b, FLOAT $c, StRiNg $d, iterable $e) : void {}
+-----
+!!php7
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: test
+ params: array(
+ 0: Param(
+ type: bool
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ 1: Param(
+ type: int
+ byRef: false
+ variadic: false
+ name: b
+ default: null
+ )
+ 2: Param(
+ type: float
+ byRef: false
+ variadic: false
+ name: c
+ default: null
+ )
+ 3: Param(
+ type: string
+ byRef: false
+ variadic: false
+ name: d
+ default: null
+ )
+ 4: Param(
+ type: iterable
+ byRef: false
+ variadic: false
+ name: e
+ default: null
+ )
+ )
+ returnType: void
+ stmts: array(
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/byRef.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/byRef.test
new file mode 100644
index 0000000..1c1669c
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/byRef.test
@@ -0,0 +1,41 @@
+Return and pass by ref
+-----
+<?php
+
+function a(&$b) {}
+function &a($b) {}
+-----
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: a
+ params: array(
+ 0: Param(
+ type: null
+ byRef: true
+ variadic: false
+ name: b
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 1: Stmt_Function(
+ byRef: true
+ name: a
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: b
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test
new file mode 100644
index 0000000..d9c886e
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/conditional.test
@@ -0,0 +1,33 @@
+Conditional function definition
+-----
+<?php
+
+if (true) {
+ function A() {}
+}
+-----
+array(
+ 0: Stmt_If(
+ cond: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: true
+ )
+ )
+ )
+ stmts: array(
+ 0: Stmt_Function(
+ byRef: false
+ name: A
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ )
+ elseifs: array(
+ )
+ else: null
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/defaultValues.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/defaultValues.test
new file mode 100644
index 0000000..d77d4f3
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/defaultValues.test
@@ -0,0 +1,148 @@
+Default values (static scalar tests)
+-----
+<?php
+
+function a(
+ $b = null,
+ $c = 'foo',
+ $d = A::B,
+ $f = +1,
+ $g = -1.0,
+ $h = array(),
+ $i = [],
+ $j = ['foo'],
+ $k = ['foo', 'bar' => 'baz']
+) {}
+-----
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: a
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: b
+ default: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: null
+ )
+ )
+ )
+ )
+ 1: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: c
+ default: Scalar_String(
+ value: foo
+ )
+ )
+ 2: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: d
+ default: Expr_ClassConstFetch(
+ class: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ name: B
+ )
+ )
+ 3: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: f
+ default: Expr_UnaryPlus(
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ 4: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: g
+ default: Expr_UnaryMinus(
+ expr: Scalar_DNumber(
+ value: 1
+ )
+ )
+ )
+ 5: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: h
+ default: Expr_Array(
+ items: array(
+ )
+ )
+ )
+ 6: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: i
+ default: Expr_Array(
+ items: array(
+ )
+ )
+ )
+ 7: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: j
+ default: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: foo
+ )
+ byRef: false
+ )
+ )
+ )
+ )
+ 8: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: k
+ default: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Scalar_String(
+ value: foo
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: Scalar_String(
+ value: bar
+ )
+ value: Scalar_String(
+ value: baz
+ )
+ byRef: false
+ )
+ )
+ )
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test
new file mode 100644
index 0000000..d96df4f
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/nullableTypes.test
@@ -0,0 +1,47 @@
+Nullable types
+-----
+<?php
+
+function test(?Foo $bar, ?string $foo) : ?Baz {
+}
+-----
+!!php7
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: test
+ params: array(
+ 0: Param(
+ type: NullableType(
+ type: Name(
+ parts: array(
+ 0: Foo
+ )
+ )
+ )
+ byRef: false
+ variadic: false
+ name: bar
+ default: null
+ )
+ 1: Param(
+ type: NullableType(
+ type: string
+ )
+ byRef: false
+ variadic: false
+ name: foo
+ default: null
+ )
+ )
+ returnType: NullableType(
+ type: Name(
+ parts: array(
+ 0: Baz
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/returnTypes.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/returnTypes.test
new file mode 100644
index 0000000..ca6c310
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/returnTypes.test
@@ -0,0 +1,52 @@
+Return type declarations
+-----
+<?php
+
+function test1() {}
+function test2() : array {}
+function test3() : callable {}
+function test4() : Foo\Bar {}
+-----
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: test1
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 1: Stmt_Function(
+ byRef: false
+ name: test2
+ params: array(
+ )
+ returnType: array
+ stmts: array(
+ )
+ )
+ 2: Stmt_Function(
+ byRef: false
+ name: test3
+ params: array(
+ )
+ returnType: callable
+ stmts: array(
+ )
+ )
+ 3: Stmt_Function(
+ byRef: false
+ name: test4
+ params: array(
+ )
+ returnType: Name(
+ parts: array(
+ 0: Foo
+ 1: Bar
+ )
+ )
+ stmts: array(
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/specialVars.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/specialVars.test
new file mode 100644
index 0000000..f2f35ac
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/specialVars.test
@@ -0,0 +1,51 @@
+Special function variables
+-----
+<?php
+
+function a() {
+ global $a, ${'b'}, $$c;
+ static $c, $d = 'e';
+}
+-----
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: a
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ 0: Stmt_Global(
+ vars: array(
+ 0: Expr_Variable(
+ name: a
+ )
+ 1: Expr_Variable(
+ name: Scalar_String(
+ value: b
+ )
+ )
+ 2: Expr_Variable(
+ name: Expr_Variable(
+ name: c
+ )
+ )
+ )
+ )
+ 1: Stmt_Static(
+ vars: array(
+ 0: Stmt_StaticVar(
+ name: c
+ default: null
+ )
+ 1: Stmt_StaticVar(
+ name: d
+ default: Scalar_String(
+ value: e
+ )
+ )
+ )
+ )
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/typeDeclarations.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/typeDeclarations.test
new file mode 100644
index 0000000..53c462c
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/typeDeclarations.test
@@ -0,0 +1,49 @@
+Type hints
+-----
+<?php
+
+function a($b, array $c, callable $d, E $f) {}
+-----
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: a
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: b
+ default: null
+ )
+ 1: Param(
+ type: array
+ byRef: false
+ variadic: false
+ name: c
+ default: null
+ )
+ 2: Param(
+ type: callable
+ byRef: false
+ variadic: false
+ name: d
+ default: null
+ )
+ 3: Param(
+ type: Name(
+ parts: array(
+ 0: E
+ )
+ )
+ byRef: false
+ variadic: false
+ name: f
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/variadic.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/variadic.test
new file mode 100644
index 0000000..f9d848c
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/variadic.test
@@ -0,0 +1,110 @@
+Variadic functions
+-----
+<?php
+function test($a, ... $b) {}
+function test($a, &... $b) {}
+function test($a, Type ... $b) {}
+function test($a, Type &... $b) {}
+-----
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: test
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ 1: Param(
+ type: null
+ byRef: false
+ variadic: true
+ name: b
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 1: Stmt_Function(
+ byRef: false
+ name: test
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ 1: Param(
+ type: null
+ byRef: true
+ variadic: true
+ name: b
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 2: Stmt_Function(
+ byRef: false
+ name: test
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ 1: Param(
+ type: Name(
+ parts: array(
+ 0: Type
+ )
+ )
+ byRef: false
+ variadic: true
+ name: b
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+ 3: Stmt_Function(
+ byRef: false
+ name: test
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: false
+ name: a
+ default: null
+ )
+ 1: Param(
+ type: Name(
+ parts: array(
+ 0: Type
+ )
+ )
+ byRef: true
+ variadic: true
+ name: b
+ default: null
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/function/variadicDefaultValue.test b/vendor/nikic/php-parser/test/code/parser/stmt/function/variadicDefaultValue.test
new file mode 100644
index 0000000..0c3714f
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/function/variadicDefaultValue.test
@@ -0,0 +1,27 @@
+Invalid variadic function
+-----
+<?php
+function foo(...$foo = []) {}
+-----
+Variadic parameter cannot have a default value from 2:24 to 2:25
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: foo
+ params: array(
+ 0: Param(
+ type: null
+ byRef: false
+ variadic: true
+ name: foo
+ default: Expr_Array(
+ items: array(
+ )
+ )
+ )
+ )
+ returnType: null
+ stmts: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/generator/basic.test b/vendor/nikic/php-parser/test/code/parser/stmt/generator/basic.test
new file mode 100644
index 0000000..8a184aa
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/generator/basic.test
@@ -0,0 +1,280 @@
+Generators (yield expression)
+-----
+<?php
+
+function gen() {
+ // statements
+ yield;
+ yield $value;
+ yield $key => $value;
+
+ // expressions
+ $data = yield;
+ $data = (yield $value);
+ $data = (yield $key => $value);
+
+ // yield in language constructs with their own parentheses
+ if (yield $foo); elseif (yield $foo);
+ if (yield $foo): elseif (yield $foo): endif;
+ while (yield $foo);
+ do {} while (yield $foo);
+ switch (yield $foo) {}
+ die(yield $foo);
+
+ // yield in function calls
+ func(yield $foo);
+ $foo->func(yield $foo);
+ new Foo(yield $foo);
+
+ yield from $foo;
+ yield from $foo and yield from $bar;
+ yield from $foo + $bar;
+}
+-----
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: gen
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ 0: Expr_Yield(
+ key: null
+ value: null
+ comments: array(
+ 0: // statements
+ )
+ )
+ 1: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: value
+ )
+ )
+ 2: Expr_Yield(
+ key: Expr_Variable(
+ name: key
+ )
+ value: Expr_Variable(
+ name: value
+ )
+ )
+ 3: Expr_Assign(
+ var: Expr_Variable(
+ name: data
+ comments: array(
+ 0: // expressions
+ )
+ )
+ expr: Expr_Yield(
+ key: null
+ value: null
+ )
+ comments: array(
+ 0: // expressions
+ )
+ )
+ 4: Expr_Assign(
+ var: Expr_Variable(
+ name: data
+ )
+ expr: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: value
+ )
+ )
+ )
+ 5: Expr_Assign(
+ var: Expr_Variable(
+ name: data
+ )
+ expr: Expr_Yield(
+ key: Expr_Variable(
+ name: key
+ )
+ value: Expr_Variable(
+ name: value
+ )
+ )
+ )
+ 6: Stmt_If(
+ cond: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ stmts: array(
+ )
+ elseifs: array(
+ 0: Stmt_ElseIf(
+ cond: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ stmts: array(
+ )
+ )
+ )
+ else: null
+ comments: array(
+ 0: // yield in language constructs with their own parentheses
+ )
+ )
+ 7: Stmt_If(
+ cond: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ stmts: array(
+ )
+ elseifs: array(
+ 0: Stmt_ElseIf(
+ cond: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ stmts: array(
+ )
+ )
+ )
+ else: null
+ )
+ 8: Stmt_While(
+ cond: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ stmts: array(
+ )
+ )
+ 9: Stmt_Do(
+ cond: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ stmts: array(
+ )
+ )
+ 10: Stmt_Switch(
+ cond: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ cases: array(
+ )
+ )
+ 11: Expr_Exit(
+ expr: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ )
+ 12: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: func
+ )
+ comments: array(
+ 0: // yield in function calls
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ comments: array(
+ 0: // yield in function calls
+ )
+ )
+ 13: Expr_MethodCall(
+ var: Expr_Variable(
+ name: foo
+ )
+ name: func
+ args: array(
+ 0: Arg(
+ value: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 14: Expr_New(
+ class: Name(
+ parts: array(
+ 0: Foo
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Yield(
+ key: null
+ value: Expr_Variable(
+ name: foo
+ )
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 15: Expr_YieldFrom(
+ expr: Expr_Variable(
+ name: foo
+ )
+ )
+ 16: Expr_BinaryOp_LogicalAnd(
+ left: Expr_YieldFrom(
+ expr: Expr_Variable(
+ name: foo
+ )
+ )
+ right: Expr_YieldFrom(
+ expr: Expr_Variable(
+ name: bar
+ )
+ )
+ )
+ 17: Expr_YieldFrom(
+ expr: Expr_BinaryOp_Plus(
+ left: Expr_Variable(
+ name: foo
+ )
+ right: Expr_Variable(
+ name: bar
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldPrecedence.test b/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldPrecedence.test
new file mode 100644
index 0000000..ff0d4df
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldPrecedence.test
@@ -0,0 +1,230 @@
+Yield operator precedence
+-----
+<?php
+
+function gen() {
+ yield "a" . "b";
+ yield "a" or die;
+ yield "k" => "a" . "b";
+ yield "k" => "a" or die;
+ var_dump([yield "k" => "a" . "b"]);
+ yield yield "k1" => yield "k2" => "a" . "b";
+ yield yield "k1" => (yield "k2") => "a" . "b";
+ var_dump([yield "k1" => yield "k2" => "a" . "b"]);
+ var_dump([yield "k1" => (yield "k2") => "a" . "b"]);
+}
+-----
+!!php7
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: gen
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ 0: Expr_Yield(
+ key: null
+ value: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: a
+ )
+ right: Scalar_String(
+ value: b
+ )
+ )
+ )
+ 1: Expr_BinaryOp_LogicalOr(
+ left: Expr_Yield(
+ key: null
+ value: Scalar_String(
+ value: a
+ )
+ )
+ right: Expr_Exit(
+ expr: null
+ )
+ )
+ 2: Expr_Yield(
+ key: Scalar_String(
+ value: k
+ )
+ value: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: a
+ )
+ right: Scalar_String(
+ value: b
+ )
+ )
+ )
+ 3: Expr_BinaryOp_LogicalOr(
+ left: Expr_Yield(
+ key: Scalar_String(
+ value: k
+ )
+ value: Scalar_String(
+ value: a
+ )
+ )
+ right: Expr_Exit(
+ expr: null
+ )
+ )
+ 4: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: var_dump
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Yield(
+ key: Scalar_String(
+ value: k
+ )
+ value: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: a
+ )
+ right: Scalar_String(
+ value: b
+ )
+ )
+ )
+ byRef: false
+ )
+ )
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 5: Expr_Yield(
+ key: null
+ value: Expr_Yield(
+ key: Scalar_String(
+ value: k1
+ )
+ value: Expr_Yield(
+ key: Scalar_String(
+ value: k2
+ )
+ value: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: a
+ )
+ right: Scalar_String(
+ value: b
+ )
+ )
+ )
+ )
+ )
+ 6: Expr_Yield(
+ key: Expr_Yield(
+ key: Scalar_String(
+ value: k1
+ )
+ value: Expr_Yield(
+ key: null
+ value: Scalar_String(
+ value: k2
+ )
+ )
+ )
+ value: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: a
+ )
+ right: Scalar_String(
+ value: b
+ )
+ )
+ )
+ 7: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: var_dump
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Yield(
+ key: Scalar_String(
+ value: k1
+ )
+ value: Expr_Yield(
+ key: Scalar_String(
+ value: k2
+ )
+ value: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: a
+ )
+ right: Scalar_String(
+ value: b
+ )
+ )
+ )
+ )
+ byRef: false
+ )
+ )
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 8: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: var_dump
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_Array(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: Expr_Yield(
+ key: Scalar_String(
+ value: k1
+ )
+ value: Expr_Yield(
+ key: null
+ value: Scalar_String(
+ value: k2
+ )
+ )
+ )
+ value: Expr_BinaryOp_Concat(
+ left: Scalar_String(
+ value: a
+ )
+ right: Scalar_String(
+ value: b
+ )
+ )
+ byRef: false
+ )
+ )
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldUnaryPrecedence.test b/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldUnaryPrecedence.test
new file mode 100644
index 0000000..13f9660
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/generator/yieldUnaryPrecedence.test
@@ -0,0 +1,48 @@
+Yield with unary operator argument
+-----
+<?php
+
+function gen() {
+ yield +1;
+ yield -1;
+ yield * -1;
+}
+-----
+array(
+ 0: Stmt_Function(
+ byRef: false
+ name: gen
+ params: array(
+ )
+ returnType: null
+ stmts: array(
+ 0: Expr_Yield(
+ key: null
+ value: Expr_UnaryPlus(
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ 1: Expr_Yield(
+ key: null
+ value: Expr_UnaryMinus(
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ 2: Expr_BinaryOp_Mul(
+ left: Expr_Yield(
+ key: null
+ value: null
+ )
+ right: Expr_UnaryMinus(
+ expr: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/haltCompiler.test b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompiler.test
new file mode 100644
index 0000000..67133ba
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompiler.test
@@ -0,0 +1,55 @@
+__halt_compiler
+-----
+<?php
+
+$a;
+__halt_compiler()
+?>
+Hallo World!
+-----
+array(
+ 0: Expr_Variable(
+ name: a
+ )
+ 1: Stmt_HaltCompiler(
+ remaining: Hallo World!
+ )
+)
+-----
+<?php
+
+$a;
+__halt_compiler();Hallo World!
+-----
+array(
+ 0: Expr_Variable(
+ name: a
+ )
+ 1: Stmt_HaltCompiler(
+ remaining: Hallo World!
+ )
+)
+-----
+<?php
+
+namespace A;
+$a;
+__halt_compiler();
+-----
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ stmts: array(
+ 0: Expr_Variable(
+ name: a
+ )
+ )
+ )
+ 1: Stmt_HaltCompiler(
+ remaining:
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerInvalidSyntax.test b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerInvalidSyntax.test
new file mode 100644
index 0000000..597710f
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerInvalidSyntax.test
@@ -0,0 +1,6 @@
+Invalid __halt_compiler() syntax
+-----
+<?php
+__halt_compiler()
+-----
+__HALT_COMPILER must be followed by "();" on line 2
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOffset.test b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOffset.test
new file mode 100644
index 0000000..6b47548
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOffset.test
@@ -0,0 +1,34 @@
+Use of __HALT_COMPILER_OFFSET__ constant
+-----
+<?php
+
+var_dump(__HALT_COMPILER_OFFSET__);
+__halt_compiler();
+Foo
+-----
+array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: var_dump
+ )
+ )
+ args: array(
+ 0: Arg(
+ value: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: __HALT_COMPILER_OFFSET__
+ )
+ )
+ )
+ byRef: false
+ unpack: false
+ )
+ )
+ )
+ 1: Stmt_HaltCompiler(
+ remaining:
+ Foo
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOutermostScope.test b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOutermostScope.test
new file mode 100644
index 0000000..2f8a3f1
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/haltCompilerOutermostScope.test
@@ -0,0 +1,8 @@
+__halt_compiler can only be used from outermost scope
+-----
+<?php
+if (true) {
+ __halt_compiler();
+}
+-----
+__HALT_COMPILER() can only be used from the outermost scope from 3:5 to 3:19
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/hashbang.test b/vendor/nikic/php-parser/test/code/parser/stmt/hashbang.test
new file mode 100644
index 0000000..11c45da
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/hashbang.test
@@ -0,0 +1,26 @@
+Hashbang line
+-----
+#!/usr/bin/env php
+<?php
+
+echo "foobar";
+
+?>
+#!/usr/bin/env php
+-----
+array(
+ 0: Stmt_InlineHTML(
+ value: #!/usr/bin/env php
+
+ )
+ 1: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_String(
+ value: foobar
+ )
+ )
+ )
+ 2: Stmt_InlineHTML(
+ value: #!/usr/bin/env php
+ )
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/if.test b/vendor/nikic/php-parser/test/code/parser/stmt/if.test
new file mode 100644
index 0000000..e054c89
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/if.test
@@ -0,0 +1,103 @@
+If/Elseif/Else
+-----
+<?php
+
+if ($a) {}
+elseif ($b) {}
+elseif ($c) {}
+else {}
+
+if ($a) {} // without else
+
+if ($a):
+elseif ($b):
+elseif ($c):
+else :
+endif;
+
+if ($a): endif; // without else
+-----
+array(
+ 0: Stmt_If(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ )
+ elseifs: array(
+ 0: Stmt_ElseIf(
+ cond: Expr_Variable(
+ name: b
+ )
+ stmts: array(
+ )
+ )
+ 1: Stmt_ElseIf(
+ cond: Expr_Variable(
+ name: c
+ )
+ stmts: array(
+ )
+ )
+ )
+ else: Stmt_Else(
+ stmts: array(
+ )
+ )
+ )
+ 1: Stmt_If(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ )
+ elseifs: array(
+ )
+ else: null
+ )
+ 2: Stmt_If(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ )
+ elseifs: array(
+ 0: Stmt_ElseIf(
+ cond: Expr_Variable(
+ name: b
+ )
+ stmts: array(
+ )
+ )
+ 1: Stmt_ElseIf(
+ cond: Expr_Variable(
+ name: c
+ )
+ stmts: array(
+ )
+ )
+ )
+ else: Stmt_Else(
+ stmts: array(
+ )
+ )
+ comments: array(
+ 0: // without else
+ )
+ )
+ 3: Stmt_If(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ )
+ elseifs: array(
+ )
+ else: null
+ )
+ 4: Stmt_Nop(
+ comments: array(
+ 0: // without else
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/inlineHTML.test b/vendor/nikic/php-parser/test/code/parser/stmt/inlineHTML.test
new file mode 100644
index 0000000..9b1b71d
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/inlineHTML.test
@@ -0,0 +1,27 @@
+Inline HTML
+-----
+<?php
+$a;
+?>
+B
+<?php
+$c;
+?>
+<?php
+$d;
+-----
+array(
+ 0: Expr_Variable(
+ name: a
+ )
+ 1: Stmt_InlineHTML(
+ value: B
+
+ )
+ 2: Expr_Variable(
+ name: c
+ )
+ 3: Expr_Variable(
+ name: d
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/loop/do.test b/vendor/nikic/php-parser/test/code/parser/stmt/loop/do.test
new file mode 100644
index 0000000..2799e26
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/loop/do.test
@@ -0,0 +1,17 @@
+Do loop
+-----
+<?php
+
+do {
+
+} while ($a);
+-----
+array(
+ 0: Stmt_Do(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/loop/for.test b/vendor/nikic/php-parser/test/code/parser/stmt/loop/for.test
new file mode 100644
index 0000000..c942d31
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/loop/for.test
@@ -0,0 +1,110 @@
+For loop
+-----
+<?php
+
+// "classical" loop
+for ($i = 0; $i < $c; ++$i) {}
+
+// multiple expressions
+for ($a, $b; $c, $d; $e, $f) {}
+
+// infinite loop
+for (;;) {}
+
+// alternative syntax
+for (;;):
+endfor;
+-----
+array(
+ 0: Stmt_For(
+ init: array(
+ 0: Expr_Assign(
+ var: Expr_Variable(
+ name: i
+ )
+ expr: Scalar_LNumber(
+ value: 0
+ )
+ )
+ )
+ cond: array(
+ 0: Expr_BinaryOp_Smaller(
+ left: Expr_Variable(
+ name: i
+ )
+ right: Expr_Variable(
+ name: c
+ )
+ )
+ )
+ loop: array(
+ 0: Expr_PreInc(
+ var: Expr_Variable(
+ name: i
+ )
+ )
+ )
+ stmts: array(
+ )
+ comments: array(
+ 0: // "classical" loop
+ )
+ )
+ 1: Stmt_For(
+ init: array(
+ 0: Expr_Variable(
+ name: a
+ )
+ 1: Expr_Variable(
+ name: b
+ )
+ )
+ cond: array(
+ 0: Expr_Variable(
+ name: c
+ )
+ 1: Expr_Variable(
+ name: d
+ )
+ )
+ loop: array(
+ 0: Expr_Variable(
+ name: e
+ )
+ 1: Expr_Variable(
+ name: f
+ )
+ )
+ stmts: array(
+ )
+ comments: array(
+ 0: // multiple expressions
+ )
+ )
+ 2: Stmt_For(
+ init: array(
+ )
+ cond: array(
+ )
+ loop: array(
+ )
+ stmts: array(
+ )
+ comments: array(
+ 0: // infinite loop
+ )
+ )
+ 3: Stmt_For(
+ init: array(
+ )
+ cond: array(
+ )
+ loop: array(
+ )
+ stmts: array(
+ )
+ comments: array(
+ 0: // alternative syntax
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/loop/foreach.test b/vendor/nikic/php-parser/test/code/parser/stmt/loop/foreach.test
new file mode 100644
index 0000000..464c859
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/loop/foreach.test
@@ -0,0 +1,164 @@
+Foreach loop
+-----
+<?php
+
+// foreach on variable
+foreach ($a as $b) {}
+foreach ($a as &$b) {}
+foreach ($a as $b => $c) {}
+foreach ($a as $b => &$c) {}
+foreach ($a as list($a, $b)) {}
+foreach ($a as $a => list($b, , $c)) {}
+
+// foreach on expression
+foreach (array() as $b) {}
+
+// alternative syntax
+foreach ($a as $b):
+endforeach;
+-----
+array(
+ 0: Stmt_Foreach(
+ expr: Expr_Variable(
+ name: a
+ )
+ keyVar: null
+ byRef: false
+ valueVar: Expr_Variable(
+ name: b
+ )
+ stmts: array(
+ )
+ comments: array(
+ 0: // foreach on variable
+ )
+ )
+ 1: Stmt_Foreach(
+ expr: Expr_Variable(
+ name: a
+ )
+ keyVar: null
+ byRef: true
+ valueVar: Expr_Variable(
+ name: b
+ )
+ stmts: array(
+ )
+ )
+ 2: Stmt_Foreach(
+ expr: Expr_Variable(
+ name: a
+ )
+ keyVar: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ valueVar: Expr_Variable(
+ name: c
+ )
+ stmts: array(
+ )
+ )
+ 3: Stmt_Foreach(
+ expr: Expr_Variable(
+ name: a
+ )
+ keyVar: Expr_Variable(
+ name: b
+ )
+ byRef: true
+ valueVar: Expr_Variable(
+ name: c
+ )
+ stmts: array(
+ )
+ )
+ 4: Stmt_Foreach(
+ expr: Expr_Variable(
+ name: a
+ )
+ keyVar: null
+ byRef: false
+ valueVar: Expr_List(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ )
+ 1: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+ 5: Stmt_Foreach(
+ expr: Expr_Variable(
+ name: a
+ )
+ keyVar: Expr_Variable(
+ name: a
+ )
+ byRef: false
+ valueVar: Expr_List(
+ items: array(
+ 0: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: b
+ )
+ byRef: false
+ )
+ 1: null
+ 2: Expr_ArrayItem(
+ key: null
+ value: Expr_Variable(
+ name: c
+ )
+ byRef: false
+ )
+ )
+ )
+ stmts: array(
+ )
+ )
+ 6: Stmt_Foreach(
+ expr: Expr_Array(
+ items: array(
+ )
+ )
+ keyVar: null
+ byRef: false
+ valueVar: Expr_Variable(
+ name: b
+ )
+ stmts: array(
+ )
+ comments: array(
+ 0: // foreach on expression
+ )
+ )
+ 7: Stmt_Foreach(
+ expr: Expr_Variable(
+ name: a
+ )
+ keyVar: null
+ byRef: false
+ valueVar: Expr_Variable(
+ name: b
+ )
+ stmts: array(
+ )
+ comments: array(
+ 0: // alternative syntax
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test b/vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test
new file mode 100644
index 0000000..65f6b23
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/loop/while.test
@@ -0,0 +1,25 @@
+While loop
+-----
+<?php
+
+while ($a) {}
+
+while ($a):
+endwhile;
+-----
+array(
+ 0: Stmt_While(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ )
+ )
+ 1: Stmt_While(
+ cond: Expr_Variable(
+ name: a
+ )
+ stmts: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/multiCatch.test b/vendor/nikic/php-parser/test/code/parser/stmt/multiCatch.test
new file mode 100644
index 0000000..bed73ad
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/multiCatch.test
@@ -0,0 +1,65 @@
+Try/catch with multiple classes
+-----
+<?php
+try {
+ $x;
+} catch (X|Y $e1) {
+ $y;
+} catch (\A|B\C $e2) {
+ $z;
+}
+-----
+!!php7
+array(
+ 0: Stmt_TryCatch(
+ stmts: array(
+ 0: Expr_Variable(
+ name: x
+ )
+ )
+ catches: array(
+ 0: Stmt_Catch(
+ types: array(
+ 0: Name(
+ parts: array(
+ 0: X
+ )
+ )
+ 1: Name(
+ parts: array(
+ 0: Y
+ )
+ )
+ )
+ var: e1
+ stmts: array(
+ 0: Expr_Variable(
+ name: y
+ )
+ )
+ )
+ 1: Stmt_Catch(
+ types: array(
+ 0: Name_FullyQualified(
+ parts: array(
+ 0: A
+ )
+ )
+ 1: Name(
+ parts: array(
+ 0: B
+ 1: C
+ )
+ )
+ )
+ var: e2
+ stmts: array(
+ 0: Expr_Variable(
+ name: z
+ )
+ )
+ )
+ )
+ finally: null
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/alias.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/alias.test
new file mode 100644
index 0000000..9bb53bd
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/alias.test
@@ -0,0 +1,168 @@
+Aliases (use)
+-----
+<?php
+
+use A\B;
+use C\D as E;
+use F\G as H, J;
+
+// evil alias notation - Do Not Use!
+use \A;
+use \A as B;
+
+// function and constant aliases
+use function foo\bar;
+use function foo\bar as baz;
+use const foo\BAR;
+use const foo\BAR as BAZ;
+-----
+array(
+ 0: Stmt_Use(
+ type: TYPE_NORMAL (1)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: A
+ 1: B
+ )
+ )
+ alias: B
+ )
+ )
+ )
+ 1: Stmt_Use(
+ type: TYPE_NORMAL (1)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: C
+ 1: D
+ )
+ )
+ alias: E
+ )
+ )
+ )
+ 2: Stmt_Use(
+ type: TYPE_NORMAL (1)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: F
+ 1: G
+ )
+ )
+ alias: H
+ )
+ 1: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: J
+ )
+ )
+ alias: J
+ )
+ )
+ )
+ 3: Stmt_Use(
+ type: TYPE_NORMAL (1)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ alias: A
+ )
+ )
+ comments: array(
+ 0: // evil alias notation - Do Not Use!
+ )
+ )
+ 4: Stmt_Use(
+ type: TYPE_NORMAL (1)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ alias: B
+ )
+ )
+ )
+ 5: Stmt_Use(
+ type: TYPE_FUNCTION (2)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: foo
+ 1: bar
+ )
+ )
+ alias: bar
+ )
+ )
+ comments: array(
+ 0: // function and constant aliases
+ )
+ )
+ 6: Stmt_Use(
+ type: TYPE_FUNCTION (2)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: foo
+ 1: bar
+ )
+ )
+ alias: baz
+ )
+ )
+ )
+ 7: Stmt_Use(
+ type: TYPE_CONSTANT (3)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: foo
+ 1: BAR
+ )
+ )
+ alias: BAR
+ )
+ )
+ )
+ 8: Stmt_Use(
+ type: TYPE_CONSTANT (3)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: foo
+ 1: BAR
+ )
+ )
+ alias: BAZ
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/braced.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/braced.test
new file mode 100644
index 0000000..1fefc1d
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/braced.test
@@ -0,0 +1,42 @@
+Braced namespaces
+-----
+<?php
+
+namespace Foo\Bar {
+ foo;
+}
+namespace {
+ bar;
+}
+-----
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: Foo
+ 1: Bar
+ )
+ )
+ stmts: array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ )
+ )
+ )
+ 1: Stmt_Namespace(
+ name: null
+ stmts: array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: bar
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUse.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUse.test
new file mode 100644
index 0000000..6597076
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUse.test
@@ -0,0 +1,188 @@
+Group use declarations
+-----
+<?php
+use A\{B};
+use A\{B\C, D};
+use \A\B\{C\D, E};
+use function A\{b\c, d};
+use const \A\{B\C, D};
+use A\B\{C\D, function b\c, const D};
+-----
+array(
+ 0: Stmt_GroupUse(
+ type: TYPE_UNKNOWN (0)
+ prefix: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_NORMAL (1)
+ name: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ alias: B
+ )
+ )
+ )
+ 1: Stmt_GroupUse(
+ type: TYPE_UNKNOWN (0)
+ prefix: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_NORMAL (1)
+ name: Name(
+ parts: array(
+ 0: B
+ 1: C
+ )
+ )
+ alias: C
+ )
+ 1: Stmt_UseUse(
+ type: TYPE_NORMAL (1)
+ name: Name(
+ parts: array(
+ 0: D
+ )
+ )
+ alias: D
+ )
+ )
+ )
+ 2: Stmt_GroupUse(
+ type: TYPE_UNKNOWN (0)
+ prefix: Name(
+ parts: array(
+ 0: A
+ 1: B
+ )
+ )
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_NORMAL (1)
+ name: Name(
+ parts: array(
+ 0: C
+ 1: D
+ )
+ )
+ alias: D
+ )
+ 1: Stmt_UseUse(
+ type: TYPE_NORMAL (1)
+ name: Name(
+ parts: array(
+ 0: E
+ )
+ )
+ alias: E
+ )
+ )
+ )
+ 3: Stmt_GroupUse(
+ type: TYPE_FUNCTION (2)
+ prefix: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: b
+ 1: c
+ )
+ )
+ alias: c
+ )
+ 1: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: d
+ )
+ )
+ alias: d
+ )
+ )
+ )
+ 4: Stmt_GroupUse(
+ type: TYPE_CONSTANT (3)
+ prefix: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: B
+ 1: C
+ )
+ )
+ alias: C
+ )
+ 1: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: D
+ )
+ )
+ alias: D
+ )
+ )
+ )
+ 5: Stmt_GroupUse(
+ type: TYPE_UNKNOWN (0)
+ prefix: Name(
+ parts: array(
+ 0: A
+ 1: B
+ )
+ )
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_NORMAL (1)
+ name: Name(
+ parts: array(
+ 0: C
+ 1: D
+ )
+ )
+ alias: D
+ )
+ 1: Stmt_UseUse(
+ type: TYPE_FUNCTION (2)
+ name: Name(
+ parts: array(
+ 0: b
+ 1: c
+ )
+ )
+ alias: c
+ )
+ 2: Stmt_UseUse(
+ type: TYPE_CONSTANT (3)
+ name: Name(
+ parts: array(
+ 0: D
+ )
+ )
+ alias: D
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUseErrors.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUseErrors.test
new file mode 100644
index 0000000..1f42042
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUseErrors.test
@@ -0,0 +1,66 @@
+Invalid group use syntax
+-----
+<?php
+// Missing semicolon
+use Foo\{Bar}
+use Bar\{Foo};
+-----
+Syntax error, unexpected T_USE, expecting ';' from 4:1 to 4:3
+array(
+ 0: Stmt_GroupUse(
+ type: TYPE_UNKNOWN (0)
+ prefix: Name(
+ parts: array(
+ 0: Bar
+ )
+ )
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_NORMAL (1)
+ name: Name(
+ parts: array(
+ 0: Foo
+ )
+ )
+ alias: Foo
+ )
+ )
+ )
+)
+-----
+<?php
+// Missing NS separator
+use Foo {Bar, Baz};
+-----
+Syntax error, unexpected '{', expecting ',' or ';' from 3:9 to 3:9
+array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: Bar
+ )
+ )
+ )
+ 1: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: Baz
+ )
+ )
+ )
+)
+-----
+<?php
+// Extra NS separator
+use Foo\{\Bar};
+-----
+Syntax error, unexpected T_NS_SEPARATOR, expecting T_STRING or T_FUNCTION or T_CONST from 3:10 to 3:10
+array(
+ 0: Expr_ConstFetch(
+ name: Name_FullyQualified(
+ parts: array(
+ 0: Bar
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUsePositions.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUsePositions.test
new file mode 100644
index 0000000..fd40e67
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/groupUsePositions.test
@@ -0,0 +1,28 @@
+Ensure correct file position attributes for group use prefix
+-----
+<?php
+use Foo\Bar\{Baz};
+-----
+!!positions
+array(
+ 0: Stmt_GroupUse[2:1 - 2:17](
+ type: TYPE_UNKNOWN (0)
+ prefix: Name[2:5 - 2:11](
+ parts: array(
+ 0: Foo
+ 1: Bar
+ )
+ )
+ uses: array(
+ 0: Stmt_UseUse[2:14 - 2:16](
+ type: TYPE_NORMAL (1)
+ name: Name[2:14 - 2:16](
+ parts: array(
+ 0: Baz
+ )
+ )
+ alias: Baz
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/invalidName.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/invalidName.test
new file mode 100644
index 0000000..5047c4b
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/invalidName.test
@@ -0,0 +1,83 @@
+Invalid namespace names
+-----
+<?php namespace self;
+-----
+Cannot use 'self' as namespace name from 1:17 to 1:20
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: self
+ )
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php namespace PARENT;
+-----
+Cannot use 'PARENT' as namespace name from 1:17 to 1:22
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: PARENT
+ )
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php namespace static;
+-----
+Syntax error, unexpected T_STATIC, expecting T_STRING or T_NS_SEPARATOR or '{' from 1:17 to 1:22
+array(
+)
+-----
+<?php use A as self;
+-----
+Cannot use A as self because 'self' is a special class name from 1:16 to 1:19
+array(
+ 0: Stmt_Use(
+ type: TYPE_NORMAL (1)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ alias: self
+ )
+ )
+ )
+)
+-----
+<?php use B as PARENT;
+-----
+Cannot use B as PARENT because 'PARENT' is a special class name from 1:16 to 1:21
+array(
+ 0: Stmt_Use(
+ type: TYPE_NORMAL (1)
+ uses: array(
+ 0: Stmt_UseUse(
+ type: TYPE_UNKNOWN (0)
+ name: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ alias: PARENT
+ )
+ )
+ )
+)
+-----
+<?php use C as static;
+-----
+Syntax error, unexpected T_STATIC, expecting T_STRING from 1:16 to 1:21
+array(
+)
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/mix.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/mix.test
new file mode 100644
index 0000000..0fbfbf4
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/mix.test
@@ -0,0 +1,103 @@
+Namespace types cannot be mixed
+-----
+<?php
+namespace A;
+echo 1;
+namespace B {
+ echo 2;
+}
+echo 3;
+-----
+Cannot mix bracketed namespace declarations with unbracketed namespace declarations on line 4
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ stmts: array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ 1: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ stmts: array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_LNumber(
+ value: 2
+ )
+ )
+ )
+ )
+ )
+ 2: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_LNumber(
+ value: 3
+ )
+ )
+ )
+)
+-----
+<?php
+namespace A {
+ echo 1;
+}
+echo 2;
+namespace B;
+echo 3;
+-----
+Cannot mix bracketed namespace declarations with unbracketed namespace declarations on line 6
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ stmts: array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ )
+ )
+ 1: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_LNumber(
+ value: 2
+ )
+ )
+ )
+ 2: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ stmts: array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_LNumber(
+ value: 3
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/name.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/name.test
new file mode 100644
index 0000000..922d26c
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/name.test
@@ -0,0 +1,42 @@
+Different name types
+-----
+<?php
+
+A;
+A\B;
+\A\B;
+namespace\A\B;
+-----
+array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ )
+ 1: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: A
+ 1: B
+ )
+ )
+ )
+ 2: Expr_ConstFetch(
+ name: Name_FullyQualified(
+ parts: array(
+ 0: A
+ 1: B
+ )
+ )
+ )
+ 3: Expr_ConstFetch(
+ name: Name_Relative(
+ parts: array(
+ 0: A
+ 1: B
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test
new file mode 100644
index 0000000..840daff
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test
@@ -0,0 +1,30 @@
+Nested namespaces are not allowed
+-----
+<?php
+namespace A {
+ namespace B {
+
+ }
+}
+-----
+Namespace declarations cannot be nested from 3:5 to 5:5
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ stmts: array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ stmts: array(
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/notBraced.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/notBraced.test
new file mode 100644
index 0000000..d4d1017
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/notBraced.test
@@ -0,0 +1,45 @@
+Semicolon style namespaces
+-----
+<?php
+
+namespace Foo\Bar;
+foo;
+
+namespace Bar;
+bar;
+-----
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: Foo
+ 1: Bar
+ )
+ )
+ stmts: array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ )
+ )
+ )
+ 1: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: Bar
+ )
+ )
+ stmts: array(
+ 0: Expr_ConstFetch(
+ name: Name(
+ parts: array(
+ 0: bar
+ )
+ )
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nsAfterHashbang.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nsAfterHashbang.test
new file mode 100644
index 0000000..6d45253
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nsAfterHashbang.test
@@ -0,0 +1,22 @@
+Hashbang followed by namespace declaration
+-----
+#!/usr/bin/env php
+<?php
+
+namespace A;
+-----
+array(
+ 0: Stmt_InlineHTML(
+ value: #!/usr/bin/env php
+
+ )
+ 1: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ stmts: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test
new file mode 100644
index 0000000..198daa4
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmt.test
@@ -0,0 +1,58 @@
+Some statements may occur outside of namespaces
+-----
+<?php
+declare(A='B');
+namespace B {
+
+}
+__halt_compiler()
+?>
+Hi!
+-----
+array(
+ 0: Stmt_Declare(
+ declares: array(
+ 0: Stmt_DeclareDeclare(
+ key: A
+ value: Scalar_String(
+ value: B
+ )
+ )
+ )
+ stmts: null
+ )
+ 1: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ stmts: array(
+ )
+ )
+ 2: Stmt_HaltCompiler(
+ remaining: Hi!
+ )
+)
+-----
+<?php
+/* Comment */
+;
+namespace Foo;
+-----
+array(
+ 0: Stmt_Nop(
+ comments: array(
+ 0: /* Comment */
+ )
+ )
+ 1: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: Foo
+ )
+ )
+ stmts: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmtInvalid.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmtInvalid.test
new file mode 100644
index 0000000..737112d
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/outsideStmtInvalid.test
@@ -0,0 +1,105 @@
+There (mostly) can't be statements outside of namespaces
+-----
+<?php
+echo 1;
+echo 2;
+namespace A;
+-----
+Namespace declaration statement has to be the very first statement in the script on line 4
+array(
+ 0: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ 1: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_LNumber(
+ value: 2
+ )
+ )
+ )
+ 2: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ stmts: array(
+ )
+ )
+)
+-----
+<?php
+namespace A {}
+echo 1;
+-----
+No code may exist outside of namespace {} from 3:1 to 3:7
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ stmts: array(
+ )
+ )
+ 1: Stmt_Echo(
+ exprs: array(
+ 0: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+)
+-----
+<?php
+namespace A {}
+declare(ticks=1);
+foo();
+namespace B {}
+-----
+No code may exist outside of namespace {} from 3:1 to 3:17
+array(
+ 0: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ stmts: array(
+ )
+ )
+ 1: Stmt_Declare(
+ declares: array(
+ 0: Stmt_DeclareDeclare(
+ key: ticks
+ value: Scalar_LNumber(
+ value: 1
+ )
+ )
+ )
+ stmts: null
+ )
+ 2: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ args: array(
+ )
+ )
+ 3: Stmt_Namespace(
+ name: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ stmts: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/switch.test b/vendor/nikic/php-parser/test/code/parser/stmt/switch.test
new file mode 100644
index 0000000..4e09401
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/switch.test
@@ -0,0 +1,73 @@
+Switch
+-----
+<?php
+
+switch ($a) {
+ case 0:
+ case 1;
+ default:
+}
+
+// alternative syntax
+switch ($a):
+endswitch;
+
+// leading semicolon
+switch ($a) { ; }
+switch ($a): ; endswitch;
+-----
+array(
+ 0: Stmt_Switch(
+ cond: Expr_Variable(
+ name: a
+ )
+ cases: array(
+ 0: Stmt_Case(
+ cond: Scalar_LNumber(
+ value: 0
+ )
+ stmts: array(
+ )
+ )
+ 1: Stmt_Case(
+ cond: Scalar_LNumber(
+ value: 1
+ )
+ stmts: array(
+ )
+ )
+ 2: Stmt_Case(
+ cond: null
+ stmts: array(
+ )
+ )
+ )
+ )
+ 1: Stmt_Switch(
+ cond: Expr_Variable(
+ name: a
+ )
+ cases: array(
+ )
+ comments: array(
+ 0: // alternative syntax
+ )
+ )
+ 2: Stmt_Switch(
+ cond: Expr_Variable(
+ name: a
+ )
+ cases: array(
+ )
+ comments: array(
+ 0: // leading semicolon
+ )
+ )
+ 3: Stmt_Switch(
+ cond: Expr_Variable(
+ name: a
+ )
+ cases: array(
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test b/vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test
new file mode 100644
index 0000000..8f7c5ec
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/tryCatch.test
@@ -0,0 +1,130 @@
+Try/catch
+-----
+<?php
+
+try {
+ doTry();
+} catch (A $b) {
+ doCatchA();
+} catch (B $c) {
+ doCatchB();
+} finally {
+ doFinally();
+}
+
+// no finally
+try { }
+catch (A $b) { }
+
+// no catch
+try { }
+finally { }
+
+-----
+array(
+ 0: Stmt_TryCatch(
+ stmts: array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: doTry
+ )
+ )
+ args: array(
+ )
+ )
+ )
+ catches: array(
+ 0: Stmt_Catch(
+ types: array(
+ 0: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ )
+ var: b
+ stmts: array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: doCatchA
+ )
+ )
+ args: array(
+ )
+ )
+ )
+ )
+ 1: Stmt_Catch(
+ types: array(
+ 0: Name(
+ parts: array(
+ 0: B
+ )
+ )
+ )
+ var: c
+ stmts: array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: doCatchB
+ )
+ )
+ args: array(
+ )
+ )
+ )
+ )
+ )
+ finally: Stmt_Finally(
+ stmts: array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: doFinally
+ )
+ )
+ args: array(
+ )
+ )
+ )
+ )
+ )
+ 1: Stmt_TryCatch(
+ stmts: array(
+ )
+ catches: array(
+ 0: Stmt_Catch(
+ types: array(
+ 0: Name(
+ parts: array(
+ 0: A
+ )
+ )
+ )
+ var: b
+ stmts: array(
+ )
+ )
+ )
+ finally: null
+ comments: array(
+ 0: // no finally
+ )
+ )
+ 2: Stmt_TryCatch(
+ stmts: array(
+ )
+ catches: array(
+ )
+ finally: Stmt_Finally(
+ stmts: array(
+ )
+ )
+ comments: array(
+ 0: // no catch
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/tryWithoutCatch.test b/vendor/nikic/php-parser/test/code/parser/stmt/tryWithoutCatch.test
new file mode 100644
index 0000000..ad113d9
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/tryWithoutCatch.test
@@ -0,0 +1,27 @@
+Cannot use try without catch or finally
+-----
+<?php
+
+try {
+ foo();
+}
+-----
+Cannot use try without catch or finally from 3:1 to 5:1
+array(
+ 0: Stmt_TryCatch(
+ stmts: array(
+ 0: Expr_FuncCall(
+ name: Name(
+ parts: array(
+ 0: foo
+ )
+ )
+ args: array(
+ )
+ )
+ )
+ catches: array(
+ )
+ finally: null
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/unset.test b/vendor/nikic/php-parser/test/code/parser/stmt/unset.test
new file mode 100644
index 0000000..c69679e
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/unset.test
@@ -0,0 +1,26 @@
+Unset
+-----
+<?php
+
+unset($a);
+unset($b, $c);
+-----
+array(
+ 0: Stmt_Unset(
+ vars: array(
+ 0: Expr_Variable(
+ name: a
+ )
+ )
+ )
+ 1: Stmt_Unset(
+ vars: array(
+ 0: Expr_Variable(
+ name: b
+ )
+ 1: Expr_Variable(
+ name: c
+ )
+ )
+ )
+) \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/comments.test b/vendor/nikic/php-parser/test/code/prettyPrinter/comments.test
new file mode 100644
index 0000000..34a9f93
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/comments.test
@@ -0,0 +1,67 @@
+Comments
+-----
+<?php
+
+function justForIndentation()
+{
+ // Some text
+ # Some text
+ /* Some text */
+ /** Some text */
+ /**
+ * Some text.
+ * Some more text.
+ */
+ /*
+ * Some text.
+ * Some more text.
+ */
+ /*
+ Some text.
+ Some more text.
+ */
+ /* Some text.
+ More text. */
+ /* Some text.
+ More text.
+ Even more text. */
+ $foo;
+}
+-----
+function justForIndentation()
+{
+ // Some text
+ # Some text
+ /* Some text */
+ /** Some text */
+ /**
+ * Some text.
+ * Some more text.
+ */
+ /*
+ * Some text.
+ * Some more text.
+ */
+ /*
+ Some text.
+ Some more text.
+ */
+ /* Some text.
+ More text. */
+ /* Some text.
+ More text.
+ Even more text. */
+ $foo;
+}
+-----
+<?php
+
+function test()
+{
+ // empty
+}
+-----
+function test()
+{
+ // empty
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/anonymousClass.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/anonymousClass.test
new file mode 100644
index 0000000..1f24517
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/anonymousClass.test
@@ -0,0 +1,27 @@
+Anonymous classes
+-----
+<?php
+
+new class {};
+new class extends A implements B, C {};
+new class($a) extends A {
+ private $a;
+ public function __construct($a) {
+ $this->a = $a;
+ }
+};
+-----
+new class
+{
+};
+new class extends A implements B, C
+{
+};
+new class($a) extends A
+{
+ private $a;
+ public function __construct($a)
+ {
+ $this->a = $a;
+ }
+};
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test
new file mode 100644
index 0000000..bff1999
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/arrayDestructuring.test
@@ -0,0 +1,14 @@
+Array destructuring
+-----
+<?php
+
+[$a, $b] = [$c, $d];
+[, $a, , , $b, ,] = $foo;
+[, [[$a]], $b] = $bar;
+['a' => $b, 'b' => $a] = $baz;
+-----
+!!php7
+[$a, $b] = [$c, $d];
+[, $a, , , $b, ] = $foo;
+[, [[$a]], $b] = $bar;
+['a' => $b, 'b' => $a] = $baz; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/call.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/call.test
new file mode 100644
index 0000000..0ec8925
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/call.test
@@ -0,0 +1,13 @@
+Calls
+-----
+<?php
+
+f($a);
+f(&$a);
+f(...$a);
+f($a, &$b, ...$c);
+-----
+f($a);
+f(&$a);
+f(...$a);
+f($a, &$b, ...$c); \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/closure.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/closure.test
new file mode 100644
index 0000000..7e4fcfd
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/closure.test
@@ -0,0 +1,18 @@
+Closures
+-----
+<?php
+
+$closureWithArgs = function ($arg1, $arg2) {
+ $comment = 'closure body';
+};
+
+$closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) {
+ $comment = 'closure body';
+};
+-----
+$closureWithArgs = function ($arg1, $arg2) {
+ $comment = 'closure body';
+};
+$closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) {
+ $comment = 'closure body';
+}; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/constant_deref.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/constant_deref.test
new file mode 100644
index 0000000..1371d42
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/constant_deref.test
@@ -0,0 +1,13 @@
+Constant/literal dereferencing
+-----
+<?php
+
+FOO[0];
+FOO::BAR[0];
+'FOO'[0];
+array(FOO)[0];
+-----
+FOO[0];
+FOO::BAR[0];
+'FOO'[0];
+array(FOO)[0];
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/docStrings.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/docStrings.test
new file mode 100644
index 0000000..a4a60ac
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/docStrings.test
@@ -0,0 +1,86 @@
+Literals
+-----
+<?php
+
+<<<'STR'
+STR;
+<<<STR
+STR;
+
+<<<'STR'
+A
+B
+STR;
+<<<STR
+A
+B
+STR;
+
+<<<'STR'
+a\nb$c
+STR;
+<<<STR
+a\\nb\$c
+STR;
+
+<<<STR
+a$b
+{$c->d}
+STR;
+
+call(
+ <<<STR
+A
+STR
+ , <<<STR
+B
+STR
+);
+
+function test() {
+ <<<STR
+Foo
+STR;
+ <<<STR
+ Bar
+STR;
+}
+-----
+<<<'STR'
+STR;
+<<<STR
+STR;
+<<<'STR'
+A
+B
+STR;
+<<<STR
+A
+B
+STR;
+<<<'STR'
+a\nb$c
+STR;
+<<<STR
+a\\nb\$c
+STR;
+<<<STR
+a{$b}
+{$c->d}
+STR;
+call(<<<STR
+A
+STR
+, <<<STR
+B
+STR
+);
+function test()
+{
+ <<<STR
+Foo
+STR;
+ <<<STR
+ Bar
+STR;
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/include.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/include.test
new file mode 100644
index 0000000..3c40779
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/include.test
@@ -0,0 +1,7 @@
+Include
+-----
+<?php
+
+(include $foo) && (include $bar);
+-----
+(include $foo) && (include $bar); \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/intrinsics.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/intrinsics.test
new file mode 100644
index 0000000..f1a1adc
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/intrinsics.test
@@ -0,0 +1,29 @@
+isset, empty, unset, exit, die, clone, eval
+-----
+<?php
+
+isset($a, $a[$b]);
+empty($a);
+empty('foo');
+unset($a, $a[$b]);
+exit;
+exit();
+exit(1);
+die;
+die();
+die('foo');
+clone $foo;
+eval('str');
+-----
+isset($a, $a[$b]);
+empty($a);
+empty('foo');
+unset($a, $a[$b]);
+exit;
+exit;
+exit(1);
+die;
+die;
+die('foo');
+clone $foo;
+eval('str'); \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/list.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/list.test
new file mode 100644
index 0000000..608ced6
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/list.test
@@ -0,0 +1,19 @@
+list()
+-----
+<?php
+
+list() = $a;
+list($a) = $b;
+list($a, $b, $c) = $d;
+list(, $a) = $b;
+list(, , $a, , $b) = $c;
+list(list($a)) = $b;
+list(, list(, list(, $a), $b)) = $c;
+-----
+list() = $a;
+list($a) = $b;
+list($a, $b, $c) = $d;
+list(, $a) = $b;
+list(, , $a, , $b) = $c;
+list(list($a)) = $b;
+list(, list(, list(, $a), $b)) = $c;
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/literals.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/literals.test
new file mode 100644
index 0000000..ffa139c
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/literals.test
@@ -0,0 +1,154 @@
+Literals
+-----
+<?php
+
+// magic constants
+__LINE__;
+__FILE__;
+__DIR__;
+__FUNCTION__;
+__CLASS__;
+__TRAIT__;
+__METHOD__;
+__NAMESPACE__;
+
+// not actually literals, but close
+null;
+true;
+false;
+NULL;
+TRUE;
+FALSE;
+
+// integers (normalized to decimal)
+0;
+11;
+011;
+0x11;
+0b11;
+
+// floats (normalized to ... something)
+0.;
+.0;
+0.0;
+0e1000;
+1.0;
+1e100;
+1e1000;
+1E-100;
+1000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
+378282246310005.0;
+10000000000000002.0;
+
+// strings (single quoted)
+'a';
+'a
+b';
+"a";
+"a\nb";
+'a\'b';
+
+// strings (double quoted)
+"a'b";
+"a\b";
+"$a";
+"a$b";
+"$a$b";
+"$a $b";
+"a${b}c";
+"a{$b}c";
+"a$a[b]c";
+"\{$A}";
+"\{ $A }";
+"\\{$A}";
+"\\{ $A }";
+"{$$A}[B]";
+"$$A[B]";
+
+// make sure indentation doesn't mess anything up
+function foo()
+{
+ "a\nb";
+ 'a
+b';
+ 'a
+ b';
+}
+
+// shell exec (similar to double quoted string)
+`foo`;
+`foo$a`;
+`foo{$a}bar`;
+`\`\'\"`;
+-----
+// magic constants
+__LINE__;
+__FILE__;
+__DIR__;
+__FUNCTION__;
+__CLASS__;
+__TRAIT__;
+__METHOD__;
+__NAMESPACE__;
+// not actually literals, but close
+null;
+true;
+false;
+NULL;
+TRUE;
+FALSE;
+// integers (normalized to decimal)
+0;
+11;
+011;
+0x11;
+0b11;
+// floats (normalized to ... something)
+0.0;
+0.0;
+0.0;
+0.0;
+1.0;
+1.0E+100;
+INF;
+1.0E-100;
+1.0E+84;
+378282246310005.0;
+10000000000000002.0;
+// strings (single quoted)
+'a';
+'a
+b';
+"a";
+"a\nb";
+'a\'b';
+// strings (double quoted)
+"a'b";
+"a\\b";
+"{$a}";
+"a{$b}";
+"{$a}{$b}";
+"{$a} {$b}";
+"a{$b}c";
+"a{$b}c";
+"a{$a['b']}c";
+"\\{{$A}}";
+"\\{ {$A} }";
+"\\{$A}";
+"\\{ {$A} }";
+"{${$A}}[B]";
+"\${$A['B']}";
+// make sure indentation doesn't mess anything up
+function foo()
+{
+ "a\nb";
+ 'a
+b';
+ 'a
+ b';
+}
+// shell exec (similar to double quoted string)
+`foo`;
+`foo{$a}`;
+`foo{$a}bar`;
+`\`\\'\\"`; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/numbers.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/numbers.test
new file mode 100644
index 0000000..292919b
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/numbers.test
@@ -0,0 +1,35 @@
+Number literals
+-----
+<?php
+
+0;
++0;
+-0;
+0.0;
+-0.0;
+42;
+-42;
+42.0;
+-42.0;
+42.5;
+-42.5;
+1e42;
+-1e42;
+1e1000;
+-1e1000;
+-----
+0;
++0;
+-0;
+0.0;
+-0.0;
+42;
+-42;
+42.0;
+-42.0;
+42.5;
+-42.5;
+1.0E+42;
+-1.0E+42;
+INF;
+-INF; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test
new file mode 100644
index 0000000..72b6841
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/operators.test
@@ -0,0 +1,144 @@
+Basic operators
+-----
+<?php
+
+$a ** $b;
+
+++$a;
+--$a;
+$a++;
+$a--;
+
+@$a;
+~$a;
+-$a;
++$a;
+
+(int) $a;
+(integer) $a;
+(float) $a;
+(double) $a;
+(real) $a;
+(string) $a;
+(binary) $a;
+(array) $a;
+(object) $a;
+(bool) $a;
+(boolean) $a;
+(unset) $a;
+
+$a * $b;
+$a / $b;
+$a % $b;
+$a + $b;
+$a - $b;
+$a . $b;
+$a << $b;
+$a >> $b;
+$a < $b;
+$a <= $b;
+$a > $b;
+$a >= $b;
+$a == $b;
+$a != $b;
+$a <> $b;
+$a === $b;
+$a !== $b;
+$a <=> $b;
+$a & $b;
+$a ^ $b;
+$a | $b;
+$a && $b;
+$a || $b;
+$a ? $b : $c;
+$a ?: $c;
+$a ?? $c;
+
+$a = $b;
+$a **= $b;
+$a *= $b;
+$a /= $b;
+$a %= $b;
+$a += $b;
+$a -= $b;
+$a .= $b;
+$a <<= $b;
+$a >>= $b;
+$a &= $b;
+$a ^= $b;
+$a |= $b;
+$a =& $b;
+
+$a and $b;
+$a xor $b;
+$a or $b;
+
+$a instanceof Foo;
+$a instanceof $b;
+-----
+$a ** $b;
+++$a;
+--$a;
+$a++;
+$a--;
+@$a;
+~$a;
+-$a;
++$a;
+(int) $a;
+(int) $a;
+(double) $a;
+(double) $a;
+(double) $a;
+(string) $a;
+(string) $a;
+(array) $a;
+(object) $a;
+(bool) $a;
+(bool) $a;
+(unset) $a;
+$a * $b;
+$a / $b;
+$a % $b;
+$a + $b;
+$a - $b;
+$a . $b;
+$a << $b;
+$a >> $b;
+$a < $b;
+$a <= $b;
+$a > $b;
+$a >= $b;
+$a == $b;
+$a != $b;
+$a != $b;
+$a === $b;
+$a !== $b;
+$a <=> $b;
+$a & $b;
+$a ^ $b;
+$a | $b;
+$a && $b;
+$a || $b;
+$a ? $b : $c;
+$a ?: $c;
+$a ?? $c;
+$a = $b;
+$a **= $b;
+$a *= $b;
+$a /= $b;
+$a %= $b;
+$a += $b;
+$a -= $b;
+$a .= $b;
+$a <<= $b;
+$a >>= $b;
+$a &= $b;
+$a ^= $b;
+$a |= $b;
+$a =& $b;
+$a and $b;
+$a xor $b;
+$a or $b;
+$a instanceof Foo;
+$a instanceof $b;
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/parentheses.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/parentheses.test
new file mode 100644
index 0000000..1f18b65
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/parentheses.test
@@ -0,0 +1,77 @@
+Pretty printer generates least-parentheses output
+-----
+<?php
+
+echo 'abc' . 'cde' . 'fgh';
+echo 'abc' . ('cde' . 'fgh');
+
+echo 'abc' . 1 + 2 . 'fgh';
+echo 'abc' . (1 + 2) . 'fgh';
+
+echo 1 * 2 + 3 / 4 % 5 . 6;
+echo 1 * (2 + 3) / (4 % (5 . 6));
+
+$a = $b = $c = $d = $f && true;
+($a = $b = $c = $d = $f) && true;
+$a = $b = $c = $d = $f and true;
+$a = $b = $c = $d = ($f and true);
+
+$a ? $b : $c ? $d : $e ? $f : $g;
+$a ? $b : ($c ? $d : ($e ? $f : $g));
+$a ? $b ? $c : $d : $f;
+
+$a ?? $b ?? $c;
+($a ?? $b) ?? $c;
+$a ?? ($b ? $c : $d);
+$a || ($b ?? $c);
+
+(1 > 0) > (1 < 0);
+++$a + $b;
+$a + $b++;
+
+$a ** $b ** $c;
+($a ** $b) ** $c;
+-1 ** 2;
+
+yield from $a and yield from $b;
+yield from ($a and yield from $b);
+
+print ($a and print $b);
+
+// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment
+// and incdec only work on variables.
+!$a = $b;
+++$a ** $b;
+$a ** $b++;
+-----
+echo 'abc' . 'cde' . 'fgh';
+echo 'abc' . ('cde' . 'fgh');
+echo 'abc' . 1 + 2 . 'fgh';
+echo 'abc' . (1 + 2) . 'fgh';
+echo 1 * 2 + 3 / 4 % 5 . 6;
+echo 1 * (2 + 3) / (4 % (5 . 6));
+$a = $b = $c = $d = $f && true;
+($a = $b = $c = $d = $f) && true;
+$a = $b = $c = $d = $f and true;
+$a = $b = $c = $d = ($f and true);
+$a ? $b : $c ? $d : $e ? $f : $g;
+$a ? $b : ($c ? $d : ($e ? $f : $g));
+$a ? $b ? $c : $d : $f;
+$a ?? $b ?? $c;
+($a ?? $b) ?? $c;
+$a ?? ($b ? $c : $d);
+$a || ($b ?? $c);
+(1 > 0) > (1 < 0);
+++$a + $b;
+$a + $b++;
+$a ** $b ** $c;
+($a ** $b) ** $c;
+-1 ** 2;
+yield from $a and yield from $b;
+yield from ($a and yield from $b);
+print ($a and print $b);
+// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment
+// and incdec only work on variables.
+!($a = $b);
+(++$a) ** $b;
+$a ** ($b++);
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/shortArraySyntax.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/shortArraySyntax.test
new file mode 100644
index 0000000..082c2e0
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/shortArraySyntax.test
@@ -0,0 +1,11 @@
+Short array syntax
+-----
+<?php
+
+[];
+array(1, 2, 3);
+['a' => 'b', 'c' => 'd'];
+-----
+[];
+array(1, 2, 3);
+['a' => 'b', 'c' => 'd']; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/stringEscaping.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/stringEscaping.test
new file mode 100644
index 0000000..02877ad
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/stringEscaping.test
@@ -0,0 +1,23 @@
+Escape sequences in double-quoted strings
+-----
+<?php
+"\n\r\t\f\v\$\"\\";
+"@@{ implode(range("\0", "\37")) }@@";
+"\0000\0001";
+
+<<<DOC
+\n\r\t\f\v\$\"\\
+@@{ implode(range("\0", "\37")) }@@
+\0000\0001
+DOC;
+
+-----
+"\n\r\t\f\v\$\"\\";
+"\0\1\2\3\4\5\6\7\10\t\n\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37";
+"\0000\0001";
+<<<DOC
+@@{ "\n\r" }@@\t\f\v\$\\"\\
+\0\1\2\3\4\5\6\7\10\t@@{ "\n" }@@\v\f@@{ "\r" }@@\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37
+\0000\0001
+DOC
+; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/uvs.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/uvs.test
new file mode 100644
index 0000000..e336fb5
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/uvs.test
@@ -0,0 +1,23 @@
+Uniform variable syntax
+-----
+<?php
+
+(function() {})();
+array('a', 'b')()();
+A::$b::$c;
+$A::$b[$c]();
+$A::{$b[$c]}();
+A::$$b[$c]();
+($a->b)();
+(A::$b)();
+-----
+!!php7
+(function () {
+})();
+array('a', 'b')()();
+A::$b::$c;
+$A::$b[$c]();
+$A::{$b[$c]}();
+A::${$b}[$c]();
+($a->b)();
+(A::$b)();
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test
new file mode 100644
index 0000000..4e0fa2e
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/variables.test
@@ -0,0 +1,73 @@
+Variables
+-----
+<?php
+
+$a;
+$$a;
+${$a};
+$a->b;
+$a->b();
+$a->b($c);
+$a->$b();
+$a->{$b}();
+$a->$b[$c]();
+$$a->b;
+$a[$b];
+$a[$b]();
+$$a[$b];
+$a::B;
+$a::$b;
+$a::b();
+$a::b($c);
+$a::$b();
+$a::$b[$c];
+$a::$b[$c]($d);
+$a::{$b[$c]}($d);
+$a::{$b->c}();
+A::$$b[$c]();
+a();
+$a();
+$a()[$b];
+$a->b()[$c];
+$a::$b()[$c];
+(new A)->b;
+(new A())->b();
+(new $$a)[$b];
+(new $a->b)->c;
+
+global $a, $$a, $$a[$b], $$a->b;
+-----
+!!php5
+$a;
+${$a};
+${$a};
+$a->b;
+$a->b();
+$a->b($c);
+$a->{$b}();
+$a->{$b}();
+$a->{$b[$c]}();
+${$a}->b;
+$a[$b];
+$a[$b]();
+${$a[$b]};
+$a::B;
+$a::$b;
+$a::b();
+$a::b($c);
+$a::$b();
+$a::$b[$c];
+$a::{$b[$c]}($d);
+$a::{$b[$c]}($d);
+$a::{$b->c}();
+A::${$b[$c]}();
+a();
+$a();
+$a()[$b];
+$a->b()[$c];
+$a::$b()[$c];
+(new A())->b;
+(new A())->b();
+(new ${$a}())[$b];
+(new $a->b())->c;
+global $a, ${$a}, ${$a[$b]}, ${$a->b};
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/expr/yield.test b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/yield.test
new file mode 100644
index 0000000..12ab7de
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/expr/yield.test
@@ -0,0 +1,46 @@
+Yield
+-----
+<?php
+
+function gen()
+{
+ yield;
+ yield $a;
+ yield $a => $b;
+ $a = yield;
+ $a = (yield $b);
+ $a = (yield $b => $c);
+}
+// TODO Get rid of parens for cases 2 and 3
+-----
+function gen()
+{
+ yield;
+ (yield $a);
+ (yield $a => $b);
+ $a = yield;
+ $a = (yield $b);
+ $a = (yield $b => $c);
+}
+// TODO Get rid of parens for cases 2 and 3
+-----
+<?php
+
+function gen()
+{
+ $a = yield $b;
+ $a = yield $b => $c;
+ yield from $a;
+ $a = yield from $b;
+}
+// TODO Get rid of parens for last case
+-----
+!!php7
+function gen()
+{
+ $a = (yield $b);
+ $a = (yield $b => $c);
+ yield from $a;
+ $a = (yield from $b);
+}
+// TODO Get rid of parens for last case \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test
new file mode 100644
index 0000000..b33eb52
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test
@@ -0,0 +1,58 @@
+File containing both inline HTML and PHP
+-----
+HTML
+<?php
+echo 'PHP';
+-----
+HTML
+<?php
+echo 'PHP';
+-----
+<?php
+echo 'PHP';
+?>
+HTML
+-----
+<?php
+
+echo 'PHP';
+?>
+HTML
+-----
+HTML
+<?php
+echo 'PHP';
+?>
+HTML
+-----
+HTML
+<?php
+echo 'PHP';
+?>
+HTML
+-----
+HTML
+<?php
+echo 'PHP';
+?>
+HTML
+<?php
+echo 'PHP';
+?>
+HTML
+-----
+HTML
+<?php
+echo 'PHP';
+?>
+HTML
+<?php
+echo 'PHP';
+?>
+HTML
+-----
+HTML<?php echo 'PHP'; ?>HTML
+-----
+HTML<?php
+echo 'PHP';
+?>HTML \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test
new file mode 100644
index 0000000..e980719
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyInlineHTML.file-test
@@ -0,0 +1,19 @@
+File containing only inline HTML
+-----
+Hallo World
+Foo Bar
+Bar Foo
+World Hallo
+-----
+Hallo World
+Foo Bar
+Bar Foo
+World Hallo
+-----
+
+
+Test
+-----
+
+
+Test \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test
new file mode 100644
index 0000000..9550b10
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/onlyPHP.file-test
@@ -0,0 +1,16 @@
+File containing only PHP
+-----
+<?php
+
+echo 'Foo Bar';
+echo 'Bar Foo';
+-----
+<?php
+
+echo 'Foo Bar';
+echo 'Bar Foo';
+-----
+<?php
+
+-----
+<?php
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/alias.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/alias.test
new file mode 100644
index 0000000..ef5695d
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/alias.test
@@ -0,0 +1,20 @@
+Aliases (namespacing)
+-----
+<?php
+
+use A\B;
+use C\D as E;
+use F\G as H, J;
+
+use function foo\bar;
+use function foo\bar as baz;
+use const foo\BAR;
+use const foo\BAR as BAZ;
+-----
+use A\B;
+use C\D as E;
+use F\G as H, J;
+use function foo\bar;
+use function foo\bar as baz;
+use const foo\BAR;
+use const foo\BAR as BAZ; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/break_continue.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/break_continue.test
new file mode 100644
index 0000000..4773df1
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/break_continue.test
@@ -0,0 +1,13 @@
+break/continue
+-----
+<?php
+
+continue;
+continue 2;
+break;
+break 2;
+-----
+continue;
+continue 2;
+break;
+break 2; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class.test
new file mode 100644
index 0000000..5225d2a
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class.test
@@ -0,0 +1,53 @@
+Class
+-----
+<?php
+
+class Foo extends Bar implements ABC, \DEF, namespace\GHI
+{
+ var $a = 'foo';
+ private $b = 'bar';
+ static $c = 'baz';
+ function test()
+ {
+ $this->a = 'bar';
+ echo 'test';
+ }
+
+ protected function baz() {}
+ public function foo() {}
+ abstract static function bar() {}
+}
+
+trait Bar
+{
+ function test()
+ {
+ }
+}
+-----
+class Foo extends Bar implements ABC, \DEF, namespace\GHI
+{
+ var $a = 'foo';
+ private $b = 'bar';
+ static $c = 'baz';
+ function test()
+ {
+ $this->a = 'bar';
+ echo 'test';
+ }
+ protected function baz()
+ {
+ }
+ public function foo()
+ {
+ }
+ static abstract function bar()
+ {
+ }
+}
+trait Bar
+{
+ function test()
+ {
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test
new file mode 100644
index 0000000..e73ad43
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/class_const.test
@@ -0,0 +1,20 @@
+Class constants
+-----
+<?php
+
+class Foo
+{
+ const A = 1, B = 2;
+ public const C = 3, D = 4;
+ protected const E = 5, F = 6;
+ private const G = 7, H = 8;
+}
+-----
+!!php7
+class Foo
+{
+ const A = 1, B = 2;
+ public const C = 3, D = 4;
+ protected const E = 5, F = 6;
+ private const G = 7, H = 8;
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/const.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/const.test
new file mode 100644
index 0000000..6b17642
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/const.test
@@ -0,0 +1,11 @@
+Constant declarations
+-----
+<?php
+
+const FOO = 'BAR';
+const FOO = 1 + 1;
+const FOO = BAR, BAR = FOO;
+-----
+const FOO = 'BAR';
+const FOO = 1 + 1;
+const FOO = BAR, BAR = FOO; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/declare.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/declare.test
new file mode 100644
index 0000000..fd48e69
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/declare.test
@@ -0,0 +1,17 @@
+declare
+-----
+<?php
+
+declare (strict_types=1);
+declare (ticks=1) {
+ foo();
+}
+declare (ticks=2) {
+}
+-----
+declare (strict_types=1);
+declare (ticks=1) {
+ foo();
+}
+declare (ticks=2) {
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/do_while.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/do_while.test
new file mode 100644
index 0000000..532d475
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/do_while.test
@@ -0,0 +1,10 @@
+doWhile
+-----
+<?php
+
+do {
+
+} while (true);
+-----
+do {
+} while (true); \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/for.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/for.test
new file mode 100644
index 0000000..ef7ac4a
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/for.test
@@ -0,0 +1,28 @@
+for
+-----
+<?php
+
+for ($i = 0; $i < 10; $i++) {
+
+}
+
+for ($i = 0,$j = 0; $i < 10; $i++) {
+
+}
+
+for ($i = 0; $i < 10;) {
+
+}
+
+for (;;) {
+
+}
+-----
+for ($i = 0; $i < 10; $i++) {
+}
+for ($i = 0, $j = 0; $i < 10; $i++) {
+}
+for ($i = 0; $i < 10;) {
+}
+for (;;) {
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/foreach.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/foreach.test
new file mode 100644
index 0000000..44c3a1a
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/foreach.test
@@ -0,0 +1,28 @@
+foreach
+-----
+<?php
+
+foreach ($arr as $val) {
+
+}
+
+foreach ($arr as &$val) {
+
+}
+
+foreach ($arr as $key => $val) {
+
+}
+
+foreach ($arr as $key => &$val) {
+
+}
+-----
+foreach ($arr as $val) {
+}
+foreach ($arr as &$val) {
+}
+foreach ($arr as $key => $val) {
+}
+foreach ($arr as $key => &$val) {
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/function_signatures.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/function_signatures.test
new file mode 100644
index 0000000..af1088a
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/function_signatures.test
@@ -0,0 +1,43 @@
+Function signatures
+-----
+<?php
+
+interface A
+{
+ function f1();
+ function f2($a, $b);
+ function f3(&$a);
+ function f4(A\B $a);
+ function f4(array $a);
+ function f5(callable $a);
+ function f6(&$a);
+ function f7(...$a);
+ function f8(&...$a);
+ function f9(A &$a);
+ function f10(A ...$a);
+ function f11(A &$a);
+ function f12(A &...$a);
+ function f13($a) : array;
+ function f14($a) : callable;
+ function f15($a) : B\C;
+}
+-----
+interface A
+{
+ function f1();
+ function f2($a, $b);
+ function f3(&$a);
+ function f4(A\B $a);
+ function f4(array $a);
+ function f5(callable $a);
+ function f6(&$a);
+ function f7(...$a);
+ function f8(&...$a);
+ function f9(A &$a);
+ function f10(A ...$a);
+ function f11(A &$a);
+ function f12(A &...$a);
+ function f13($a) : array;
+ function f14($a) : callable;
+ function f15($a) : B\C;
+}
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/global_static_variables.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/global_static_variables.test
new file mode 100644
index 0000000..eea776a
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/global_static_variables.test
@@ -0,0 +1,11 @@
+Global and static variables
+-----
+<?php
+
+global $a, $$a, ${$a[$a]};
+static $a, $b;
+static $a = 'foo', $b = 'bar';
+-----
+global $a, ${$a}, ${$a[$a]};
+static $a, $b;
+static $a = 'foo', $b = 'bar'; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/goto.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/goto.test
new file mode 100644
index 0000000..61c7812
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/goto.test
@@ -0,0 +1,9 @@
+goto
+-----
+<?php
+
+marker:
+goto marker;
+-----
+marker:
+goto marker; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/groupUse.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/groupUse.test
new file mode 100644
index 0000000..de086c8
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/groupUse.test
@@ -0,0 +1,16 @@
+Group use declaration
+-----
+<?php
+use A\{B};
+use A\{B\C, D};
+use A\B\{C\D, E};
+use function A\{b\c, d};
+use const A\{B\C, D};
+use A\B\{C\D, function b\c, const D};
+-----
+use A\{B};
+use A\{B\C, D};
+use A\B\{C\D, E};
+use function A\{b\c, d};
+use const A\{B\C, D};
+use A\B\{C\D, function b\c, const D};
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/haltCompiler.file-test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/haltCompiler.file-test
new file mode 100644
index 0000000..a427a64
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/haltCompiler.file-test
@@ -0,0 +1,27 @@
+__halt_compiler
+-----
+<?php
+
+echo 'foo';
+__halt_compiler();
+!!!
+???
+-----
+<?php
+
+echo 'foo';
+__halt_compiler();
+!!!
+???
+-----
+<?php
+
+echo 'foo';
+__halt_compiler();
+<?php
+-----
+<?php
+
+echo 'foo';
+__halt_compiler();
+<?php \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/if.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/if.test
new file mode 100644
index 0000000..8debb2e
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/if.test
@@ -0,0 +1,16 @@
+if/elseif/else
+-----
+<?php
+
+if ($expr) {
+
+} elseif ($expr2) {
+
+} else {
+
+}
+-----
+if ($expr) {
+} elseif ($expr2) {
+} else {
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/multiCatch.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/multiCatch.test
new file mode 100644
index 0000000..8e3f12b
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/multiCatch.test
@@ -0,0 +1,19 @@
+Multi catch
+-----
+<?php
+try {
+ $x;
+} catch (X|Y $e1) {
+ $y;
+} catch (\A|B\C $e2) {
+ $z;
+}
+-----
+!!php7
+try {
+ $x;
+} catch (X|Y $e1) {
+ $y;
+} catch (\A|B\C $e2) {
+ $z;
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/namespaces.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/namespaces.test
new file mode 100644
index 0000000..939470b
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/namespaces.test
@@ -0,0 +1,50 @@
+Namespaces
+-----
+<?php
+
+namespace Foo;
+
+function foo()
+{
+}
+
+namespace Bar;
+
+function bar()
+{
+}
+-----
+namespace Foo;
+
+function foo()
+{
+}
+namespace Bar;
+
+function bar()
+{
+}
+-----
+<?php
+
+namespace Foo {
+ function foo()
+ {
+ }
+}
+
+namespace {
+ function glob() {
+ }
+}
+-----
+namespace Foo {
+ function foo()
+ {
+ }
+}
+namespace {
+ function glob()
+ {
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/nullable_types.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/nullable_types.test
new file mode 100644
index 0000000..6a40e20
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/nullable_types.test
@@ -0,0 +1,11 @@
+Nullable types
+-----
+<?php
+function test(?Foo $bar, ?string $foo, ?\Xyz $zyx) : ?Baz
+{
+}
+-----
+!!php7
+function test(?Foo $bar, ?string $foo, ?\Xyz $zyx) : ?Baz
+{
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/switch.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/switch.test
new file mode 100644
index 0000000..0733a48
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/switch.test
@@ -0,0 +1,35 @@
+switch/case/default
+-----
+<?php
+
+switch ($expr) {
+ case 0:
+ echo 'First case, with a break';
+ break;
+ case 1:
+ echo 'Second case, which falls through';
+ case 2:
+ case 3:
+ case 4:
+ echo 'Third case, return instead of break';
+ return;
+ default:
+ echo 'Default case';
+ break;
+}
+-----
+switch ($expr) {
+ case 0:
+ echo 'First case, with a break';
+ break;
+ case 1:
+ echo 'Second case, which falls through';
+ case 2:
+ case 3:
+ case 4:
+ echo 'Third case, return instead of break';
+ return;
+ default:
+ echo 'Default case';
+ break;
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/throw.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/throw.test
new file mode 100644
index 0000000..2340893
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/throw.test
@@ -0,0 +1,7 @@
+throw
+-----
+<?php
+
+throw $e;
+-----
+throw $e; \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/traitUse.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/traitUse.test
new file mode 100644
index 0000000..7455ea0
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/traitUse.test
@@ -0,0 +1,25 @@
+Trait uses and adaptations
+-----
+<?php
+
+class A
+{
+ use B, C, D {
+ f as g;
+ f as private;
+ f as private g;
+ B::f as g;
+ B::f insteadof C, D;
+ }
+}
+-----
+class A
+{
+ use B, C, D {
+ f as g;
+ f as private;
+ f as private g;
+ B::f as g;
+ B::f insteadof C, D;
+ }
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/tryCatch.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/tryCatch.test
new file mode 100644
index 0000000..044934d
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/tryCatch.test
@@ -0,0 +1,24 @@
+tryCatch
+-----
+<?php
+
+try {
+
+} catch (Exception $e) {
+
+}
+
+try {
+} catch (Exception $e) {
+
+} finally {
+
+}
+-----
+try {
+} catch (Exception $e) {
+}
+try {
+} catch (Exception $e) {
+} finally {
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/while.test b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/while.test
new file mode 100644
index 0000000..4e6dada
--- /dev/null
+++ b/vendor/nikic/php-parser/test/code/prettyPrinter/stmt/while.test
@@ -0,0 +1,10 @@
+while
+-----
+<?php
+
+while (true) {
+
+}
+-----
+while (true) {
+} \ No newline at end of file
diff --git a/vendor/nikic/php-parser/test_old/run-php-src.sh b/vendor/nikic/php-parser/test_old/run-php-src.sh
new file mode 100755
index 0000000..45e9344
--- /dev/null
+++ b/vendor/nikic/php-parser/test_old/run-php-src.sh
@@ -0,0 +1,4 @@
+wget -q https://github.com/php/php-src/archive/php-7.0.5.tar.gz
+mkdir -p ./data/php-src
+tar -xzf ./php-7.0.5.tar.gz -C ./data/php-src --strip-components=1
+php -n test_old/run.php --verbose --no-progress PHP7 ./data/php-src
diff --git a/vendor/nikic/php-parser/test_old/run.php b/vendor/nikic/php-parser/test_old/run.php
new file mode 100644
index 0000000..c493f2e
--- /dev/null
+++ b/vendor/nikic/php-parser/test_old/run.php
@@ -0,0 +1,223 @@
+<?php
+
+error_reporting(E_ALL | E_STRICT);
+ini_set('short_open_tag', false);
+
+if ('cli' !== php_sapi_name()) {
+ die('This script is designed for running on the command line.');
+}
+
+function showHelp($error) {
+ die($error . "\n\n" .
+<<<OUTPUT
+This script has to be called with the following signature:
+
+ php run.php [--no-progress] testType pathToTestFiles
+
+The test type must be one of: PHP5, PHP7 or Symfony.
+
+The following options are available:
+
+ --no-progress Disables showing which file is currently tested.
+
+OUTPUT
+ );
+}
+
+$options = array();
+$arguments = array();
+
+// remove script name from argv
+array_shift($argv);
+
+foreach ($argv as $arg) {
+ if ('-' === $arg[0]) {
+ $options[] = $arg;
+ } else {
+ $arguments[] = $arg;
+ }
+}
+
+if (count($arguments) !== 2) {
+ showHelp('Too little arguments passed!');
+}
+
+$showProgress = true;
+$verbose = false;
+foreach ($options as $option) {
+ if ($option === '--no-progress') {
+ $showProgress = false;
+ } elseif ($option === '--verbose') {
+ $verbose = true;
+ } else {
+ showHelp('Invalid option passed!');
+ }
+}
+
+$testType = $arguments[0];
+$dir = $arguments[1];
+
+switch ($testType) {
+ case 'Symfony':
+ $version = 'Php5';
+ $fileFilter = function($path) {
+ return preg_match('~\.php(?:\.cache)?$~', $path) && false === strpos($path, 'skeleton');
+ };
+ $codeExtractor = function($file, $code) {
+ return $code;
+ };
+ break;
+ case 'PHP5':
+ case 'PHP7':
+ $version = $testType === 'PHP5' ? 'Php5' : 'Php7';
+ $fileFilter = function($path) {
+ return preg_match('~\.phpt$~', $path);
+ };
+ $codeExtractor = function($file, $code) {
+ if (preg_match('~(?:
+# skeleton files
+ ext.gmp.tests.001
+| ext.skeleton.tests.001
+# multibyte encoded files
+| ext.mbstring.tests.zend_multibyte-01
+| Zend.tests.multibyte.multibyte_encoding_001
+| Zend.tests.multibyte.multibyte_encoding_004
+| Zend.tests.multibyte.multibyte_encoding_005
+# token_get_all bug (https://bugs.php.net/bug.php?id=60097)
+| Zend.tests.bug47516
+# pretty print difference due to INF vs 1e1000
+| ext.standard.tests.general_functions.bug27678
+| tests.lang.bug24640
+# pretty print difference due to nop statements
+| ext.mbstring.tests.htmlent
+| ext.standard.tests.file.fread_basic
+# tests using __halt_compiler as semi reserved keyword
+| Zend.tests.grammar.semi_reserved_001
+| Zend.tests.grammar.semi_reserved_002
+| Zend.tests.grammar.semi_reserved_005
+)\.phpt$~x', $file)) {
+ return null;
+ }
+
+ if (!preg_match('~--FILE--\s*(.*?)--[A-Z]+--~s', $code, $matches)) {
+ return null;
+ }
+ if (preg_match('~--EXPECT(?:F|REGEX)?--\s*(?:Parse|Fatal) error~', $code)) {
+ return null;
+ }
+
+ return $matches[1];
+ };
+ break;
+ default:
+ showHelp('Test type must be one of: PHP5, PHP7 or Symfony');
+}
+
+require_once dirname(__FILE__) . '/../lib/PhpParser/Autoloader.php';
+PhpParser\Autoloader::register();
+
+$parserName = 'PhpParser\Parser\\' . $version;
+$parser = new $parserName(new PhpParser\Lexer\Emulative);
+$prettyPrinter = new PhpParser\PrettyPrinter\Standard;
+$nodeDumper = new PhpParser\NodeDumper;
+
+$parseFail = $ppFail = $compareFail = $count = 0;
+
+$readTime = $parseTime = $ppTime = $reparseTime = $compareTime = 0;
+$totalStartTime = microtime(true);
+
+foreach (new RecursiveIteratorIterator(
+ new RecursiveDirectoryIterator($dir),
+ RecursiveIteratorIterator::LEAVES_ONLY)
+ as $file) {
+ if (!$fileFilter($file)) {
+ continue;
+ }
+
+ $startTime = microtime(true);
+ $code = file_get_contents($file);
+ $readTime += microtime(true) - $startTime;
+
+ if (null === $code = $codeExtractor($file, $code)) {
+ continue;
+ }
+
+ set_time_limit(10);
+
+ ++$count;
+
+ if ($showProgress) {
+ echo substr(str_pad('Testing file ' . $count . ': ' . substr($file, strlen($dir)), 79), 0, 79), "\r";
+ }
+
+ try {
+ $startTime = microtime(true);
+ $stmts = $parser->parse($code);
+ $parseTime += microtime(true) - $startTime;
+
+ $startTime = microtime(true);
+ $code = '<?php' . "\n" . $prettyPrinter->prettyPrint($stmts);
+ $ppTime += microtime(true) - $startTime;
+
+ try {
+ $startTime = microtime(true);
+ $ppStmts = $parser->parse($code);
+ $reparseTime += microtime(true) - $startTime;
+
+ $startTime = microtime(true);
+ $same = $nodeDumper->dump($stmts) == $nodeDumper->dump($ppStmts);
+ $compareTime += microtime(true) - $startTime;
+
+ if (!$same) {
+ echo $file, ":\n Result of initial parse and parse after pretty print differ\n";
+ if ($verbose) {
+ echo "Pretty printer output:\n=====\n$code\n=====\n\n";
+ }
+
+ ++$compareFail;
+ }
+ } catch (PhpParser\Error $e) {
+ echo $file, ":\n Parse of pretty print failed with message: {$e->getMessage()}\n";
+ if ($verbose) {
+ echo "Pretty printer output:\n=====\n$code\n=====\n\n";
+ }
+
+ ++$ppFail;
+ }
+ } catch (PhpParser\Error $e) {
+ echo $file, ":\n Parse failed with message: {$e->getMessage()}\n";
+
+ ++$parseFail;
+ }
+}
+
+if (0 === $parseFail && 0 === $ppFail && 0 === $compareFail) {
+ $exit = 0;
+ echo "\n\n", 'All tests passed.', "\n";
+} else {
+ $exit = 1;
+ echo "\n\n", '==========', "\n\n", 'There were: ', "\n";
+ if (0 !== $parseFail) {
+ echo ' ', $parseFail, ' parse failures.', "\n";
+ }
+ if (0 !== $ppFail) {
+ echo ' ', $ppFail, ' pretty print failures.', "\n";
+ }
+ if (0 !== $compareFail) {
+ echo ' ', $compareFail, ' compare failures.', "\n";
+ }
+}
+
+echo "\n",
+ 'Tested files: ', $count, "\n",
+ "\n",
+ 'Reading files took: ', $readTime, "\n",
+ 'Parsing took: ', $parseTime, "\n",
+ 'Pretty printing took: ', $ppTime, "\n",
+ 'Reparsing took: ', $reparseTime, "\n",
+ 'Comparing took: ', $compareTime, "\n",
+ "\n",
+ 'Total time: ', microtime(true) - $totalStartTime, "\n",
+ 'Maximum memory usage: ', memory_get_peak_usage(true), "\n";
+
+exit($exit);